:root {
    --accent: #fa233b;
    --accent-soft: rgba(250, 35, 59, 0.15);
    --glass: rgba(18, 18, 20, 0.82);
    --glass-border: rgba(255, 255, 255, 0.06);
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --bezier: cubic-bezier(0.19, 1, 0.22, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --sidebar-w: 240px;
    --mini-h: 72px;
}

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

html, body {
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: #0a0a0a;
    color: #f5f5f7;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    line-height: 1.4;
}

/* ============ APP SHELL ============ */
#app-container {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
}

/* ============ DESKTOP: sidebar + content ============ */
@media (min-width: 900px) {
    #app-container {
        flex-direction: row;
    }
}

/* ============ NAVIGATION ============ */

/* Mobile: bottom tab bar */
#main-nav {
    order: 2;
    display: flex;
    background: rgba(18, 18, 20, 0.92);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-top: 1px solid var(--glass-border);
    z-index: 60;
    flex-shrink: 0;
    padding: 4px 0 max(4px, env(safe-area-inset-bottom));
}

.nav-btn {
    flex: 1;
    padding: 6px 0 4px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.25s var(--ease-out);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

.nav-btn i {
    font-size: 1.25rem;
    transition: transform 0.25s var(--spring);
}

.nav-btn.active {
    color: var(--accent);
}

.nav-btn.active i {
    transform: scale(1.1);
}

.nav-btn:active i {
    transform: scale(0.9);
}

/* Desktop: sidebar nav */
@media (min-width: 900px) {
    #main-nav {
        order: 0;
        flex-direction: column;
        width: var(--sidebar-w);
        flex-shrink: 0;
        border-top: none;
        border-right: 1px solid var(--glass-border);
        padding: 24px 0;
        gap: 2px;
        background: rgba(14, 14, 16, 0.95);
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
    }

    #main-nav::before {
        content: 'webMusic';
        display: block;
        font-size: 1.3rem;
        font-weight: 700;
        letter-spacing: -0.03em;
        padding: 0 24px 24px;
        color: #f5f5f7;
        border-bottom: 1px solid var(--glass-border);
        margin-bottom: 16px;
    }

    .nav-btn {
        flex: unset;
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        padding: 10px 24px;
        font-size: 0.9rem;
        border-radius: 0;
        margin: 0 8px;
        border-radius: var(--radius-sm);
    }

    .nav-btn i {
        font-size: 1.15rem;
        width: 20px;
        text-align: center;
    }

    .nav-btn.active {
        background: var(--accent-soft);
        color: var(--accent);
    }

    .nav-btn.active i {
        transform: none;
    }

    .nav-btn:hover:not(.active) {
        background: var(--surface-hover);
        color: rgba(255, 255, 255, 0.7);
    }
}

/* ============ VIEWS CONTAINER ============ */
.views-container {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
    order: 1;
}

.view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-out);
    will-change: opacity;
}

.view.active {
    opacity: 1;
    pointer-events: auto;
}

/* ============ VIEW HEADER ============ */
.view-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.view-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #f5f5f7;
}

@media (min-width: 900px) {
    .view-header {
        padding: 32px 40px 24px;
    }
}

/* ============ SEARCH ============ */
.search-wrap {
    position: relative;
    padding: 0 24px 20px;
    flex-shrink: 0;
}

.search-wrap input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: none;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f7;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: background 0.2s, box-shadow 0.2s;
}

.search-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-wrap input:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.search-wrap i {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

@media (min-width: 900px) {
    .search-wrap {
        padding: 0 40px 24px;
    }
    .search-wrap i {
        left: 56px;
    }
}

/* ============ TRACK LIST ============ */
.results-list,
.track-list,
.playlists-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 24px 140px;
    overscroll-behavior: contain;
}

@media (min-width: 900px) {
    .results-list,
    .track-list,
    .playlists-list {
        padding: 0 40px 120px;
    }
}

/* Hidden scrollbar for clean look */
.results-list, .track-list, .playlists-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.results-list::-webkit-scrollbar,
.track-list::-webkit-scrollbar,
.playlists-list::-webkit-scrollbar {
    width: 6px;
}
.results-list::-webkit-scrollbar-thumb,
.track-list::-webkit-scrollbar-thumb,
.playlists-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}

/* ============ TRACK ITEM ============ */
.track-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    margin: 2px 0;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.track-item:hover {
    background: var(--surface-hover);
}

.track-item:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.99);
}

.track-item img {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface);
}

.track-item .track-info {
    flex: 1;
    min-width: 0;
}

.track-item h5 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f5f5f7;
}

