/* ========================================
   RESET & VARIABLES
   ======================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #f5f1e8;
    --card: #fff;
    --card-soft: rgba(255, 255, 255, 0.6);
    --gold: #8b673f;
    --gold-light: #d9b97f;
    --gold-dark: #6b4f2f;
    --text: #25221e;
    --text-soft: #5a554e;
    --text-muted: #7a746c;
    --line: rgba(0, 0, 0, 0.08);
    --line-soft: rgba(0, 0, 0, 0.04);
    --shadow-soft: rgba(0, 0, 0, 0.06);
    --shadow-deep: rgba(0, 0, 0, 0.12);
    --gradient-1: radial-gradient(circle at 18% 0%, rgba(139, 103, 63, 0.08), transparent 34%);
    --gradient-2: radial-gradient(circle at 92% 12%, rgba(100, 130, 150, 0.06), transparent 30%);
    --gradient-3: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08));
    --width: 840px;
    --radius: 26px;
    --header-height: 90px;
}

/* Темы */
.theme-night {
    --bg: #000000; --card: #121318; --card-soft: rgba(255, 255, 255, 0.04);
    --gold: #c69a4a; --gold-light: #e0b96a; --gold-dark: #8e6f3a;
    --text: #e8e6e3; --text-soft: #b8b5af; --text-muted: #8a857c;
    --line: rgba(198, 154, 74, 0.22); --line-soft: rgba(255, 255, 255, 0.06);
    --shadow-soft: rgba(0, 0, 0, 0.4); --shadow-deep: rgba(0, 0, 0, 0.6);
    --gradient-1: radial-gradient(circle at 18% 0%, rgba(198, 154, 74, 0.12), transparent 34%);
    --gradient-2: radial-gradient(circle at 92% 12%, rgba(60, 82, 96, 0.10), transparent 30%);
    --gradient-3: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}
.theme-burgundy {
    --bg: #1a1215; --card: #24181c; --card-soft: rgba(255, 255, 255, 0.04);
    --gold: #c97b84; --gold-light: #e8a5ac; --gold-dark: #9a5a62;
    --text: #f0e8e6; --text-soft: #c8beb9; --text-muted: #9a8f8a;
    --line: rgba(201, 123, 132, 0.24); --line-soft: rgba(255, 255, 255, 0.07);
    --shadow-soft: rgba(0, 0, 0, 0.4); --shadow-deep: rgba(0, 0, 0, 0.6);
    --gradient-1: radial-gradient(circle at 18% 0%, rgba(201, 123, 132, 0.14), transparent 34%);
    --gradient-2: radial-gradient(circle at 92% 12%, rgba(40, 25, 35, 0.12), transparent 30%);
    --gradient-3: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}
.theme-blue {
    --bg: #0f1622; --card: #151e2e; --card-soft: rgba(255, 255, 255, 0.04);
    --gold: #6b9bd2; --gold-light: #9bc1e8; --gold-dark: #4a7ab5;
    --text: #e6f0f5; --text-soft: #b8c8d8; --text-muted: #8a9faf;
    --line: rgba(107, 155, 210, 0.22); --line-soft: rgba(255, 255, 255, 0.06);
    --shadow-soft: rgba(0, 0, 0, 0.4); --shadow-deep: rgba(0, 0, 0, 0.6);
    --gradient-1: radial-gradient(circle at 18% 0%, rgba(107, 155, 210, 0.12), transparent 34%);
    --gradient-2: radial-gradient(circle at 92% 12%, rgba(30, 50, 80, 0.14), transparent 30%);
    --gradient-3: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

/* ========================================
   BASE & LAYOUT
   ======================================== */
body {
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
    line-height: 1.6;
    background: var(--bg);
    min-height: 100vh;
    transition: background 0.4s ease;
}
.page {
    width: min(var(--width), 100%);
    margin: 0 auto;
    padding: calc(var(--header-height) + 24px) 18px 40px;
}

.header-small
{
color: var(--text-muted);
  font-size:16px;
  margin: 20px 0;
  font-weight:normal;
  text-transform: uppercase;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 6px 30px var(--shadow-soft);
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: background 0.4s ease;
}

.theme-night .header { background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); }
.theme-burgundy .header { background: linear-gradient(180deg, rgba(26, 18, 21, 0.65) 0%, rgba(26, 18, 21, 0) 100%); }
.theme-blue .header { background: linear-gradient(180deg, rgba(15, 22, 34, 0.65) 0%, rgba(15, 22, 34, 0) 100%); }

