/* NexusFM - Premium Mobile Styles */

@media (max-width: 768px) {
    /* General Fixes */
    body {
        overflow-x: hidden;
        width: 100%;
        padding-bottom: 7.5rem; /* Space for mobile player */
    }

    /* Typography */
    h1 { font-size: 2.1rem !important; line-height: 1.2 !important; font-weight: 900 !important; }
    h2 { font-size: 1.6rem !important; font-weight: 800 !important; }
    h3 { font-size: 1.4rem !important; font-weight: 700 !important; }

    /* Header & Navigation */
    .site-topbar { 
        display: block !important; 
        height: auto !important;
        padding: 0.6rem 0;
        background: rgba(2, 6, 23, 0.95);
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    } 

    .site-topbar-inner {
        height: auto !important;
        flex-direction: row !important;
        justify-content: center !important;
    }

    .topbar-nav { display: none !important; }
    
    .topbar-right {
        justify-content: center !important;
        width: 100% !important;
    }

    .topbar-social {
        gap: 1.25rem !important;
    }

    .topbar-social-link {
        width: 34px !important;
        height: 34px !important;
        background: rgba(255,255,255,0.03) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        border-radius: 10px !important; /* Squircle style */
        color: #fff !important;
    }
    
    header {
        height: 65px;
        background: rgba(2, 6, 23, 0.8) !important;
        backdrop-filter: blur(20px) !important;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255,255,255,0.05) !important;
    }

    /* Luxury Ticker Bar Mobile */
    .site-luxury-bar {
        padding: 0.6rem 0 !important;
        background: linear-gradient(to right, #020617, #0f172a, #020617) !important;
    }

    .site-luxury-bar .flex-col {
        display: none !important;
    }

    .site-luxury-bar .border-r {
        border: none !important;
        padding-right: 0 !important;
    }

    #ticker-container {
        animation-duration: 18s !important;
    }

    #ticker-container div {
        background: rgba(255,255,255,0.03);
        padding: 4px 12px;
        border-radius: 20px;
        border: 1px solid rgba(255,255,255,0.05);
    }

    #ticker-container span {
        font-size: 0.75rem !important;
    }

    /* Premium Mobile Drawer */
    #mobileMenu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh;
        background: linear-gradient(165deg, #0f172a 0%, #020617 100%);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        z-index: 1000;
        transition: right 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex !important;
        flex-direction: column;
        padding: 3rem 2rem;
        border-left: 1px solid rgba(255,255,255,0.08);
        box-shadow: -20px 0 80px rgba(0,0,0,0.9);
    }

    #mobileMenu.active {
        right: 0;
    }

    #mobileMenu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(to right, transparent, #FACC15, #fb923c, transparent);
        z-index: 10;
    }

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.8);
        backdrop-filter: blur(12px);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.6s ease;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    .mobile-nav-link {
        font-size: 1.2rem;
        font-weight: 800;
        color: rgba(255,255,255,0.9);
        padding: 1.25rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.02);
        display: flex;
        align-items: center;
        gap: 1.5rem;
        transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .mobile-nav-link i {
        font-size: 1.4rem;
        color: #FACC15;
        width: 30px;
        text-align: center;
        transition: transform 0.4s;
    }

    .mobile-nav-link:hover {
        color: #FACC15;
        transform: translateX(10px);
    }
    
    .mobile-nav-link:hover i {
        transform: scale(1.3) rotate(-10deg);
    }

    /* Hero Slider Mobile */
    .hero-swiper {
        height: 50vh !important;
        margin-top: 10px;
        border-radius: 20px;
        overflow: hidden;
    }
    
    .hero-swiper h1 {
        font-size: 2.3rem !important;
        text-shadow: 0 4px 12px rgba(0,0,0,0.5);
    }

    /* Player Bar Mobile - Ultra Premium Simplified */
    #playerBar {
        height: auto;
        padding: 0.85rem 1.25rem !important;
        background: rgba(2, 6, 23, 0.85);
        border-top: 1px solid rgba(255,255,255,0.08);
        backdrop-filter: blur(32px);
        box-shadow: 0 -15px 50px rgba(0,0,0,0.6);
        border-radius: 24px 24px 0 0;
    }

    #playerBar > div {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        grid-template-columns: none !important; /* Override desktop grid */
    }

    /* Hide broadcast info on mobile */
    #player-info-container {
        display: none !important;
    }

    /* Song Metadata on mobile (The RIGHT section in desktop) */
    #playerBar .justify-end {
        justify-content: flex-start !important;
        flex: 1;
        order: 1;
        display: flex !important;
    }

    /* Controls on mobile (The CENTER section in desktop) */
    #playerBar .flex.flex-col.items-center.justify-center {
        order: 2;
        flex-shrink: 0;
        display: flex !important;
    }

    #vinyl-container {
        width: 52px !important;
        height: 52px !important;
        box-shadow: 0 0 20px rgba(0,0,0,0.5), 0 0 0 3px rgba(255,255,255,0.05);
    }

    #metadata-artist {
        font-size: 0.85rem !important;
        letter-spacing: -0.01em;
        text-align: left !important;
    }

    #metadata-title {
        font-size: 0.75rem !important;
        opacity: 0.5;
        text-align: left !important;
    }

    /* Floating Controls adjustment for mobile */
    .floating-controls {
        bottom: 125px !important;
        right: 20px !important;
    }

    .whatsapp-float {
        background: linear-gradient(135deg, #25D366, #128C7E) !important;
        box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4) !important;
    }

    .back-to-top {
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
    }

    /* Animations */
    @keyframes mobileGlowPremium {
        0%, 100% { box-shadow: 0 0 20px rgba(250, 204, 21, 0.2); border-color: rgba(250, 204, 21, 0.1); }
        50% { box-shadow: 0 0 40px rgba(250, 204, 21, 0.4); border-color: rgba(250, 204, 21, 0.3); }
    }

    /* Home Page Section Reordering */
    #home-main-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    /* Make column containers transparent for flex flow */
    #home-main-grid > div.lg\:col-span-8,
    #home-main-grid > aside.lg\:col-span-4 {
        display: contents !important;
    }

    /* User Requested Order */
    #online-radios-section { order: 10 !important; }
    #top10-widget { order: 20 !important; }
    #sidebar-ad-top { order: 30 !important; }
    #weather-widget { order: 40 !important; }
    #sidebar-ad-middle { order: 50 !important; }

    /* Other Sections (Lower priority) distributed to avoid clumping */
    #podcasts-section { order: 60 !important; }
    #home-ad-1 { order: 65 !important; }
    
    #news-section { order: 70 !important; }
    #home-ad-2 { order: 75 !important; }
    
    #videos-section { order: 80 !important; }
    #home-ad-3 { order: 85 !important; }
    
    #hosts-section { order: 90 !important; }
    #home-ad-4 { order: 95 !important; }
    
    #schedule-section { order: 100 !important; }
    #home-ad-5 { order: 105 !important; }
    
    #programs-section { order: 110 !important; }
    #home-ad-6 { order: 115 !important; }
    
    #sidebar-ad-bottom { order: 120 !important; }
    #mobile-apps-section { order: 130 !important; }
    #newsletter-widget { order: 140 !important; }
    
    /* Ensure no extra margins are causing gaps */
    #home-main-grid > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    #playerBar .rounded-full.bg-\[\#1e293b\] {
        animation: mobileGlowPremium 4s infinite ease-in-out;
        border: 1px solid transparent;
    }
}

@media (max-width: 480px) {
    #metadata-title {
        max-width: 110px !important;
    }
}

