/* ============================================================
   Sonexi Music - Professional Music Streaming UI
   Premium dark theme with glass morphism & smooth animations
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #08080d;
    --bg-secondary: #101018;
    --bg-card: rgba(22, 22, 35, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.025);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #eeeef3;
    --text-secondary: #8a8aaa;
    --text-muted: #50506a;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.2);
    --accent-glow-strong: rgba(139, 92, 246, 0.35);
    --pink: #ec4899;
    --cyan: #06b6d4;
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
    --gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
    --gradient-subtle: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(236,72,153,0.08));
    --radius: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 4px 24px var(--accent-glow);
    --player-height: 84px;
    --nav-height: 60px;
    --sidebar-width: 240px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; }

/* Selection highlight */
::selection { background: var(--accent-glow-strong); color: #fff; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ===== TOP NAVIGATION ===== */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(8, 8, 13, 0.8);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    gap: 20px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.nav-logo-img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: contain;
}
.nav-logo i {
    font-size: 24px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-center { flex: 1; max-width: 520px; margin: 0 auto; }
.search-wrapper { position: relative; }
.search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow), inset 0 1px 2px rgba(0,0,0,0.2); background: rgba(255,255,255,0.07); }
.search-input::placeholder { color: var(--text-muted); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: rgba(16, 16, 24, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 520px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 200;
}
.search-results.active { display: block; }
.search-section-header {
    padding: 10px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
    backdrop-filter: blur(10px);
}
.search-section-header i { margin-right: 6px; }
.search-loading-yt {
    padding: 14px 16px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
.search-result-item.yt-item { border-left: 3px solid var(--accent); }
.search-result-item.yt-item img { width: 64px; height: 64px; border-radius: 8px; }
.yt-badge { color: var(--accent); font-size: 14px; flex-shrink: 0; padding-right: 4px; opacity: 0.7; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.search-result-item:hover { background: rgba(255,255,255,0.05); }
.search-result-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.search-result-item .sr-info h4 { font-size: 14px; font-weight: 500; }
.search-result-item .sr-info p { font-size: 12px; color: var(--text-secondary); }

.nav-right { display: flex; gap: 6px; }
.nav-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    color: var(--text-secondary);
}
.nav-btn:hover { background: rgba(255,255,255,0.08); color: var(--accent); }

/* ===== APP LAYOUT ===== */
.app-container {
    display: flex;
    margin-top: var(--nav-height);
    height: calc(100vh - var(--nav-height) - var(--player-height));
}

/* ===== SIDEBAR ===== */
.sidebar-nav-front {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 16px 10px;
    overflow-y: auto;
    flex-shrink: 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-bottom: 2px;
}
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.sidebar-link.active { background: var(--accent-glow); color: var(--accent); font-weight: 600; }
.sidebar-link i { width: 20px; text-align: center; font-size: 15px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 16px 0; }
.sidebar-heading { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); padding: 0 14px; margin-bottom: 8px; }

/* ===== CONTENT SCROLL AREA ===== */
.content-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 32px;
}

/* ===== SECTIONS ===== */
.section { padding: 0 32px; margin-bottom: 36px; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-header h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.section-header h2 i { margin-right: 8px; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 300px;
    padding: 44px 48px !important;
    margin-bottom: 40px !important;
    border-radius: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(236,72,153,0.06), var(--bg-primary));
}
.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 50%, rgba(139,92,246,0.15), transparent 55%),
                radial-gradient(ellipse at 20% 80%, rgba(236,72,153,0.08), transparent 45%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 480px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 16px;
    border: 1px solid rgba(139, 92, 246, 0.15);
}
.hero-title { font-size: 40px; font-weight: 800; line-height: 1.1; margin-bottom: 8px; letter-spacing: -1px; }
.hero-artist { font-size: 17px; color: var(--text-secondary); margin-bottom: 24px; }
.btn-hero-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 30px;
    background: var(--gradient);
    border-radius: 50px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-hero-play:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 30px var(--accent-glow-strong); }
.hero-art { position: relative; z-index: 1; }
.hero-art img {
    width: 240px; height: 240px;
    border-radius: var(--radius-xl);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

/* ===== SONG CARDS GRID ===== */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 18px;
    max-width: 100%;
    overflow: hidden;
}
.song-card {
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius);
    padding: 10px;
    background: var(--bg-glass);
    border: 1px solid transparent;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
