:root {
    --primary: #7c4dff;
    --primary-light: #b388ff;
    --primary-dark: #651fff;
    --accent: #ffd700; /* Gold for premium HQ */
    --accent-glow: rgba(255, 215, 0, 0.35);
    --bg-dark: #08090d;
    --bg-surface: #0f111a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.07);
    --text-main: #ffffff;
    --text-dim: #a5a9b8;
    --text-muted: #626775;
    --purple-gradient: linear-gradient(135deg, #7c4dff, #3f51b5);
    --premium-gradient: linear-gradient(135deg, #ffd700, #ff8f00);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    background: radial-gradient(circle at top right, rgba(124, 77, 255, 0.15), transparent 45%),
                radial-gradient(circle at bottom left, rgba(255, 215, 0, 0.05), transparent 45%);
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: rgba(8, 9, 13, 0.95);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-glass);
    z-index: 2100;
    transition: var(--transition);
    padding: 20px 0;
}

#sidebar.open { left: 0; }

#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2050;
    display: none;
    backdrop-filter: blur(8px);
}

#sidebar.open ~ #sidebar-overlay { display: block; }

.sidebar-header {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar-logo { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3); }
.sidebar-title { font-weight: 800; font-size: 1.3rem; letter-spacing: 0.5px; background: linear-gradient(90deg, #fff, var(--text-dim)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-item {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-item i { color: var(--primary-light); width: 20px; font-size: 1.1rem; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.03); padding-left: 30px; }

/* Header */
.sticky-header {
    background: rgba(15, 17, 26, 0.7);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    z-index: 100;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.top-nav-left { display: flex; align-items: center; gap: 15px; }

.title {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #ffffff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); transform: scale(1.05); }
.icon-btn:active { transform: scale(0.95); }
.hidden { display: none !important; }

/* Main Content */
main {
    flex: 1;
    overflow-y: auto;
    background: transparent;
    color: var(--text-main);
    padding-bottom: 90px;
}

.view-container { display: none; padding: 20px; }
.view-container.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title { margin: 20px 0 12px; font-size: 1.15rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; }

.album-list { display: flex; flex-direction: column; gap: 10px; }
.album-row {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 14px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: var(--transition);
}

.album-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(124, 77, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.1);
}

.album-art-mini { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.1); }
.album-info-mini { flex: 1; }
.album-title-mini { font-weight: 700; font-size: 1.05rem; color: #fff; margin-bottom: 2px; }
.album-meta-mini { font-size: 0.8rem; color: var(--text-dim); }

.album-art-large { width: 180px; height: 180px; margin: 10px auto 25px; border-radius: 20px; overflow: hidden; box-shadow: 0 15px 35px rgba(0,0,0,0.5); border: 2px solid rgba(255,255,255,0.1); transition: var(--transition); }
.album-art-large:hover { transform: scale(1.03); border-color: var(--primary-light); }
.album-detail-header { text-align: center; margin-bottom: 30px; }
#detail-album-name { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 5px; }
#detail-album-meta { font-size: 0.9rem; color: var(--text-dim); }

.song-list { display: flex; flex-direction: column; gap: 8px; }
.song-row {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 14px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.song-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(124, 77, 255, 0.2);
    transform: scale(1.005);
}

.song-row.active {
    background: rgba(124, 77, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.15);
}
.song-row.active .song-name { color: #fff; font-weight: 700; }
.song-num { width: 35px; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; }
.song-info-main { flex: 1; min-width: 0; }
.song-name { font-weight: 600; font-size: 1rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-action { display: flex; align-items: center; justify-content: center; width: 30px; }
.song-action i { font-size: 1rem; transition: var(--transition); }
.song-row:hover .song-action i { transform: scale(1.2); }

/* Global Search Style overrides */
.search-input-header {
    position: relative;
    margin-bottom: 10px;
}
#global-search {
    width: 100%;
    padding: 14px 20px;
    border-radius: 25px !important;
    border: 1px solid var(--border-glass) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: white !important;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}
#global-search:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.25);
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Playing Audio Wave Visualizer */
.playing-wave {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    width: 16px;
    height: 16px;
}
.playing-wave span {
    width: 3px;
    height: 100%;
    background-color: var(--primary-light);
    border-radius: 1px;
    animation: waveBounce 1.2s ease-in-out infinite alternate;
    transform-origin: bottom;
}
.playing-wave span:nth-child(2) {
    animation-delay: 0.15s;
    animation-duration: 0.8s;
}
.playing-wave span:nth-child(3) {
    animation-delay: 0.3s;
    animation-duration: 1s;
}
@keyframes waveBounce {
    0% { transform: scaleY(0.15); }
    100% { transform: scaleY(1.0); }
}

/* Premium HQ Badge Styling */
.hq-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--premium-gradient);
    color: #000;
    box-shadow: 0 0 8px var(--accent-glow);
    animation: pulseGlow 2s infinite alternate;
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 4px var(--accent-glow); }
    100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.6); }
}

