
:root {
    --bg: #080a0f;
    --panel: #10131a;
    --panel-2: #151922;
    --panel-3: #1b202b;
    --border: rgba(255,255,255,.08);
    --text: #f4f6fa;
    --muted: #8e96a5;
    --muted-2: #626a79;
    --accent: #b8d7ff;
    --accent-strong: #77b5ff;
    --progress: 0%;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 50% -15%, rgba(80,130,200,.16), transparent 38%),
        var(--bg);
    color: var(--text);
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.music-app {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 28px 22px 70px;
}

.site-header {
    display: flex;
    align-items: center;
    margin-bottom: 26px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: linear-gradient(145deg, #1b2738, #0e131d);
    color: var(--accent);
    font-weight: 800;
    letter-spacing: -.05em;
    box-shadow: 0 12px 35px rgba(0,0,0,.28);
}

.brand h1 {
    margin: 0;
    font-size: 14px;
    letter-spacing: .2em;
}

.brand span:not(.brand-mark) {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.player-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
    gap: 42px;
    padding: 34px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(25,30,40,.96), rgba(12,15,21,.98));
    box-shadow: 0 28px 80px rgba(0,0,0,.35);
}

.player-shell::before {
    content: "";
    position: absolute;
    inset: auto -10% -70%;
    height: 80%;
    background: radial-gradient(circle, rgba(95,155,230,.13), transparent 65%);
    pointer-events: none;
}

.player-cover {
    position: relative;
    aspect-ratio: 1;
    z-index: 1;
}

.player-cover img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 22px;
    background: #171b23;
    box-shadow: 0 25px 55px rgba(0,0,0,.42);
}

.cover-glow {
    position: absolute;
    z-index: 1;
    inset: 9%;
    border-radius: 25px;
    background: var(--accent-strong);
    filter: blur(45px);
    opacity: .12;
    transform: translateY(15px);
}

.player-content {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.now-playing-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
}

.pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-strong);
    box-shadow: 0 0 14px rgba(119,181,255,.8);
}

.song-artist {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.song-title {
    margin: 0;
    max-width: 650px;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -.045em;
    word-break: break-word;
}

.song-album {
    min-height: 20px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.progress-area {
    margin-top: 42px;
}

.progress-bar,
.volume-slider {
    --fill: var(--progress);
    width: 100%;
    height: 5px;
    margin: 0;
    appearance: none;
    cursor: pointer;
    border-radius: 99px;
    outline: none;
    background:
        linear-gradient(
            to right,
            var(--accent-strong) 0 var(--fill),
            #303642 var(--fill) 100%
        );
}

.progress-bar::-webkit-slider-thumb,
.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}

.progress-bar::-moz-range-thumb,
.volume-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.time-row {
    display: flex;
    justify-content: space-between;
    direction: ltr;
    margin-top: 9px;
    color: var(--muted-2);
    font-size: 11px;
}

.main-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
    direction: ltr;
}

.icon-btn,
.play-btn {
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: .18s ease;
}

.icon-btn {
    width: 44px;
    height: 44px;
}

.icon-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,.06);
}

.icon-btn.active {
    color: var(--accent-strong);
    background: rgba(119,181,255,.09);
}

.icon-btn svg,
.volume-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.play-btn {
    width: 62px;
    height: 62px;
    margin: 0 7px;
    background: #f3f6fb;
    color: #0c1017;
    box-shadow: 0 12px 30px rgba(0,0,0,.28);
}

.play-btn:hover {
    transform: scale(1.04);
}

.play-btn svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.pause-icon {
    display: none;
}

.play-btn.playing .play-icon {
    display: none;
}

.play-btn.playing .pause-icon {
    display: block;
}

.repeat-badge {
    position: absolute;
    right: 7px;
    bottom: 7px;
    display: none;
    font-size: 8px;
    font-weight: 800;
}

#repeat.repeat-one .repeat-badge {
    display: block;
}

.volume-area {
    width: 180px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 25px auto 0;
    direction: ltr;
}

.volume-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.volume-icon:hover {
    color: var(--text);
}

.volume-slider {
    --fill: 100%;
}

.volume-slider::-webkit-slider-thumb {
    width: 11px;
    height: 11px;
}

.volume-slider::-moz-range-thumb {
    width: 11px;
    height: 11px;
}

.library {
    margin-top: 38px;
}

.library-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.section-kicker {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2em;
}

.library-header h2,
.playlist-detail-header h3 {
    margin: 5px 0 0;
    font-size: 24px;
    letter-spacing: -.03em;
}

.playlist-total {
    color: var(--muted);
    font-size: 12px;
}