.song-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.song-card-cover {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.03);
    box-shadow: var(--shadow-sm);
}
.song-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.song-card:hover .song-card-cover img { transform: scale(1.08); }
.song-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.song-card:hover .song-card-overlay { opacity: 1; }
.play-btn-round {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: transform 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(4px);
}
.play-btn-round:hover { transform: scale(1.12); box-shadow: 0 6px 28px var(--accent-glow-strong); }
.song-card-info { min-width: 0; padding: 0 2px; }
.song-card-info h4 { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.song-card-info p { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Discover Card Badge */
.yt-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(139, 92, 246, 0.85);
    backdrop-filter: blur(6px);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ===== SONGS LIST (Trending) ===== */
.songs-list { display: flex; flex-direction: column; gap: 2px; }
.song-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
}
.song-list-item:hover { background: rgba(255,255,255,0.04); }
.song-rank { font-size: 15px; font-weight: 700; color: var(--text-muted); width: 28px; text-align: center; }
.song-list-item:nth-child(1) .song-rank { color: var(--orange); }
.song-list-item:nth-child(2) .song-rank { color: var(--text-secondary); }
.song-list-item:nth-child(3) .song-rank { color: #cd7f32; }
.song-list-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; box-shadow: var(--shadow-sm); }
.song-list-info { flex: 1; min-width: 0; }
.song-list-info h4 { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-list-info p { font-size: 12px; color: var(--text-secondary); }
.song-list-duration { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.song-list-plays { font-size: 12px; color: var(--text-muted); min-width: 70px; text-align: right; }

/* ===== ALBUMS HORIZONTAL SCROLL ===== */
.albums-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.albums-scroll::-webkit-scrollbar { display: none; }
.album-front-card {
    flex-shrink: 0;
    width: 170px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: var(--transition);
}
.album-front-card:hover { transform: translateY(-4px); }
.album-front-cover {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 10px;
}
.album-front-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.album-front-card:hover .album-front-cover img { transform: scale(1.05); }
.album-front-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}
.album-front-card:hover .album-front-overlay { opacity: 1; }
.album-front-card h4 { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-front-card p { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== BOTTOM PLAYER BAR ===== */
.player-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--player-height);
    background: rgba(10, 10, 16, 0.9);
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    z-index: 100;
}
.player-song-info { display: flex; align-items: center; gap: 12px; width: 250px; flex-shrink: 0; }
.player-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow-sm); }
.player-meta { min-width: 0; }
.player-title { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { display: block; font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

.player-controls { display: flex; align-items: center; gap: 10px; }
.player-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}
.player-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.player-btn.main-play {
    width: 42px; height: 42px;
    background: var(--gradient);
    color: #fff;
    font-size: 15px;
    box-shadow: var(--shadow-glow);
}
.player-btn.main-play:hover { transform: scale(1.06); box-shadow: 0 6px 28px var(--accent-glow-strong); }

.player-progress-wrap { display: flex; align-items: center; gap: 10px; flex: 1; }
.player-time { font-size: 12px; color: var(--text-muted); min-width: 36px; font-variant-numeric: tabular-nums; }
.player-progress {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s;
}
.player-progress:hover { height: 5px; }
.player-progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}
.player-progress-fill::after {
    content: '';
    position: absolute;
    right: -6px; top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}
.player-progress:hover .player-progress-fill::after { transform: translateY(-50%) scale(1); }

.player-extra { display: flex; align-items: center; gap: 8px; }
.volume-wrap { display: flex; align-items: center; gap: 6px; }
.volume-slider {
    width: 80px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    outline: none;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px; height: 11px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ===== QUEUE PANEL ===== */
.queue-panel {
    position: fixed;
    right: -360px;
    top: var(--nav-height);
    bottom: var(--player-height);
    width: 340px;
    background: rgba(16, 16, 24, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    z-index: 90;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.queue-panel.open { right: 0; }
.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}
.queue-header h3 { font-size: 16px; font-weight: 600; }
.queue-close { font-size: 18px; color: var(--text-secondary); }
.queue-list { flex: 1; overflow-y: auto; padding: 8px; }
.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}
.queue-item:hover { background: rgba(255,255,255,0.05); }
.queue-item.active { background: var(--accent-glow); }
.queue-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.queue-item-info { flex: 1; min-width: 0; }
.queue-item-info h4 { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item-info p { font-size: 11px; color: var(--text-secondary); }

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 580px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(16px); } }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-header h3 i { color: var(--red); margin-right: 8px; }
.modal-close { font-size: 20px; color: var(--text-secondary); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }

