:root {
    --bg: #100e0c;
    --card: #1c1815;
    --card-2: #26211c;
    --line: rgba(243, 232, 220, 0.09);
    --text: #f6f1ea;
    --muted: #8a8178;
    --num: #6a645e;
    --violet: #c9846a;
    --violet-2: #e7cfc2;
    --teal: #e8c4b0;
    --gold: #f3e7da;
}

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

html { color-scheme: dark; }

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(880px 420px at 0% -8%, rgba(201, 132, 106, 0.18), transparent 58%),
        radial-gradient(640px 320px at 100% 0%, rgba(72, 48, 38, 0.45), transparent 52%),
        var(--bg);
}

button, input { font-family: inherit; }

.top-utility-content,
.brand-row,
.player-row,
.alphabet-bar,
.categories-section,
.artists-section,
.playlist-section,
.main-footer {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 14px;
    padding-right: 14px;
}

.top-utility-bar {
    background: rgba(7, 8, 13, 0.72);
    border-bottom: 1px solid var(--line);
    padding: 6px 0;
}

.top-utility-content {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.util-link {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
}

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

.main-header {
    padding: 14px 0 8px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-row h1 {
    flex: 0 1 auto;
    margin: 0;
    font-size: 20px;
    white-space: nowrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
}

.logo-mark { width: 36px; height: 36px; }

.logo-word {
    font-size: 26px;
    font-weight: 750;
    letter-spacing: 0.4px;
}

.logo-word span { color: var(--gold); font-size: 14px; }

.brand-copy h1 {
    font-size: 26px;
    letter-spacing: 0.4px;
    background: linear-gradient(90deg, #fff8f2 0%, #e7c3b0 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.search-form { position: relative; flex: 1 1 220px; width: auto; max-width: none; min-width: 160px; }

.player-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 12px;
    align-items: stretch;
    margin-top: 12px;
}

.side-songs,
.playlist-box,
.search-results {
    scrollbar-width: thin;
    scrollbar-color: #4a433c #14110f;
}

.side-songs::-webkit-scrollbar,
.playlist-box::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.side-songs::-webkit-scrollbar-track,
.playlist-box::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
    background: #14110f;
}

.side-songs::-webkit-scrollbar-thumb,
.playlist-box::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
    background: #4a433c;
    border-radius: 99px;
}

.side-songs {
    min-height: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #14110f;
}

.side-song {
    display: flex;
    align-items: baseline;
    gap: 6px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
    color: #d7e4ee;
    text-align: left;
    font-size: 11px;
    padding: 5px 8px;
    cursor: pointer;
}

.side-num {
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 500;
    color: #6a645e;
}

.side-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-song:hover { background: rgba(150, 186, 206, 0.16); color: #fff; }
.side-song.active { background: rgba(201, 132, 106, 0.28); color: #fff; }

.side-empty {
    margin: 0;
    padding: 10px;
    color: var(--muted);
    font-size: 11px;
}

.search-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: #1c1815;
    border: 1px solid rgba(240, 210, 194, 0.28);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    padding: 6px;
}

.search-results[hidden] { display: none; }

.search-hit {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #f3e6da;
    text-align: left;
    padding: 7px 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.search-hit small {
    flex: 0 0 auto;
    color: #7c8b96;
    font-size: 10px;
    font-weight: 500;
    text-transform: none;
}

.search-hit:hover,
.search-hit.active {
    background: rgba(150, 186, 206, 0.2);
    color: #fff;
}

.search-empty {
    margin: 0;
    padding: 8px;
    color: var(--muted);
    font-size: 12px;
}

.search-form input {
    width: 100%;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
}

.search-form input:focus { outline: 1px solid var(--violet); }

.alphabet-bar { margin: 14px auto 8px; }

.alphabet-title { color: var(--muted); margin-bottom: 8px; font-size: 12px; }

.alphabet-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
}

.alphabet-link {
    flex: 1 1 0;
    min-width: 0;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    color: var(--gold);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.alphabet-all {
    flex: 1.6 1 0;
    font-size: 11px;
    letter-spacing: 0;
}

.alphabet-link.active,
.alphabet-link:hover {
    background: linear-gradient(180deg, #d7a08a 0%, #a86b52 100%);
    color: #fff;
    border-color: transparent;
}

.categories-section { margin-bottom: 18px; }

.cat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.cat-title { color: var(--violet-2); font-size: 13px; font-weight: 700; }

.hide-cats {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.hide-cats:hover { color: var(--gold); }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-flow: column;
    gap: 3px 12px;
}

.categories-grid.is-hidden { display: none; }

.cat-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
    width: 100%;
    font-size: 12px;
    font-weight: 650;
    color: var(--gold);
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    padding: 1px 0;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
}

.cat-num {
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--num);
    text-transform: none;
}

.cat-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-item::before { content: none; }

#categories .cat-item {
    color: #f3e6da;
    border-radius: 8px;
    padding: 3px 7px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#categories .cat-item:hover {
    background: rgba(201, 132, 106, 0.24);
    color: #fffaf6;
    box-shadow: inset 0 0 0 1px rgba(240, 210, 194, 0.45);
}

#categories .cat-item.active {
    background: rgba(201, 132, 106, 0.38);
    color: #fff;
}

#artist-heading { color: #c5d5df; }

#artist-list .cat-item {
    color: #d7e4ee;
    border-radius: 8px;
    padding: 3px 7px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#artist-list .cat-num { color: #7c8b96; }