.header-inner {
    width: min(var(--width), 100%);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.header-title {
    font-size: 13px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold);
    cursor: default;
    outline: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}
.header-title[contenteditable="true"] { cursor: text; }
.header-title[contenteditable="true"]:focus { background: rgba(139, 103, 63, 0.12); }

/* ========================================
   AVATAR
   ======================================== */
.avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
}
.avatar {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 18px 50px var(--shadow-deep), 0 0 0 1px var(--line);
}
.avatar-upload {
    position: absolute;
    bottom: 8px;
    right: calc(50% - 110px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-deep);
    transition: transform 0.2s;
}
.avatar-upload:hover { transform: scale(1.1); }
.avatar-upload svg { width: 18px; height: 18px; fill: var(--bg); }

/* ========================================
   SONGS & PLAYER
   ======================================== */
.songs {
    display: grid;
    gap: 30px;
    padding-top: 12px;
}
.song-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--gradient-1), var(--gradient-2), var(--gradient-3), var(--card);
    box-shadow:
        0 0 42px rgba(139, 103, 63, 0.08),
        0 0 90px rgba(50, 70, 90, 0.06),
        0 26px 70px var(--shadow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.3s ease;
}
.song-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(139, 103, 63, 0.06), transparent 24%, transparent 76%, rgba(139, 103, 63, 0.04)),
        radial-gradient(circle at 50% 0%, rgba(217, 185, 127, 0.06), transparent 46%);
}
.song-inner {
    position: relative;
    z-index: 1;
    padding: clamp(20px, 4vw, 36px);
}
.song-top {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}
@media (min-width: 720px) {
    .song-top {
        grid-template-columns: 1fr 360px;
        align-items: center;
    }
}
.song-number {
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.song-title {
    margin: 0;
    font-size: clamp(28px, 5.5vw, 38px);
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -0.04em;
}
audio { display: none; }

.player-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 25px 0 0 0;
}
.player-label {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: -5px;
}
.cm-wrapper {
    width: 100%;
    position: relative;
}
.cm-controls-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    height: 48px;
}
.cm-btn.cm-play {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: none;
    box-shadow: 0 4px 15px rgba(139, 103, 63, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #000;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    z-index: 2;
}
.cm-btn.cm-play:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(139, 103, 63, 0.6);
    background: linear-gradient(135deg, #fff, var(--gold-light));
}
.cm-btn.cm-play:active { transform: scale(0.95); }
.cm-btn.cm-play svg {
    width: 20px;
    height: 20px;
    fill: #000;
    display: block;
    transition: all 0.2s;
}
@keyframes activePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 var(--gold); }
    50% { transform: scale(1.21); box-shadow: 0 0 0 15px transparent; }
    100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}
.cm-wrapper.playing .cm-btn.cm-play {
    animation: activePulse 2.1s infinite ease-in-out;
    background: linear-gradient(135deg, #fff, var(--gold-light));
}
.cm-range {
    flex: 1;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    outline: none;
    cursor: pointer;
}
.cm-range::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: var(--gold);
    cursor: pointer;
    transition: transform 0.2s;
}
.cm-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: var(--gold);
    cursor: pointer;
    transition: transform 0.2s;
}
.cm-range::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: var(--gold-light);
}
.cm-range::-moz-range-thumb:hover {
    transform: scale(1.3);
    background: var(--gold-light);
}
.cm-time {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    text-align: right;
    user-select: none;
    min-width: 85px;
    line-height: 1;
}

/* ========================================
   LYRICS
   ======================================== */
.lyrics {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: 
        max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease,
        visibility 0s linear 0.55s;
    will-change: max-height, opacity;
    contain: layout paint;
}
.lyrics.open {
    max-height: 1900px;
    opacity: 1;
    visibility: visible;
    transition: 
        max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease,
        visibility 0s linear 0s;
}
.lyrics-inner {
    position: relative;
    min-height: 40px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    transform: translateZ(0);
}
.lyrics-text {
    margin: 0;
    white-space: pre-line;
    font-size: 15px;
    line-height: 1.7;
}
.lyrics-text div {
    margin: 0;
}
.lyrics-text > :first-child { margin-top: 0; }
.lyrics-text > :last-child { margin-bottom: 0; }

