/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
:root {
    --bg-deep-navy: #0a0f1d;
    --bg-midnight: #12192c;
    --color-dark-purple: #2a1b3d;
    --color-soft-cyan: #74f5d6;
    --color-lavender: #b0a3f7;
    --color-emerald: #38bdf8;
    
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    
    --glass-bg: rgba(18, 25, 44, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-deep-navy);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================================================
   Backgrounds & Aurora Effects
   ========================================================================== */
.aurora-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(42, 27, 61, 0.4), transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.15), transparent 50%);
    z-index: -1;
    animation: aurora-shift 20s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(5deg) scale(1.1); }
}

/* ==========================================================================
   Layout & Glassmorphism
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.glass-sidebar {
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.main-content {
    flex: 1;
    padding: 3rem;
    padding-bottom: 160px; /* <--- ADD THIS LINE */
    overflow-y: auto;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-section.active {
    display: block;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1 { font-size: 3.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
.accent-text { color: var(--color-emerald); }
.mt-2 { margin-top: 2rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary {
    background: var(--color-emerald);
    color: var(--bg-deep-navy);
}

.btn.primary:hover {
    box-shadow: 0 0 15px var(--color-emerald);
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--color-emerald);
    color: var(--color-emerald);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Sound Grid & Library Navigation Filtering
   ========================================================================== */
.category-tabs-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    scrollbar-width: none; /* Hide scrollbars */
}
.category-tabs-container::-webkit-scrollbar { display: none; }

.category-tabs {
    display: flex;
    gap: 0.75rem;
    white-space: nowrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.tab-btn:hover, .tab-btn.active {
    background: var(--glass-bg);
    color: var(--text-primary);
    border-color: var(--color-soft-cyan);
    box-shadow: 0 0 10px rgba(116, 245, 214, 0.2);
}

.sounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding-bottom: 120px; /* Space for structural overlay player */
}

/* ==========================================================================
   Sound Ambient Cards
   ========================================================================== */
.sound-card {
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sound-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}
.sound-card.playing {
    border-color: var(--color-emerald);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.sound-card-art {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--color-dark-purple), var(--bg-midnight));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.sound-card-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(10, 15, 29, 0.6));
}

.sound-card-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.sound-card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sound-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   Premium Embedded Player Deck Layer
   ========================================================================== */
.premium-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Progress Tracking Substructure */
.player-progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
.progress-bar-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.time-stamp {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: monospace;
    min-width: 35px;
}

/* Slider Controls Configuration */
.styled-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    transition: transform 0.1s ease;
}
.styled-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* Meta Data Blocks */
.player-track-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 240px;
}
.player-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.meta-text h4 { font-size: 0.95rem; margin-bottom: 0.1rem; }
.meta-text p { font-size: 0.75rem; color: var(--text-secondary); }

/* Buttons Configuration */
.btn-main-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--bg-deep-navy);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-main-play:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
}
.btn-icon-control {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}
.btn-icon-control:hover, .btn-icon-control.active { color: var(--text-primary); }

.player-central-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.player-utility-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 300px;
    justify-content: flex-end;
}

/* Dropdowns Config */
.utility-dropdown {
    position: relative;
    display: inline-block;
}
.btn-icon-utility {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
}
.dropdown-content {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    min-width: 120px;
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 110;
}
.utility-dropdown:hover .dropdown-content { display: flex; }
.dropdown-content button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    width: 100%;
}
.dropdown-content button:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.volume-slider-wrapper { width: 80px; display: flex; align-items: center; }

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Quick utility class */
.hidden { display: none !important; }

/* ==========================================================================
   UI Upgrades: Logos, Top Bar & Banners
   ========================================================================== */
.logo { display: flex; align-items: center; gap: 10px; }
.app-logo-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }

.top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.streak-badge {
    background: var(--glass-bg);
    border: 1px solid var(--color-emerald);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    color: var(--color-emerald);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

.feature-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(42, 27, 61, 0.6), rgba(18, 25, 44, 0.8));
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(116, 245, 214, 0.15);
}
.banner-img { width: 90px; height: 90px; border-radius: 18px; object-fit: cover; }
.banner-text { flex: 1; }

/* ==========================================================================
   Upgraded Image-Based Audio Player (Standard & Fullscreen Mode)
   ========================================================================== */
.premium-player {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-visuals { display: flex; align-items: center; justify-content: center; }
.player-avatar-img { 
    width: 60px; height: 60px; border-radius: 12px; object-fit: cover; 
    transition: all 0.5s ease;
}

.player-wrapper {
    display: flex; align-items: center; gap: 2rem; max-width: 1400px; margin: 0 auto;
}
.player-body { flex: 1; display: flex; flex-direction: column; }
.player-controls-row { display: flex; align-items: center; justify-content: space-between; }
.expand-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; z-index: 10; }

/* Fullscreen State */
.premium-player.fullscreen {
    height: 100vh;
    padding: 4rem 2rem;
    background: rgba(10, 15, 29, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.premium-player.fullscreen .player-wrapper {
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    gap: 3rem;
}

.premium-player.fullscreen .player-avatar-img {
    width: 350px;
    height: 350px;
    border-radius: 30px;
    box-shadow: 0 0 50px rgba(116, 245, 214, 0.2);
}

.premium-player.fullscreen .player-track-meta { text-align: center; }
.premium-player.fullscreen #player-track-title { font-size: 2rem; margin-bottom: 0.5rem; }
.premium-player.fullscreen .player-controls-row { flex-direction: column; gap: 2rem; }

/* ==========================================================================
   UI Upgrades: Logos, Top Bar & Banners
   ========================================================================== */
.logo { display: flex; align-items: center; gap: 10px; }
.app-logo-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }

.top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.streak-badge {
    background: var(--glass-bg);
    border: 1px solid var(--color-emerald);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    color: var(--color-emerald);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

.feature-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(42, 27, 61, 0.6), rgba(18, 25, 44, 0.8));
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(116, 245, 214, 0.15);
}
.banner-img { width: 90px; height: 90px; border-radius: 18px; object-fit: cover; }
.banner-text { flex: 1; }