.hq-badge.standard {
    background: rgba(255,255,255,0.1);
    color: var(--text-dim);
    box-shadow: none;
    animation: none;
}

/* Admin Panel Styles */
.admin-card {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid var(--border-glass);
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    margin-bottom: 24px;
}

.admin-card h3 {
    margin-bottom: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.admin-btn-primary {
    background: var(--purple-gradient);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.3);
    transition: var(--transition);
}
.admin-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.4);
}
.admin-btn-primary:active {
    transform: translateY(0);
}

.admin-album-item {
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Player Bar (Bottom) */
.player-bar {
    background: rgba(15, 17, 26, 0.85);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-glass);
    padding: 10px 20px;
    height: 76px;
    display: flex;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
}

.player-content { display: flex; width: 100%; align-items: center; gap: 15px; }
.song-info { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 3px; }
#player-song-name { font-weight: 700; font-size: 1rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player-album-name { font-size: 0.8rem; color: var(--text-dim); }

.play-btn {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--purple-gradient); color: white; border: none;
    font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}
.play-btn:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(124, 77, 255, 0.45); }
.play-btn:active { transform: scale(0.95); }

/* HQ Button / Widget styles */
.hq-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}
.hq-toggle-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 215, 0, 0.08);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

/* Fullscreen Now Playing View */
.overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #10121d 0%, #050609 100%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.player-view-header {
    background: transparent;
    border-bottom: 1px solid var(--border-glass);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: white;
}
.player-view-title { flex: 1; font-weight: 700; margin-left: 15px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); }

.now-playing-info-bar {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 25px;
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--border-glass);
}

.np-music-icon { font-size: 1.5rem; color: var(--primary-light); }
.np-text { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 4px; }
.np-title { font-weight: 700; font-size: 1.05rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 0.85rem; color: var(--text-dim); }
.np-actions { display: flex; gap: 18px; align-items: center; }
.np-action-btn { background: none; border: none; color: var(--text-dim); font-size: 1.25rem; cursor: pointer; transition: var(--transition); }
.np-action-btn:hover { color: #fff; }
.np-action-btn.active { color: var(--primary-light); }

.player-view-body { flex: 1; display: flex; flex-direction: column; padding: 10px 0; align-items: center; }
#pv-main-content { width: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-around; max-height: 680px; }

.pv-album-art {
    width: 78%;
    max-width: 300px;
    aspect-ratio: 1/1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    margin: 15px 0;
    border: 1px solid rgba(255,255,255,0.15);
    position: relative;
    transition: var(--transition);
}
.pv-album-art:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 60px rgba(124, 77, 255, 0.25);
}

.pv-progress-container { width: 100%; padding: 0 32px; }
.pv-progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; cursor: pointer; position: relative; padding: 15px 0; }
.pv-progress-rail { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; position: absolute; top: 12px; }
.pv-progress-fill { height: 6px; background: var(--purple-gradient); width: 0%; border-radius: 3px; position: absolute; top: 12px; transition: width 0.1s linear; }
.pv-progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(124, 77, 255, 0.8);
    opacity: 0;
    transition: opacity 0.2s;
}
.pv-progress-bar:hover .pv-progress-fill::after { opacity: 1; }
.pv-time { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-dim); margin-top: 15px; font-weight: 600; }

.pv-controls { display: flex; align-items: center; justify-content: center; gap: 24px; width: 100%; margin-bottom: 25px; }
.pv-play-btn {
    width: 76px; height: 76px; border-radius: 50%;
    background: var(--purple-gradient); color: white; border: none;
    font-size: 2.2rem; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 25px rgba(124, 77, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}
.pv-play-btn:hover { transform: scale(1.06); box-shadow: 0 10px 30px rgba(124, 77, 255, 0.6); }
.pv-play-btn:active { transform: scale(0.95); }

.pv-btn-small { background: none; border: none; color: var(--text-dim); font-size: 1.6rem; padding: 10px; cursor: pointer; transition: var(--transition); }
.pv-btn-small:hover { color: #fff; transform: scale(1.1); }
.pv-btn-small.active { color: var(--primary-light); text-shadow: 0 0 10px rgba(124, 77, 255, 0.6); }

/* Equalizer Modal styles */
.eq-modal-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #10111a 0%, #06070a 100%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    color: white;
}
.eq-header { height: 64px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border-glass); }
.eq-switch-container { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.eq-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding-bottom: 10px; }
.eq-visual-area { height: 260px; width: 100%; position: relative; background: rgba(255,255,255,0.01); display: flex; justify-content: space-around; padding: 0 20px; z-index: 2; margin-top: 20px; border-bottom: 1px solid var(--border-glass); }
.eq-curve-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 220px; z-index: 1; pointer-events: none; opacity: 0.8; }