.yt-search-form { display: flex; gap: 10px; margin-bottom: 20px; }
.yt-search-form input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}
.yt-search-form input:focus { border-color: var(--accent); }
.yt-results { display: flex; flex-direction: column; gap: 8px; }
.yt-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}
.yt-result-item:hover { background: rgba(255,255,255,0.04); border-color: var(--border); }
.yt-result-item img { width: 120px; height: 68px; border-radius: 8px; object-fit: cover; }
.yt-result-info { flex: 1; min-width: 0; }
.yt-result-info h4 { font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-result-info p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.yt-result-play { color: var(--accent); font-size: 20px; flex-shrink: 0; }

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
}
.loading-overlay.active { display: flex; }
.loading-spinner { text-align: center; }
.spinner-ring {
    width: 44px; height: 44px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner p { color: var(--text-secondary); font-size: 13px; }

/* ===== FOOTER ===== */
.site-footer {
    text-align: center;
    padding: 28px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    letter-spacing: 0.2px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--border-hover); }

/* ===== BACK BUTTON ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}
.back-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* ===== ALBUM DETAIL HEADER ===== */
.album-detail-header {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 8px;
}
.album-detail-cover {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.album-detail-info { min-width: 0; }
.album-detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}
.album-detail-title {
    font-size: 36px;
    font-weight: 800;
    margin: 8px 0 4px;
    line-height: 1.1;
}
.album-detail-meta {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 8px;
}
.album-detail-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

/* ===== CATEGORY CARDS GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, color-mix(in srgb, var(--cat-color) 12%, transparent), color-mix(in srgb, var(--cat-color) 4%, transparent));
    border: 1px solid color-mix(in srgb, var(--cat-color) 15%, transparent);
    cursor: pointer;
    transition: var(--transition);
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px color-mix(in srgb, var(--cat-color) 18%, transparent);
    border-color: color-mix(in srgb, var(--cat-color) 35%, transparent);
}
.category-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cat-color) 18%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--cat-color);
    flex-shrink: 0;
}
.category-card-info { min-width: 0; }
.category-card-info h4 {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.category-card-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== MOBILE BOTTOM NAVIGATION ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(10, 10, 16, 0.92);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-top: 1px solid var(--border);
    z-index: 101;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}
.mobile-nav-item i { font-size: 18px; }
.mobile-nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mobile-nav-item.active { color: var(--accent); }
.mobile-nav-item:active { color: var(--accent-hover); }

/* ===== GENRES DRAWER (Mobile) ===== */
.genres-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
}
.genres-drawer-overlay.active { display: block; }
.genres-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    max-height: 70vh;
    background: var(--bg-secondary);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 200;
    transition: bottom 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.genres-drawer.active { bottom: 0; }