/* ==========================================================================
   Upgraded Image-Based Audio Player (Standard & Fullscreen Mode)
   ========================================================================== */
.premium-player {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-visuals { display: flex; align-items: center; justify-content: center; }
.player-avatar-img { 
    width: 60px; height: 60px; border-radius: 12px; object-fit: cover; 
    transition: all 0.5s ease;
}

.player-wrapper {
    display: flex; align-items: center; gap: 2rem; max-width: 1400px; margin: 0 auto;
}
.player-body { flex: 1; display: flex; flex-direction: column; }
.player-controls-row { display: flex; align-items: center; justify-content: space-between; }
.expand-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; z-index: 10; }

/* Fullscreen State */
.premium-player.fullscreen {
    height: 100vh;
    padding: 4rem 2rem;
    background: rgba(10, 15, 29, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.premium-player.fullscreen .player-wrapper {
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    gap: 3rem;
}

.premium-player.fullscreen .player-avatar-img {
    width: 350px;
    height: 350px;
    border-radius: 30px;
    box-shadow: 0 0 50px rgba(116, 245, 214, 0.2);
}

.premium-player.fullscreen .player-track-meta { text-align: center; }
.premium-player.fullscreen #player-track-title { font-size: 2rem; margin-bottom: 0.5rem; }
.premium-player.fullscreen .player-controls-row { flex-direction: column; gap: 2rem; }

/* ==========================================================================
   FIXES: Sidebar Navigation Upgrades
   ========================================================================== */
.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

.nav-links a {
    text-decoration: none !important; /* Removes underlines */
    color: var(--text-secondary) !important; /* Prevents the default purple */
    font-size: 1.05rem;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    display: block;
    transition: all 0.3s ease;
    background: transparent;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
    transform: translateX(5px); /* Smooth slide effect */
}

.nav-links a.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(116, 245, 214, 0.05)) !important;
    color: var(--color-soft-cyan) !important;
    border-left: 4px solid var(--color-soft-cyan);
    font-weight: 600;
}

/* ==========================================================================
   FIXES: Slimmer Audio Player & Fullscreen Volume Bug
   ========================================================================== */
.premium-player {
    padding: 0.5rem 2rem !important; /* Made the player much slimmer */
}

.player-avatar-img { 
    width: 45px !important; /* Shrunk the image slightly to save space */
    height: 45px !important; 
}

.premium-player.fullscreen .player-controls-row {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the controls */
    width: 100%;
    gap: 2rem;
}

.premium-player.fullscreen .volume-slider-container {
    width: 100%;
    max-width: 300px;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    visibility: visible !important; /* Forces volume to show in fullscreen */
}

.premium-player.fullscreen .volume-slider-wrapper {
    flex: 1; 
}
/* ==========================================================================
   FIX: Ultra-Compact Floating Audio Player
   ========================================================================== */
.premium-player {
    position: fixed;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 95% !important;
    max-width: 1000px !important;
    border-radius: 50px !important; /* Makes it a pill shape */
    padding: 0.5rem 1.5rem !important;
    background: rgba(10, 15, 29, 0.9) !important;
    border: 1px solid rgba(116, 245, 214, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
}

.compact-wrapper {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    gap: 15px !important;
}

.player-avatar-img { 
    width: 40px !important; 
    height: 40px !important; 
    border-radius: 50% !important; 
}

.compact-meta h4 { font-size: 0.9rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

.compact-controls { gap: 0.5rem !important; }
.compact-play { width: 35px !important; height: 35px !important; font-size: 0.9rem !important; }

.compact-progress { flex: 1; max-width: 300px; margin: 0 !important; }

.player-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-mini { width: 60px !important; }
.text-red { color: #ff6b6b !important; }
.text-red:hover { color: #ff4747 !important; transform: scale(1.1); }

/* Fullscreen Mode Override */
.premium-player.fullscreen {
    bottom: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
}
.premium-player.fullscreen .compact-wrapper { flex-direction: column !important; gap: 2rem !important; }
.premium-player.fullscreen .player-avatar-img { width: 300px !important; height: 300px !important; border-radius: 20px !important; }

/* ==========================================================================
   FAQS, FOOTER & NEW PAGES
   ========================================================================== */
/* FAQ Accordion */
.faq-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
}
.faq-question:hover { background: rgba(255,255,255,0.05); color: var(--color-emerald); }
.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-secondary);
}
.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    max-height: 500px;
}
.faq-icon { transition: transform 0.3s ease; }
.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--color-emerald); }

/* Forms & Footer */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); }
.glass-input {
    width: 100%; padding: 1rem; border-radius: 10px; border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2); color: white; font-family: inherit; font-size: 1rem;
}
.glass-input:focus { outline: none; border-color: var(--color-emerald); }

.site-footer {
    margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--glass-border);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem;
    color: var(--text-secondary); font-size: 0.9rem;
}
.footer-links a { color: var(--text-secondary); text-decoration: none; margin-right: 1rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-emerald); }

/* Mobile Menu Header */
.mobile-header {
    display: none; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; background: var(--glass-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
}
.hamburger { background: none; border: none; color: white; font-size: 1.8rem; cursor: pointer; }