.eq-slider-band { display: flex; flex-direction: column; align-items: center; height: 220px; width: 55px; position: relative; z-index: 5; }
.eq-center-line { width: 1px; height: 160px; background: rgba(255,255,255,0.06); position: absolute; top: 15px; pointer-events: none; }
.eq-slider-input {
    appearance: none; -webkit-appearance: none; width: 160px; height: 40px; background: transparent;
    transform: rotate(-90deg); position: absolute; top: 75px; outline: none; margin: 0; z-index: 10; cursor: pointer;
}
.eq-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; cursor: pointer; box-shadow: 0 0 12px rgba(124, 77, 255, 0.8);
    border: 3px solid var(--primary);
    transition: var(--transition);
}
.eq-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-light);
}

.eq-freq-text { position: absolute; top: 195px; font-size: 0.8rem; font-weight: 700; color: var(--text-dim); pointer-events: none; }

.eq-preset-bar { display: flex; align-items: center; padding: 15px 24px; height: 60px; gap: 15px; cursor: pointer; z-index: 10; position: relative; border-bottom: 1px solid var(--border-glass); }
.eq-preset-bar:hover { background: rgba(255, 255, 255, 0.02); }
.eq-preset-name { flex: 1; font-size: 1.15rem; font-weight: 700; color: #fff; }

.effects-knobs-area { background: rgba(0, 0, 0, 0.25); padding: 25px 20px; display: flex; justify-content: space-around; margin-top: auto; border-top: 1px solid var(--border-glass); }
.knob-control { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.knob-wrap { width: 80px; height: 80px; position: relative; cursor: pointer; transition: var(--transition); }
.knob-wrap:hover { transform: scale(1.05); }
.knob-circle-bg { fill: none; stroke: rgba(255,255,255,0.05); stroke-width: 7; }
.knob-circle-progress { fill: none; stroke: var(--primary); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.1s; }
.knob-dot { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; background: var(--primary-light); border-radius: 50%; transform-origin: center; box-shadow: 0 0 10px var(--primary); }
.knob-label { color: var(--text-dim); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }

/* Preset Dialog */
.eq-preset-dialog { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 4000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.dialog-box { background: var(--bg-surface); border: 1px solid var(--border-glass); width: 85%; max-width: 340px; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.6); overflow: hidden; }
.dialog-list { max-height: 340px; overflow-y: auto; padding: 10px 0; }
.dialog-item { padding: 14px 25px; color: var(--text-dim); font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.dialog-item:hover { color: #fff; background: rgba(255,255,255,0.04); }
.dialog-item:active { background: rgba(124, 77, 255, 0.1); }
.dialog-actions { padding: 15px 20px; display: flex; justify-content: flex-end; border-top: 1px solid var(--border-glass); }
.dialog-btn { background: none; border: none; color: var(--primary-light); font-weight: 700; text-transform: uppercase; cursor: pointer; font-size: 0.9rem; padding: 10px 15px; border-radius: 8px; transition: var(--transition); }
.dialog-btn:hover { background: rgba(124, 77, 255, 0.1); }

/* Playlist overlay (Up Next) */
.playlist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #10121d 0%, #050609 100%);
    z-index: 2200;
    display: flex;
    flex-direction: column;
    color: #fff;
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.playlist-header { padding: 18px 24px; border-bottom: 1px solid var(--border-glass); display: flex; justify-content: space-between; align-items: center; }
.playlist-header h3 { font-size: 1.2rem; font-weight: 800; background: linear-gradient(135deg, #fff, var(--text-dim)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.playlist-list { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 8px; }

/* Ad hidden/removed from display as requested by premium visuals */
.eq-ad { display: none !important; }

/* Switch Style */
.switch { width: 50px; height: 26px; background: rgba(255,255,255,0.08); border: 1px solid var(--border-glass); border-radius: 13px; position: relative; cursor: pointer; transition: var(--transition); }
.switch.active { background: var(--primary); border-color: var(--primary-light); }
.switch .handle { width: 18px; height: 18px; background: white; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: var(--transition); box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.switch.active .handle { left: 27px; }