.library-layout {
    display: grid;
    grid-template-columns: minmax(250px, .7fr) minmax(0, 1.5fr);
    gap: 14px;
    align-items: start;
}

.playlist-list,
.playlist-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(16,19,26,.86);
}

.playlist-list {
    overflow: hidden;
}

.playlist-row {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 16px;
    text-align: left;
    color: var(--text);
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,.055);
    cursor: pointer;
    transition: .16s ease;
}

.playlist-row:last-child {
    border-bottom: 0;
}

.playlist-row:hover {
    background: rgba(255,255,255,.035);
}

.playlist-row.selected {
    background: rgba(119,181,255,.08);
}

.playlist-row.selected .playlist-chevron {
    color: var(--accent-strong);
    transform: rotate(90deg);
}

.playlist-row-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    flex: 1;
}

.playlist-chevron {
    color: var(--muted-2);
    font-size: 21px;
    line-height: 1;
    transition: .16s ease;
}

.playlist-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 650;
}

.playlist-row-count {
    color: var(--muted-2);
    font-size: 11px;
}

.playlist-playing-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--accent-strong);
    opacity: 0;
    box-shadow: 0 0 12px rgba(119,181,255,.8);
}

.playlist-row.playing .playlist-playing-dot {
    opacity: 1;
}

.playlist-row.playing .playlist-name {
    color: var(--accent);
}

.playlist-panel {
    min-height: 420px;
    overflow: hidden;
}

.panel-empty {
    min-height: 420px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 30px;
    text-align: center;
}

.empty-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--accent);
    background: var(--panel-2);
    font-size: 24px;
}

.panel-empty h3 {
    margin: 0;
    font-size: 18px;
}

.panel-empty p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.playlist-detail {
    display: none;
}

.playlist-detail.visible {
    display: block;
}

.playlist-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.sort-control select {
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    background: var(--panel-2);
    outline: none;
}

.song-list {
    max-height: 600px;
    overflow-y: auto;
}

.song-row {
    width: 100%;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,.045);
    cursor: pointer;
    transition: .15s ease;
    background: transparent;
}

.song-row:last-child {
    border-bottom: 0;
}

.song-row:hover {
    background: rgba(255,255,255,.035);
}

.song-row.active {
    background: rgba(119,181,255,.08);
}

.song-row-number {
    color: var(--muted-2);
    font-size: 11px;
    text-align: center;
}

.song-row.active .song-row-number {
    color: var(--accent-strong);
}

.song-row-info {
    min-width: 0;
}

.song-row-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #ffffff;
}

.song-row.active .song-row-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--accent);
}

.song-row-artist {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.song-row-status {
    width: 28px;
    color: var(--muted-2);
    text-align: center;
    font-size: 12px;
    visibility: hidden;
}

.song-row.active .song-row-status {
    color: var(--accent-strong);
    visibility: visible;
}

.error-box {
    display: grid;
    gap: 7px;
    padding: 22px;
    border: 1px solid rgba(255,90,100,.18);
    border-radius: 18px;
    background: rgba(80,25,30,.25);
    color: #e9aeb4;
}

@media (max-width: 820px) {
    .music-app {
        padding: 18px 13px 45px;
    }

    .player-shell {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px;
        border-radius: 23px;
    }

    .player-cover {
        width: min(76vw, 310px);
        margin: 0 auto;
    }

    .player-content {
        text-align: center;
    }

    .now-playing-label {
        justify-content: center;
    }

    .song-title {
        font-size: 29px;
    }

    .main-controls {
        gap: 6px;
    }

    .library-layout {
        grid-template-columns: 1fr;
    }

    .playlist-panel {
        min-height: 0;
    }

    .panel-empty {
        min-height: 260px;
    }

    .playlist-detail-header {
        text-align: left;
    }

    .song-list {
        max-height: 500px;
    }
}

@media (max-width: 470px) {
    .player-shell {
        padding: 15px;
    }

    .main-controls {
        gap: 0;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }

    .play-btn {
        width: 57px;
        height: 57px;
        margin: 0 3px;
    }

    .library-header {
        align-items: start;
    }

    .playlist-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .sort-control {
        width: 100%;
        justify-content: space-between;
    }

    .sort-control select {
        flex: 1;
    }
}
.music-footer {
    margin-top: 30px;
    padding: 20px 0;
    text-align: center;
    color: var(--muted-2);
    font-size: 11px;
}

.music-footer a {
    color: var(--muted-2);
    text-decoration: none;
}

.music-footer a:hover {
    color: var(--text);
}

html {
    scrollbar-color: #343a46 var(--bg);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #343a46;
    border-radius: 10px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5362;
}