/* ========================================
   ADMIN PANEL
   ======================================== */
.admin-bar {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    min-height: 52px;
    position: sticky;
    top: 90px;
    z-index: 9900;
}
.admin-bar-section {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
.admin-bar-left { flex: 0 0 auto; }
.admin-bar-center { flex: 1 1 auto; justify-content: center; }
.admin-bar-right { flex: 0 0 auto; }
.admin-bar-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2;
}
.admin-bar-overlay form {
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(8px);
    transition: transform 0.3s ease;
}
.admin-bar-overlay input {
    width: 200px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}
.admin-bar-overlay input:focus { border-color: var(--gold); }
.admin-bar-overlay .btn-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
}
.admin-bar.mode-password .admin-bar-section {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96);
    pointer-events: none;
}
.admin-bar.mode-password .admin-bar-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.admin-bar.mode-password .admin-bar-overlay form {
    transform: translateY(0);
}

.admin-btn {
    padding: 8px 16px;
    margin-right: 6px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    background: var(--gold);
    color: #fff;
    transition: 0.2s;
}
.admin-btn:hover { opacity: 0.9; }
.admin-btn.secondary {
    background: rgba(139, 103, 63, 0.15);
    color: var(--gold);
}

.admin-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    overflow: visible;
}
.admin-form h3 {
    margin: 0 0 16px;
    font-size: 18px;
}
.form-row { margin-bottom: 14px; }
.form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-muted);
}
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card);
    color: var(--text);
}
.form-row textarea {
    min-height: 120px;
    resize: vertical;
}
.editor-area {
    min-height: 120px;
    padding: 10px 12px;
    outline: none;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}
.editor-area:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
}
.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.edit-controls {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.edit-controls button {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.edit-controls .edit-btn {
    background: var(--gold);
    color: #fff;
}
.edit-controls .del-btn {
    background: #c44;
    color: #fff;
}

.dl-btn{display:flex;align-items:center;justify-content:center;width:34px;height:34px;min-width:34px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--soft);cursor:pointer;transition:all .22s;text-decoration:none;padding:0;margin-left:8px}
.dl-btn:hover{background:rgba(139,103,63,.08);color:var(--accent);border-color:rgba(139,103,63,.2);transform:scale(1.08)}
.dl-btn svg{width:14px;height:14px;fill:currentColor}
@media(max-width:520px){.dl-btn{width:30px;height:30px;min-width:30px;margin-left:6px}}

/* Блоки произвольного HTML */
.html-block {
    margin: 0 auto 24px;
    width: 100%;
    max-width: var(--width);
    padding: 0;
    box-sizing: border-box;
    text-align: left;
}
.html-block-under-avatar { text-align: left; }
.html-block-footer { text-align: left; font-size: 13px; color: var(--text-muted); }

.html-editor-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 0 4px;
}

.html-editor {
    width: 100%;
    min-height: 140px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    font-family: monospace;
    box-sizing: border-box;
    resize: vertical;
}
.html-editor:focus {
    outline: none;
    border-color: var(--gold);
}

/* ========================================
   FOOTER & LOGIN
   ======================================== */
.site-footer {
    text-align: center;
    padding: 60px 0 6px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.login-inline {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: var(--card);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px var(--shadow-soft);
}
.login-inline input {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card);
    color: var(--text);
    min-width: 180px;
}

/* ========================================
   SELECTION TOOLBAR
   ======================================== */
.selection-toolbar {
    position: fixed;
    z-index: 2;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 6px 20px var(--shadow-deep);
    padding: 4px;
    display: none;
    gap: 2px;
    align-items: center;
}
.selection-toolbar::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--card);
}
.selection-toolbar.arrow-down::after {
    bottom: auto;
    top: -5px;
    border-top: none;
    border-bottom: 5px solid var(--card);
}
.sel-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sel-btn:hover { background: var(--line); }

/* ========================================
   THEME BUTTONS
   ======================================== */
.theme-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--line);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.theme-btn:hover { transform: scale(1.25); }
.theme-btn.active {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(139, 103, 63, 0.35);
}

/* ========================================
   FEEDBACK FORM
   ======================================== */
.feedback-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--line-soft);
}
.feedback-form {
    max-width: 520px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}
