/* ========================================================
   BaugMusic — Design System
   Matching index.html: Inter font, #0a0a0a bg, white accent
   ======================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-base:      #0a0a0a;
    --bg-surface:   #141414;
    --bg-elevated:  #1e1e1e;
    --bg-hover:     #1a1a1a;
    --text-primary: #f5f5f5;
    --text-secondary: #999999;
    --text-muted:   #555555;
    --border:       rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --accent:       #ffffff;
    --accent-dim:   rgba(255,255,255,0.08);
    --danger:       #ef4444;
    --success:      #22c55e;
    --warning:      #f59e0b;
    --transition:   0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s ease;
    --sidebar-w:    260px;
    --player-h:     88px;
    --radius:       8px;
    --radius-lg:    12px;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.app {
    background: var(--bg-base);
    color: var(--text-primary);
    display: flex; /* Изменено с grid на flex */
    height: 100vh;
    overflow: hidden;
    padding-bottom: var(--player-h); /* Оставляем место под плеер */
}

body.admin {
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    overflow-x: hidden;
}

body.auth-page {
    background: var(--bg-base);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    grid-area: sidebar;
    background: var(--bg-base);
    border-right: 1px solid var(--border);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo strong { font-weight: 600; }
.logo i { font-size: 18px; opacity: 0.9; }

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 4px;
    padding: 0 12px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-menu li a,
.nav-menu li button {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    border-radius: var(--radius);
    transition: all var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.nav-menu li a:hover,
.nav-menu li button:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.nav-menu li a.active,
.nav-menu li button.active {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.nav-menu li a i,
.nav-menu li button i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .role { font-size: 11px; color: var(--text-secondary); }

.sidebar-logout {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--danger); }

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    background: var(--bg-base);
    overflow-y: auto;
    padding: 32px 48px;
    height: calc(100vh - var(--player-h));
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.nav-arrows {
    display: flex;
    gap: 8px;
}

.nav-arrows button {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.nav-arrows button:hover { background: var(--bg-elevated); }

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
}

.user-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 14px; font-weight: 500; }

/* ===== VIEWS ===== */
.view { display: none; }
.view.active { display: block; }

section { margin-bottom: 48px; }

h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
}

/* ===== CARD GRID ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.card {
    padding: 16px;
    border-radius: var(--radius-lg);
    transition: background var(--transition);
    cursor: pointer;
    background: transparent;
}

.card:hover { background: var(--bg-surface); }

.card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 14px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elevated);
}

.card-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-elevated);
    transition: transform var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--text-secondary);
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card:hover .card-img { transform: scale(1.03); }

.card-play-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-base);
    font-size: 14px;
    opacity: 0;
    transform: translateY(6px);
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    border: none;
    cursor: pointer;
}

.card:hover .card-play-btn { opacity: 1; transform: translateY(0); }
.card-play-btn:hover { transform: scale(1.06) !important; }
.card-play-btn.is-playing { opacity: 1; transform: translateY(0); background: var(--accent); }

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-duration {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ===== TRACK LIST (table style) ===== */
.track-list { width: 100%; border-collapse: collapse; }

.track-list thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.track-list tbody tr {
    transition: background var(--transition-fast);
    cursor: pointer;
}

.track-list tbody tr:hover td { background: var(--bg-surface); }
.track-list tbody tr.is-playing td { background: rgba(255,255,255,0.04); }
.track-list tbody tr.is-playing .tl-title { color: var(--accent); }

.track-list td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
    font-size: 14px;
}

