:root {
    --bg: #0b0b0b;
    --panel: #141414;
    --panel-light: #1f1f1f;
    --accent: #ffcd11;
    --accent-soft: rgba(255, 205, 17, 0.2);
    --text: #ffffff;
    --muted: #b3b3b3;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    --radius-lg: 26px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.phone {
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 18px 6px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: none;
    background: var(--panel-light);
    color: var(--text);
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.player {
    padding: 8px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.cover-wrapper {
    width: 100vw;
    margin: 0 -20px;
    display: flex;
    justify-content: center;
}

.cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0 0 26px 26px;
    background: var(--panel-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.titles h3 {
    margin: 0 0 6px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.titles span {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
}

.progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress input[type=range] {
    width: 100%;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    outline: none;
}

.progress input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.progress input[type=range]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}

.times {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
}

.controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--panel-light);
    color: var(--text);
    font-size: 16px;
}

.control-btn.play {
    width: 52px;
    height: 52px;
    background: var(--accent);
    color: #0b0b0b;
    font-size: 18px;
}

.bottom-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 6px;
    color: var(--muted);
}

.bottom-row button {
    background: var(--panel-light);
    border: none;
    color: inherit;
    font-size: 16px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.bottom-row button.active {
    color: var(--accent);
}

.library {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--panel);
    border-radius: 24px 24px 0 0;
    padding: 14px 18px 24px;
    transform: translateY(70%);
    transition: transform 0.3s ease;
    max-height: 68%;
    overflow-y: auto;
}

.library.open {
    transform: translateY(0);
}

.library-handle {
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    margin: 0 auto 16px;
}

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

.library-header h4 {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.library-subtitle {
    font-size: 11px;
    color: var(--text);
    display: block;
    margin-top: 4px;
}

.pill-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: var(--panel-light);
    color: var(--text);
    font-size: 11px;
}

.folder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.folder-chip {
    padding: 8px 12px;
    border-radius: 12px;
    border: none;
    background: var(--panel-light);
    color: var(--text);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--panel-light);
    border-radius: 16px;
    padding: 10px;
    cursor: pointer;
}

.track-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.track-cover {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--accent-soft);
    overflow: hidden;
}

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

.track h5 {
    margin: 0;
    font-size: 12px;
}

.track span {
    font-size: 10px;
    color: var(--muted);
}

.fav-toggle {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 14px;
}

.fav-toggle.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.empty-message {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding: 12px 0;
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(85vw, 320px);
    background: var(--panel);
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 20;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin: 0;
}

.drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: var(--panel-light);
    color: var(--text);
    font-size: 14px;
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-section.highlight {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
}

.drawer .option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text);
}

.drawer input[type=color] {
    width: 36px;
    height: 28px;
    border: none;
    background: none;
    padding: 0;
}

.drawer select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: none;
    background: var(--panel-light);
    color: var(--text);
}

.eq-sliders {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.eq-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 10px;
    color: var(--muted);
    text-align: center;
}

.eq-control input[type=range] {
    width: 100%;
}

.drawer-playlists {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.playlist-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--panel-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.playlist-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-nav button {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: none;
    background: var(--panel-light);
    color: var(--text);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-nav button.active {
    background: var(--accent);
    color: #0b0b0b;
}

.drawer .primary-action {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #0b0b0b;
    font-weight: 600;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 420px) {
    body {
        background: #0b0b0b;
    }

    .phone {
        min-height: 100vh;
    }
}