.track-item p {
    margin: 3px 0 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item .track-like {
    border: none;
    background: transparent;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.15);
    padding: 8px;
    flex-shrink: 0;
    transition: color 0.2s;
    cursor: pointer;
}

.track-item .track-like.liked {
    color: var(--accent);
}

.track-item .track-like:hover {
    color: rgba(255, 255, 255, 0.45);
}

.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 80px;
    font-size: 0.95rem;
}

/* Mobile: compact items */
@media (max-width: 899px) {
    .track-item {
        padding: 8px 8px;
        gap: 12px;
    }
    .track-item img {
        width: 48px;
        height: 48px;
    }
}

/* ============ PLAYLISTS ============ */
.playlist-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.playlist-card:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

.playlist-card:active {
    transform: scale(0.99);
}

.playlist-card .playlist-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.playlist-card .playlist-info {
    flex: 1;
    min-width: 0;
}

.playlist-card h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f5f5f7;
}

.playlist-meta {
    margin-top: 4px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ============ MINI PLAYER ============ */
.mini-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 55;
    background: rgba(22, 22, 26, 0.88);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-top: 1px solid var(--glass-border);
    padding: 0 16px;
    height: var(--mini-h);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transform: translateY(100%);
    transition: transform 0.45s var(--bezier);
    -webkit-tap-highlight-color: transparent;
}

/* Mobile: above the bottom nav */
.mini-bar {
    bottom: calc(52px + max(4px, env(safe-area-inset-bottom)));
}

.mini-bar.active {
    transform: translateY(0);
}

.mini-bar img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    object-fit: cover;
    background: var(--surface);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.mini-info {
    flex: 1;
    min-width: 0;
}

.mini-info h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f5f5f7;
}

.mini-info p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-bar #m-play {
    font-size: 1.4rem;
    padding: 10px;
    color: #f5f5f7;
}

/* Desktop: mini player spans from sidebar edge */
@media (min-width: 900px) {
    .mini-bar {
        left: var(--sidebar-w);
        bottom: 0;
        border-top: 1px solid var(--glass-border);
        padding: 0 32px;
    }
}

/* ============ FULL PLAYER ============ */
.player-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.55s var(--bezier);
    display: flex;
    flex-direction: column;
    will-change: transform;
    overflow: hidden;
    background: #0a0a0a;
    touch-action: pan-y;
}

.player-overlay.active {
    transform: translateY(0);
}

.player-overlay.dragging {
    transition: none;
}

/* Player background blur from album art */
.player-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(80px) brightness(0.3) saturate(1.8);
    transform: scale(1.3);
    opacity: 0;
    transition: opacity 1.2s var(--ease-out);
    z-index: 0;
}

.player-overlay.active .player-bg {
    opacity: 1;
}

.player-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(12px, env(safe-area-inset-top)) 20px 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.header-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Pull indicator (mobile) */
.player-header::before {
    content: '';
    position: absolute;
    top: max(8px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

@media (min-width: 900px) {
    .player-header::before {
        display: none;
    }
    .player-header {
        padding: 16px 32px 8px;
    }
}

/* Visualizer */
.visualizer-container {
    width: 100%;
    height: 0;
    display: none;
    align-items: flex-end;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.visualizer-container canvas {
    width: 100%;
    height: 100%;
}

@media (min-width: 1100px) and (min-height: 700px) {
    .visualizer-container {
        display: flex;
        height: 80px;
        padding: 0 32px;
        margin-bottom: 8px;
    }
}

/* Player content layout — centered vertically */
.player-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 28px max(32px, env(safe-area-inset-bottom));
    position: relative;
    z-index: 1;
    gap: 4px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 900px) {
    .player-content {
        padding: 0 40px 40px;
        max-width: 580px;
        gap: 8px;
    }
}

/* ============ ALBUM ART ============ */
.art-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 1;
    width: 100%;
    padding: 8px 0;
}

.art-stack {
    position: relative;
    width: clamp(200px, 55vmin, 360px);
    aspect-ratio: 1;
}

.art-glow {
    position: absolute;
    inset: -15px;
    background-size: cover;
    background-position: center;
    filter: blur(50px) saturate(1.5);
    opacity: 0;
    border-radius: 24px;
    animation: glow-breathe 6s ease-in-out infinite alternate;
    transition: opacity 0.8s;
}

.player-overlay.active .art-glow {
    opacity: 0.4;
}

.art-img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05);
    background: var(--surface);
}

@keyframes glow-breathe {
    from { transform: scale(1); opacity: 0.3; }
    to { transform: scale(1.05); opacity: 0.5; }
}

/* ============ SONG META ============ */
.song-meta {
    text-align: center;
    width: 100%;
    padding: 4px 0;
    flex-shrink: 0;
}