#artist-list .cat-item:hover {
    background: rgba(150, 186, 206, 0.18);
    color: #f7fbff;
    box-shadow: inset 0 0 0 1px rgba(190, 214, 226, 0.4);
}

#artist-list .cat-item.active {
    background: rgba(150, 186, 206, 0.3);
    color: #fff;
}

.artists-section,
.playlist-section {
    margin-bottom: 22px;
}

.ranking-title {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.ranking-list { list-style: none; display: flex; flex-direction: column; }

.ranking-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 4px;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: inherit;
    text-align: left;
}

.rank-num { flex: 0 0 auto; font-size: 9px; font-weight: 500; color: var(--num); min-width: 18px; }
.rank-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    font-weight: 750;
    color: #f7f4ee;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ranking-item:hover .rank-name { color: var(--gold); }
.ranking-item.active .rank-name { color: var(--teal); }

.classic-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--muted);
    font-size: 12px;
}

.classic-pagination button {
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
}

.classic-pagination button:disabled { opacity: 0.35; cursor: default; }

.main-content { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.breadcrumb { font-size: 12px; color: var(--muted); }
.breadcrumb button {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}
.breadcrumb button:hover, .breadcrumb .current { color: var(--gold); }

.player-shell {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    background: linear-gradient(180deg, rgba(36, 30, 26, 0.98), rgba(20, 16, 14, 0.98));
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.video-mode {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 4;
    display: flex;
    gap: 3px;
}

.video-mode button {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 5px;
    border: 1px solid var(--line);
    background: rgba(16, 14, 12, 0.85);
    color: #8a8178;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.video-mode button.active {
    color: #f3e6da;
    border-color: rgba(201, 132, 106, 0.7);
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    isolation: isolate;
}

.player-shell.mode-zoom .video-frame { border-radius: 16px; }
.player-shell.mode-real .video-frame { border-radius: 0; }

.video-frame iframe,
#yt-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.player-shell.mode-zoom .video-frame iframe,
.player-shell.mode-zoom #yt-player {
    width: 138%;
    height: 138%;
    left: -19%;
    top: -19%;
    border-radius: 16px;
}

.player-kicker {
    color: var(--teal);
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.now-title {
    font-size: 22px;
    font-weight: 720;
    line-height: 1.25;
    margin-bottom: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-progress { display: flex; align-items: center; gap: 10px; }
.prog-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 32px; }
.prog-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
}
.prog-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #c9846a, #f0d2c2);
}

.controls { display: flex; align-items: center; gap: 10px; margin-top: 14px; }

.ctrl-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
}

.ctrl-btn.play {
    width: 54px;
    height: 54px;
    border: 0;
    font-size: 18px;
    color: #0b0c10;
    background: linear-gradient(180deg, #f0d2c2, #c9846a);
    box-shadow: 0 8px 24px rgba(201, 132, 106, 0.28);
}

.ctrl-btn.active { color: var(--gold); border-color: rgba(228, 194, 122, 0.6); }
.ctrl-btn:hover { filter: brightness(1.08); }

.playlist-grid {
    background: transparent;
    border: 0;
    border-radius: 0;
    max-height: none;
    overflow: visible;
}

#playlist .cat-item.active {
    background: rgba(201, 132, 106, 0.34);
    color: #fff;
}

.playlist-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }

.song-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-left: 3px solid transparent;
    background: transparent;
    color: #d7deea;
    cursor: pointer;
    text-align: left;
}

.song-row:hover { background: rgba(141, 124, 255, 0.08); }
.song-row.active {
    background: rgba(94, 234, 212, 0.08);
    border-left-color: var(--teal);
    color: #fff;
}
.col-num { flex: 0 0 auto; font-size: 9px; font-weight: 500; color: var(--num); min-width: 18px; }
.col-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.col-title span { color: var(--muted); font-weight: 500; }

.main-footer {
    padding-bottom: 36px;
    color: var(--muted);
    font-size: 12px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.footer-grid h2,
.footer-grid h3 {
    color: var(--text);
    font-size: 13px;
    margin-bottom: 8px;
}

.footer-grid a {
    display: block;
    color: #c9b8aa;
    text-decoration: none;
    padding: 3px 0;
}

.footer-grid a:hover { color: #fff; }

.footer-copy { margin-top: 16px; }

.legal-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.legal-page h1 {
    font-size: 28px;
    margin: 12px 0 8px;
    color: var(--text);
}

.legal-page h2 {
    font-size: 18px;
    margin: 22px 0 8px;
    color: #f3e6da;
}

.legal-page p,
.legal-page li {
    color: #d9cfc6;
    line-height: 1.55;
    font-size: 15px;
}

.legal-page ul { padding-left: 18px; margin: 8px 0 12px; }
.legal-page a { color: #e7c3b0; }
.legal-top { color: #e7c3b0; text-decoration: none; font-size: 13px; }

@media (max-width: 860px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); grid-auto-flow: row; }
    .footer-grid { grid-template-columns: 1fr; }
    .player-shell, .brand-row, .player-row { grid-template-columns: 1fr; display: flex; flex-direction: column; align-items: stretch; }
    .brand-row { flex-wrap: wrap; }
    .brand-row h1 { font-size: 16px; }
    .search-form, .player-shell { width: 100%; }
    .alphabet-link { height: 26px; font-size: 11px; border-radius: 6px; }
}