.genres-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.genres-drawer-header h3 { font-size: 17px; font-weight: 600; }
.genres-drawer-close { font-size: 18px; color: var(--text-secondary); cursor: pointer; background: none; border: none; }
.genres-drawer-list {
    overflow-y: auto;
    padding: 8px 12px 24px;
    flex: 1;
}
.genres-drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: background 0.2s;
    text-decoration: none;
}
.genres-drawer-item:active { background: rgba(255,255,255,0.06); }
.genres-drawer-item i { font-size: 16px; color: var(--accent); width: 24px; text-align: center; }
.genres-drawer-item span { font-size: 14px; }
.genres-drawer-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== PLAYER TOAST NOTIFICATIONS ===== */
.player-toast {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    right: 16px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    z-index: 999;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
    backdrop-filter: blur(16px);
    max-width: 340px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.player-toast.error { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-color: rgba(239,68,68,0.2); }
.player-toast.warning { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245,158,11,0.2); }
.player-toast.success { background: rgba(34, 197, 94, 0.15); color: #86efac; border-color: rgba(34,197,94,0.2); }
.player-toast.info { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border-color: rgba(139,92,246,0.2); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }

/* ===== SMOOTH SECTION TRANSITIONS ===== */
.section { animation: sectionFadeIn 0.4s ease; }
@keyframes sectionFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar-nav-front { display: none; }
    .mobile-nav { display: flex; }
    .player-bar { bottom: 56px; }
    .content-scroll { padding-bottom: calc(var(--player-height) + 56px + 16px); }
    .hero-title { font-size: 30px; }
    .hero-art img { width: 200px; height: 200px; }
    .queue-panel { bottom: calc(var(--player-height) + 56px); }
    .album-detail-header { gap: 20px; }
    .album-detail-cover { width: 160px; height: 160px; }
    .album-detail-title { font-size: 26px; }
    .section { padding: 0 24px; }
}
@media (max-width: 768px) {
    .hero-section { flex-direction: column; text-align: center; min-height: 200px; padding: 24px 16px !important; }
    .hero-art { display: none; }
    .hero-title { font-size: 24px; }
    .hero-artist { font-size: 14px; }
    .hero-badge { font-size: 10px; padding: 5px 12px; }
    .btn-hero-play { padding: 11px 24px; font-size: 14px; }
    .songs-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 12px; }
    .song-card { padding: 8px; }
    .song-card-cover { margin-bottom: 8px; border-radius: 10px; }
    .song-card-info h4 { font-size: 12.5px; }
    .song-card-info p { font-size: 11px; }
    .play-btn-round { width: 40px; height: 40px; font-size: 15px; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .category-card { padding: 14px; gap: 12px; }
    .category-card-icon { width: 42px; height: 42px; font-size: 17px; border-radius: 10px; }
    .section { padding: 0 16px; margin-bottom: 20px; }
    .section-header h2 { font-size: 18px; }
    .player-song-info { width: 140px; gap: 10px; }
    .player-thumb { width: 48px; height: 48px; }
    .player-progress-wrap { display: none; }
    .player-extra .volume-wrap { display: none; }
    .player-extra #btnDownload { display: none; }
    .nav-center { max-width: none; flex: 1; margin: 0 8px; }
    .search-results {
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0;
        max-height: calc(100vh - var(--nav-height) - var(--player-height) - 56px);
        border-radius: 0;
        border: none;
        border-bottom: 2px solid var(--border);
    }
    .modal { width: 95vw; max-height: 85vh; border-radius: 16px; }
    .song-list-plays { display: none; }
    .queue-panel { width: 85%; }
    .album-detail-header { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
    .album-detail-cover { width: 150px; height: 150px; border-radius: 14px; }
    .album-detail-title { font-size: 22px; }
    .album-detail-meta { font-size: 13px; }
    .song-list-item { padding: 8px 12px; gap: 12px; }
    .song-list-thumb { width: 42px; height: 42px; border-radius: 7px; }
    .song-list-info h4 { font-size: 13px; }
}
@media (max-width: 480px) {
    .top-nav { padding: 0 10px; height: 54px; }
    .nav-logo span { display: none; }
    .nav-logo-img { width: 30px; height: 30px; }
    .search-input { font-size: 13px; padding: 8px 12px 8px 34px; height: 38px; }
    .search-icon { left: 12px; font-size: 13px; }
    .songs-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .category-card { padding: 12px; gap: 10px; border-radius: 12px; }
    .category-card-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 9px; }
    .category-card-info h4 { font-size: 12.5px; }
    .category-card-info p { font-size: 10.5px; }
    .song-card { padding: 6px; border-radius: 10px; }
    .song-card-cover { border-radius: 8px; margin-bottom: 6px; }
    .song-card-info { padding: 0 1px; }
    .song-card-info h4 { font-size: 12px; }
    .song-card-info p { font-size: 10.5px; }
    .play-btn-round { width: 36px; height: 36px; font-size: 13px; }
    .yt-card-badge { width: 20px; height: 20px; font-size: 10px; top: 4px; right: 4px; border-radius: 5px; }
    .player-bar { padding: 0 10px; gap: 8px; height: 72px; bottom: 56px; }
    .player-song-info { width: 110px; gap: 8px; }
    .player-thumb { width: 40px; height: 40px; border-radius: 8px; }
    .player-title { font-size: 12.5px; }
    .player-artist { font-size: 10.5px; }
    .player-btn.main-play { width: 36px; height: 36px; font-size: 14px; }
    .player-controls { gap: 4px; }
    .player-btn { font-size: 13px; width: 30px; height: 30px; }
    .hero-title { font-size: 20px; letter-spacing: -0.5px; }
    .hero-artist { font-size: 13px; margin-bottom: 16px; }
    .hero-section { min-height: 160px; padding: 18px 12px !important; margin-bottom: 24px !important; }
    .hero-badge { font-size: 9px; padding: 4px 10px; margin-bottom: 10px; }
    .btn-hero-play { padding: 10px 22px; font-size: 13px; }
    .hero-btns .btn { padding: 10px 20px; font-size: 13px; }
    .queue-panel { width: 100%; right: -100%; }
    .section-header { margin-bottom: 12px; }
    .section-header h2 { font-size: 16px; }
    .section { padding: 0 12px; margin-bottom: 14px; }
    .song-list-item { padding: 8px 10px; gap: 10px; }
    .song-list-thumb { width: 38px; height: 38px; border-radius: 6px; }
    .song-list-info h4 { font-size: 12.5px; }
    .song-list-info p { font-size: 10.5px; }
    .song-list-duration { display: none; }
    .song-rank { width: 18px; font-size: 12px; }
    .nav-right { gap: 4px; }
    .nav-btn { width: 34px; height: 34px; font-size: 15px; }
    .mobile-nav { height: 52px; }
    .mobile-nav-item { font-size: 9px; padding: 4px 4px; gap: 2px; }
    .mobile-nav-item i { font-size: 17px; }
    .album-detail-header { gap: 12px; }
    .album-detail-cover { width: 120px; height: 120px; border-radius: 14px; }
    .album-detail-title { font-size: 20px; }
    .album-detail-meta { font-size: 12px; }
    .back-btn { font-size: 12px; padding: 6px 12px; }
    .yt-result-item { padding: 10px; gap: 10px; }
    .yt-result-item img { width: 72px; height: 44px; border-radius: 6px; }
    .yt-result-info h4 { font-size: 13px; }
    .yt-result-info p { font-size: 11px; }
    .modal-header { padding: 16px 18px; }
    .modal-header h3 { font-size: 16px; }
    .modal-body { padding: 14px 16px; }
    .yt-search-form input { padding: 10px 14px; font-size: 13px; }
    .yt-search-form { gap: 8px; }
    .content-scroll { padding-bottom: calc(72px + 52px + 16px); }
    .genres-drawer { border-top-left-radius: 16px; border-top-right-radius: 16px; }
}