.tl-num { color: var(--text-secondary); font-size: 13px; width: 40px; }
.tl-cover {
    width: 38px;
    height: 38px;
    border-radius: 5px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    overflow: hidden;
    flex-shrink: 0;
}
.tl-cover img { width: 100%; height: 100%; object-fit: cover; }
.tl-info { display: flex; align-items: center; gap: 12px; }
.tl-title { font-weight: 500; font-size: 14px; }
.tl-artist { color: var(--text-secondary); font-size: 13px; }
.tl-duration { color: var(--text-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-actions { opacity: 0; transition: opacity var(--transition-fast); }
.track-list tbody tr:hover .tl-actions { opacity: 1; }

/* ===== SEARCH BAR ===== */
.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.search-input {
    flex: 1;
    padding: 11px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
    max-width: 480px;
}

.search-input:focus { border-color: rgba(255,255,255,0.2); }
.search-input::placeholder { color: var(--text-secondary); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-base);
}
.btn-primary:hover { background: #e0e0e0; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-hover); }

.btn-surface {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-surface:hover { background: var(--bg-elevated); }

.btn-danger {
    background: transparent;
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 11px; }
.btn-icon { padding: 7px; width: 34px; height: 34px; justify-content: center; border-radius: 50%; }

/* ===== PLAYER BAR ===== */
.player {
    position: fixed; /* Плеер теперь всегда поверх всего внизу */
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--player-h);
    background: var(--bg-base);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 1000; /* Гарантируем видимость над контентом */
}

.track-info {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 28%;
    min-width: 0;
}

.track-art {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    overflow: hidden;
    flex-shrink: 0;
}

.track-art img { width: 100%; height: 100%; object-fit: cover; }

.track-details h4 {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.track-details p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 44%;
    max-width: 560px;
    gap: 8px;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ctrl-btn:hover { color: var(--text-primary); }
.ctrl-btn.active { color: var(--accent); }

.ctrl-btn.play-pause {
    width: 34px;
    height: 34px;
    background: var(--text-primary);
    color: var(--bg-base);
    border-radius: 50%;
    font-size: 13px;
}
.ctrl-btn.play-pause:hover { transform: scale(1.05); color: var(--bg-base); }

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.time {
    font-size: 11px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    width: 34px;
    flex-shrink: 0;
}
.time.right { text-align: right; }

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: 2px;
    width: 0%;
    pointer-events: none;
    transition: width 0.1s linear;
}

.progress-bar:hover .progress-fill { background: var(--accent); }

.extra-controls {
    width: 28%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
}

.volume-bar {
    width: 80px;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.volume-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: 2px;
    width: 80%;
}

.volume-bar:hover .volume-fill { background: var(--accent); }

/* ===== RADIO ===== */
.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.station-card {
    padding: 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
}

.station-card:hover { background: var(--bg-surface); border-color: var(--border-hover); }
.station-card.live-card { border-color: rgba(34,197,94,0.3); }

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 1.4s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.station-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.station-host { font-size: 12px; color: var(--text-secondary); }
.station-track { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(8px);
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

/* ===== FORM CONTROLS ===== */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-control:focus { border-color: rgba(255,255,255,0.2); }
.form-control::placeholder { color: var(--text-muted); }

select.form-control { appearance: none; cursor: pointer; }

/* ===== AI RECOMMENDATIONS ===== */
.ai-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.ai-banner-text h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.ai-banner-text p { font-size: 13px; color: var(--text-secondary); }

.ai-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 24px 0;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== VK SEARCH RESULTS ===== */
.vk-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.vk-result:hover { background: var(--bg-surface); }
.vk-result-cover {
    width: 44px;
    height: 44px;
    border-radius: 5px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
    flex-shrink: 0;
}
.vk-result-cover img { width: 100%; height: 100%; object-fit: cover; }
.vk-result-info { flex: 1; min-width: 0; }
.vk-result-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vk-result-artist { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.vk-result-dur { font-size: 11px; color: var(--text-muted); }
.vk-result-actions { display: flex; gap: 6px; flex-shrink: 0; opacity: 0; transition: opacity var(--transition-fast); }
.vk-result:hover .vk-result-actions { opacity: 1; }

/* ===== ADMIN SIDEBAR ===== */
.admin-sidebar {
    background: var(--bg-base);
    border-right: 1px solid var(--border);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-content {
    padding: 40px 48px;
    overflow-y: auto;
    min-height: 100vh;
}

/* ===== ADMIN TABLES ===== */
.data-table { width: 100%; border-collapse: collapse; }

.data-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 13px;
    vertical-align: middle;
}

.data-table tbody tr:hover td { background: var(--bg-surface); }

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-admin  { background: rgba(255,255,255,0.1); color: #f5f5f5; }
.badge-user   { background: rgba(255,255,255,0.04); color: var(--text-secondary); }
.badge-used   { background: rgba(239,68,68,0.1); color: #fca5a5; }
.badge-free   { background: rgba(34,197,94,0.1); color: #86efac; }
.badge-vk     { background: rgba(71,117,200,0.15); color: #7ea8e5; }
.badge-sc     { background: rgba(249,115,22,0.15); color: #fdba74; }

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--text-primary);
}

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 20px; }
.alert-error   { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); color: #86efac; }
.alert-info    { background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-secondary); }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: calc(var(--player-h) + 16px);
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    animation: slide-in 0.3s var(--transition);
    max-width: 280px;
}

.toast.success { border-color: rgba(34,197,94,0.3); color: #86efac; }
.toast.error   { border-color: rgba(239,68,68,0.3); color: #fca5a5; }

@keyframes slide-in {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* ===== EMPTY STATE ===== */
.empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-secondary);
}

.empty i { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.4; display: block; }
.empty p { font-size: 14px; }

/* ===== PAGE TITLE ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* ===== DIVIDER ===== */
.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 52px 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: rgba(255,255,255,0.3);
    background: var(--bg-surface);
}

.upload-zone i { font-size: 2rem; color: var(--text-secondary); margin-bottom: 12px; }
.upload-zone p { font-size: 14px; color: var(--text-secondary); }
.upload-zone span { color: var(--text-primary); font-weight: 500; }

/* ===== SETTINGS FORM ===== */
.settings-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ===== CODE PILL ===== */
code {
    font-family: 'Menlo', 'Consolas', monospace;
    background: var(--bg-elevated);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-primary);
}

/* ===== EQUALIZER ANIMATION ===== */
.track-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.equalizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

.equalizer.active { opacity: 1; }

.equalizer span {
    display: block;
    width: 3px;
    background: var(--accent);
    border-radius: 1px;
    animation: none;
}

.equalizer.active span:nth-child(1) { animation: eq1 0.9s ease-in-out infinite; }
.equalizer.active span:nth-child(2) { animation: eq2 0.7s ease-in-out infinite; }
.equalizer.active span:nth-child(3) { animation: eq3 1.1s ease-in-out infinite; }

@keyframes eq1 {
    0%, 100% { height: 4px; }
    50%       { height: 12px; }
}
@keyframes eq2 {
    0%, 100% { height: 10px; }
    50%       { height: 4px; }
}
@keyframes eq3 {
    0%, 100% { height: 6px; }
    33%       { height: 12px; }
    66%       { height: 3px; }
}

/* ===== PLAYER TRACK BTNS ===== */
.player-track-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
    flex-shrink: 0;
}

/* ===== LIKED TRACK BUTTON ===== */
.like-btn { transition: color var(--transition-fast); }
.like-btn.liked i { color: #ef4444; }
.like-btn.liked:hover i { color: #fca5a5; }

/* ===== LYRICS PANEL ===== */
.lyrics-panel {
    position: fixed;
    bottom: var(--player-h);
    right: 0;
    width: 360px;
    max-height: 60vh;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    animation: slide-up 0.3s var(--transition);
}

@keyframes slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.lyrics-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.lyrics-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-secondary);
    white-space: pre-line;
}

.lyrics-content.loaded { color: var(--text-primary); }

/* ===== SECTION HEADER (home playlists + all) ===== */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2 { margin-bottom: 0; }

/* ===== SECTION DIVIDER ===== */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 24px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-divider span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    white-space: nowrap;
}