.song-meta h2 {
    font-size: clamp(1.15rem, 4vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f5f5f7;
}

.song-meta p {
    font-size: clamp(0.85rem, 3vw, 1rem);
    margin: 4px 0 0;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ LYRICS ============ */
.lyrics-section {
    width: 100%;
    max-height: 120px;
    overflow-y: auto;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    line-height: 1.7;
    flex-shrink: 0;
    scrollbar-width: none;
}

.lyrics-section::-webkit-scrollbar { display: none; }

.lyrics-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.lyrics-placeholder {
    opacity: 0.4;
    margin: 0;
    font-size: 0.85rem;
}

.lyric-line {
    margin: 6px 0;
    opacity: 0.4;
    transition: all 0.3s var(--ease-out);
    font-weight: 400;
}

.lyric-line.active {
    opacity: 1;
    color: #f5f5f7;
    font-weight: 600;
    transform: scale(1.03);
}

/* ============ SCRUBBER ============ */
.scrub-area {
    width: 100%;
    padding: 8px 0 2px;
    flex-shrink: 0;
}

.progress-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: height 0.15s;
}

.progress-bg:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: #f5f5f7;
    width: 0%;
    border-radius: 4px;
    position: relative;
}

/* Scrub handle on hover */
.progress-bg:hover .progress-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.35);
    font-variant-numeric: tabular-nums;
}

/* ============ MAIN CONTROLS ============ */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 6vw, 48px);
    padding: 8px 0;
    width: 100%;
    flex-shrink: 0;
}

.btn-control {
    border: none;
    background: none;
    color: #f5f5f7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s var(--ease-out);
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    font-size: 1.6rem;
}

.btn-control:active {
    transform: scale(0.88);
    opacity: 0.7;
}

.btn-play {
    font-size: clamp(3rem, 10vw, 4rem) !important;
}

.btn-play:active {
    transform: scale(0.92);
}

/* ============ SECONDARY CONTROLS ============ */
.secondary-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 4px 0;
    width: 100%;
    flex-shrink: 0;
}

/* ============ BUTTONS ============ */
.btn-icon {
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s var(--ease-out);
    outline: none;
    border-radius: var(--radius-sm);
    -webkit-tap-highlight-color: transparent;
}

.btn-icon:hover {
    color: rgba(255, 255, 255, 0.8);
    background: var(--surface);
}

.btn-icon:active {
    color: var(--accent);
    transform: scale(0.92);
}

.btn-icon[data-liked="true"] {
    color: var(--accent);
}

.btn-primary {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(0.98); filter: brightness(0.9); }

.btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: #f5f5f7;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover { background: var(--surface-hover); }
.btn-secondary:active { transform: scale(0.97); }

/* ============ MODALS ============ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}

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

.modal-content {
    background: #1c1c1e;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s var(--bezier);
}

.modal.open .modal-content {
    transform: translateY(0);
}

/* Desktop: center modals */
@media (min-width: 900px) {
    .modal {
        align-items: center;
    }
    .modal-content {
        border-radius: var(--radius-xl);
        max-height: 70vh;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-body {
    padding: 20px 24px 32px;
    max-height: 56vh;
    overflow-y: auto;
}

.modal-body input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f7;
    margin-bottom: 16px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.modal-body input::placeholder { color: rgba(255,255,255,0.3); }
.modal-body input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal-option {
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.modal-option:hover { background: var(--surface-hover); }
.modal-option:active { transform: scale(0.99); }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 299;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ============ BADGE ============ */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ============ INPUT ============ */
.input-text {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f7;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.input-text::placeholder { color: rgba(255,255,255,0.3); }
.input-text:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ============ GLOBAL SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(60, 60, 67, 0.92);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    color: #f5f5f7;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: 100px;
    z-index: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 900px) {
    .toast {
        bottom: 100px;
    }
}

/* ============ LOADING SPINNER ============ */
.empty-state.loading::after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    margin: 16px auto 0;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ============ TOAST / FEEDBACK ============ */
.toast {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 34, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #f5f5f7;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s var(--bezier);
    z-index: 400;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============ UTILITIES ============ */
.muted { color: rgba(255, 255, 255, 0.4); }

/* ============ ANIMATIONS ============ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading { animation: pulse 1.5s ease-in-out infinite; }

/* Fade padding for mini player space */
@media (max-width: 899px) {
    .results-list, .track-list, .playlists-list {
        padding-bottom: calc(var(--mini-h) + 80px);
    }
}

@media (min-width: 900px) {
    .results-list, .track-list, .playlists-list {
        padding-bottom: calc(var(--mini-h) + 40px);
    }
}