/* Extra small phones (below 360px like iPhone SE) */
@media (max-width: 360px) {
    .top-nav { height: 50px; }
    .songs-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .song-card { padding: 4px; border-radius: 8px; }
    .song-card-cover { margin-bottom: 5px; border-radius: 6px; }
    .song-card-info h4 { font-size: 11px; }
    .song-card-info p { font-size: 9.5px; }
    .play-btn-round { width: 30px; height: 30px; font-size: 11px; }
    .section { padding: 0 8px; margin-bottom: 12px; }
    .section-header h2 { font-size: 14px; }
    .section-header { margin-bottom: 10px; }
    .hero-title { font-size: 18px; }
    .hero-artist { font-size: 12px; }
    .hero-section { min-height: 130px; padding: 14px 10px !important; }
    .btn-hero-play { padding: 9px 18px; font-size: 12px; }
    .player-bar { height: 64px; }
    .player-thumb { width: 36px; height: 36px; }
    .player-title { font-size: 11.5px; }
    .player-btn.main-play { width: 34px; height: 34px; font-size: 13px; }
    .mobile-nav { height: 48px; }
    .mobile-nav-item { font-size: 8px; }
    .mobile-nav-item i { font-size: 15px; }
    .content-scroll { padding-bottom: calc(64px + 48px + 12px); }
    .category-card { padding: 10px; gap: 8px; }
    .category-card-icon { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
    .category-card-info h4 { font-size: 11.5px; }
}