.feedback-form .form-group {
    display: grid;
    gap: 6px;
}
.feedback-form label {
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}
.feedback-form input:focus,
.feedback-form textarea:focus {
    outline: none;
    border-color: var(--gold);
}
.feedback-form textarea {
    min-height: 120px;
    resize: vertical;
}
.feedback-form .submit-btn {
    padding: 12px 24px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}
.feedback-form .submit-btn:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}
.feedback-form .submit-btn:active { transform: translateY(0); }
.feedback-form .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    z-index: 9999;
    box-shadow: 0 8px 30px var(--shadow-deep);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.toast.success {
    background: linear-gradient(135deg, #2d5a3d, #1e3a2a);
    color: #c8e6c9;
    border: 1px solid rgba(100, 180, 100, 0.4);
}
.toast.error {
    background: linear-gradient(135deg, #5a2d2d, #3a1e1e);
    color: #ffcdd2;
    border: 1px solid rgba(200, 80, 80, 0.4);
}
.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.toast.success .toast-icon { color: #81c784; }
.toast.error .toast-icon { color: #e57373; }

/* ========================================
   UTILS
   ======================================== */
.lyrics-toggle-inline {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    font: inherit;
    margin-left: 4px;
}
.lyrics-toggle-inline:hover { text-decoration: underline; }




.lyrics-toggle-btn {
    position: absolute;
    top: 16px;
    right: 0px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--card-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.lyrics-toggle-btn:hover {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
    box-shadow: 0 4px 14px var(--shadow-soft);
}
.lyrics-toggle-btn:active { transform: scale(0.96); }

.lyrics-text {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateX(0);
}
.lyrics-text.hidden {
    opacity: 0;
    transform: translateX(12px);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    pointer-events: none;
    visibility: hidden;
}
.lyrics-text.translation {
    transform: translateX(-12px);
    visibility: hidden;
}
.lyrics-text.translation.visible {
    transform: translateX(0);
    visibility: visible;
    position: static;
}
@media (max-width: 520px) {
    .lyrics-toggle-btn { top: 8px; right: 8px; padding: 4px 10px; font-size: 10px; }
}


.footer-bar {
  width:100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 40px 6px;
}
.footer-bar-left { flex-shrink: 0; }
.site-stats {
  flex: 1;
  text-align: right;
  font-size: 0.85em;
  color: var(--text-muted, #888);
  line-height: 1.4;
  white-space: nowrap;
}


@media (max-width: 520px) {
  .footer-bar { flex-wrap: wrap; gap: 12px; }
  .site-stats { width: 100%; text-align: left; margin-top: 4px; }
}



/* LOGIN MODAL */
.login-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: 0 24px 64px var(--shadow-deep), 0 0 0 150vmax rgba(0,0,0,0.55);
    display: none;
    flex-direction: column;
    gap: 16px;
    width: 340px;
    max-width: 90vw;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.login-modal.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
.login-modal input[type="password"] {
    width: 100%; padding: 12px; border: 1px solid var(--line);
    border-radius: 8px; font-size: 14px; background: var(--card); color: var(--text); box-sizing: border-box;
}
.login-btn-wrap { display: flex; gap: 10px; justify-content: center; }
body.login-active { overflow: hidden; }
@media (max-width: 520px) {
    .login-modal { padding: 24px; width: 90vw; }
    .login-btn-wrap { flex-direction: column; }
    .login-btn-wrap .admin-btn { width: 100%; }
}




.song-card.dragging {
    opacity: 0.5;
    transform: scale(1.01);
}
.song-card.drag-over {
    border-top: 3px solid var(--gold);
    transition: border-top 0.1s;
}
.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    color: var(--text-muted);
    font-size: 14px;
    user-select: none;
    vertical-align: middle;
    opacity: 0.6;
    transition: opacity 0.15s;
    cursor: grab;
    margin-bottom: 3px;
}
.drag-handle:hover {
    opacity: 1;
    color: var(--gold);
}
.song-card[draggable="true"]:hover .drag-handle {
    opacity: 1;
}

/* Тонкая прокрутка для форм и редакторов */
textarea, .editor-area, .html-editor {
    scrollbar-width: thin;
    scrollbar-color: #999 transparent;
}
textarea::-webkit-scrollbar,
.editor-area::-webkit-scrollbar,
.html-editor::-webkit-scrollbar {
    width: 5px;
}
textarea::-webkit-scrollbar-track,
.editor-area::-webkit-scrollbar-track,
.html-editor::-webkit-scrollbar-track {
    background: transparent;
}
textarea::-webkit-scrollbar-thumb,
.editor-area::-webkit-scrollbar-thumb,
.html-editor::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 3px;
}
textarea::-webkit-scrollbar-thumb:hover,
.editor-area::-webkit-scrollbar-thumb:hover,
.html-editor::-webkit-scrollbar-thumb:hover {
    background: #777;
}



/* ========================================
   RESPONSIVE (mobile)
   ======================================== */
@media (max-width: 520px) {
    .feedback-section { margin-top: 40px; padding-top: 30px; }
    .feedback-form input,
    .feedback-form textarea {
        font-size: 14px;
        padding: 10px 14px;
    }
    .page { padding-top: calc(var(--header-height) + 16px); }
    .avatar { width: 180px; height: 180px; }
    .avatar-upload { right: calc(50% - 90px); }
    .song-title { font-size: 30px; }
    .song-inner { padding: 18px; }
    .lyrics-text { font-size: 14px; }
    .cm-controls-minimal { gap: 10px; height: 44px; }
    .cm-btn.cm-play { width: 40px; height: 40px; min-width: 40px; }
    .cm-btn.cm-play svg { width: 18px; height: 18px; }
    .cm-time { font-size: 12px; min-width: 70px; }
    .admin-bar {
        flex-direction: column;
        gap: 16px;
        padding: 14px;
    }
    .admin-bar-section {
        width: 100%;
        justify-content: center;
    }
    .admin-bar-overlay input { width: 140px; }
    

    .admin-bar-overlay {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 14px;
    }
    .admin-bar-overlay form {
        display: contents;
    }
    .admin-bar-overlay input[type="hidden"] {
        display: none;
    }
    .admin-bar-overlay input[type="text"],
    .admin-bar-overlay input[type="email"],
    .admin-bar-overlay input[type="password"] {
        flex: 1 1 45%;
        min-width: 120px;
        max-width: 180px;
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
        border: 1px solid var(--line);
        background: var(--card);
        color: var(--text);
        order: 1;
    }
    .admin-bar-overlay .admin-btn,
    .admin-bar-overlay .btn-close {
        flex: 1 1 70px;
        max-width: 130px;
        min-width: 60px;
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 8px;
        order: 2;
        white-space: nowrap;
        text-align: center;
        justify-content: center;
    }
    .admin-bar-overlay .btn-close {
        background: transparent;
        border: 1px solid var(--line);
        color: var(--text-muted);
        width: 42px;
        height: 42px;
        min-width: 42px;
        max-width: 42px;
        padding: 0;
        font-size: 20px;
        flex: 0 0 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


/* ========================================
   PLATFORMS LINE
   ======================================== */
.platforms-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 28px 20px;
    margin: 20px auto 0;
    max-width: var(--width);
}

.platform-link {
    position: relative;
    display: inline-block;
    padding: 6px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.platform-link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-link:hover {
    color: var(--gold);
}

.platform-link:hover::after {
    transform: scaleX(1);
}

.platform-dot {
    display: inline-block;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.5;
    margin: 0 2px;
    animation: platformDotPulse 3.2s ease-in-out infinite;
}

.platform-dot:nth-child(2)  { animation-delay: 0.4s; }
.platform-dot:nth-child(4)  { animation-delay: 0.8s; }
.platform-dot:nth-child(6)  { animation-delay: 1.2s; }
.platform-dot:nth-child(8)  { animation-delay: 1.6s; }
.platform-dot:nth-child(10) { animation-delay: 2.0s; }
.platform-dot:nth-child(12) { animation-delay: 2.4s; }

@keyframes platformDotPulse {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50%      { opacity: 0.9;  transform: scale(1.4); }
}

/* Адаптив */
@media (max-width: 720px) {
    .platforms-line {
        padding: 22px 12px;
        margin-top: 20px;
    }
    .platform-link {
        padding: 5px 10px;
        font-size: 10px;
        letter-spacing: 0.14em;
    }
    .platform-dot {
        margin: 0 1px;
    }
}

@media (max-width: 480px) {
    .platforms-line {
        gap: 2px 0;
    }
    .platform-link {
        padding: 6px 8px;
        font-size: 10px;
    }
}