/**
 * JEST FM - Premium Mobile Experience
 * Luxury Responsive Design Overhaul
 * Integrated with Unified Luxury System
 */

@media (max-width: 1024px) {
    :root {
        --header-height-mobile: 90px;
        --safe-area-bottom: 20px;
        --luxury-radius-mobile: 30px;
    }

    /* 1. Global Optimization */
    body {
        background-color: #f8fafc;
        padding-bottom: 120px !important;
        /* Space for the sticky player */
    }

    .container {
        padding: 0 20px !important;
    }

    /* Target specific homepage headers and utility hiding */
    .hidden-mobile {
        display: none !important;
    }

    /* 2. Header & Navigation */
    .navbar {
        height: var(--header-height-mobile) !important;
        padding: 0 !important;
    }

    .navbar-inner {
        padding: 0 20px !important;
    }

    .navbar-brand img {
        height: 60px !important;
    }

    .navbar-actions {
        display: none !important;
        /* Hide request btn on desktop area */
    }

    .mobile-toggle {
        width: 48px;
        height: 48px;
        background: #f1f5f9;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #0f172a;
        font-size: 1.2rem;
        transition: all 0.3s ease;
    }

    /* 3. Luxury Mobile Menu */
    .mobile-menu {
        border-radius: 0 0 35px 35px;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.05);
        border-top: none;
        padding-top: 20px;
    }

    .mobile-menu-nav {
        padding-top: 15px !important;
    }

    .mobile-menu-link {
        padding: 12px 25px !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        border-bottom: 1px solid #f8fafc;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-menu-link i {
        width: 20px;
        color: var(--brand-red);
        font-size: 1rem;
    }

    /* 4. Luxury Panel & Cards Mobile Adjustments */
    .luxury-main-panel {
        padding: 30px 20px !important;
        border-radius: var(--luxury-radius-mobile) !important;
        margin-top: -30px !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05) !important;
    }

    .luxury-card,
    .chart-item {
        border-radius: 20px !important;
        padding: 12px 15px !important;
    }

    .chart-rank {
        width: 32px !important;
        font-size: 0.9rem !important;
    }

    .chart-cover {
        width: 45px !important;
        height: 45px !important;
        border-radius: 10px !important;
    }

    .chart-info h4 {
        font-size: 0.95rem !important;
    }

    .chart-info p {
        font-size: 0.8rem !important;
    }

    /* 5. Mobile App Premium Hero Section */
    .mobile-app-premium-hero {
        padding: 40px 25px !important;
        text-align: center;
        border-radius: 25px !important;
    }

    .mobile-app-premium-hero h2 {
        font-size: 1.8rem !important;
    }

    .mobile-app-premium-hero p {
        font-size: 1rem !important;
        margin-bottom: 30px !important;
    }

    .store-btn-luxury {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
    }

    /* 6. Professional Sticky Player (Mobile) */
    .sticky-mobile-player {
        position: fixed !important;
        bottom: 15px !important;
        left: 10px !important;
        right: 10px !important;
        height: auto !important;
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 35px !important;
        padding: 16px 20px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 15px;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
        z-index: 999999 !important;
    }

    .sticky-player-content {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    /* Play Button (Left) */
    .sticky-player-main-action {
        flex-shrink: 0;
    }

    .sticky-play-btn {
        width: 58px !important;
        height: 58px !important;
        background: #FF3D3D !important;
        border-radius: 50% !important;
        border: none !important;
        color: #fff !important;
        font-size: 1.35rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 10px 25px rgba(255, 61, 61, 0.45) !important;
    }

    /* Info & Art (Right Aligned) */
    .sticky-player-info-wrapper {
        display: flex !important;
        align-items: center !important;
        gap: 12px;
        flex-grow: 1;
        justify-content: flex-end !important;
        min-width: 0;
        cursor: pointer;
    }

    .sticky-player-info {
        text-align: right !important;
        min-width: 0;
    }

    .sticky-track-title {
        font-size: 15px !important;
        color: #fff !important;
        font-weight: 800 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block !important;
        margin-bottom: 2px;
    }

    .sticky-track-artist {
        font-size: 13px !important;
        color: rgba(255, 255, 255, 0.6) !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block !important;
    }

    .sticky-art-box {
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.05);
        flex-shrink: 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sticky-art-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sticky-live-badge {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        color: #FF3D3D !important;
        font-weight: 900 !important;
        text-transform: uppercase;
        font-size: 8px !important;
        background: rgba(255, 61, 61, 0.15);
        padding: 3px 10px;
        border-radius: 50px;
        margin-bottom: 5px;
    }

    .live-dot {
        width: 6px;
        height: 6px;
        background: #FF3D3D;
        border-radius: 50%;
        box-shadow: 0 0 10px #FF3D3D;
        animation: blink 1.2s infinite;
    }

    @keyframes blink {
        0% {
            opacity: 1;
        }

        50% {
            opacity: 0.2;
        }

        100% {
            opacity: 1;
        }
    }

    /* Volume Bar (Underneath) */
    .sticky-volume-container {
        display: flex !important;
        align-items: center;
        gap: 12px;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 12px;
    }

    .sticky-volume-container i {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.85rem;
    }

    .sticky-volume-slider {
        flex-grow: 1;
        height: 4px !important;
        -webkit-appearance: none;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 2px !important;
        outline: none;
    }

    .sticky-volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: #fff;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .sticky-art-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sticky-player-info {
        flex-grow: 1;
        min-width: 0;
    }

    .sticky-track-title {
        font-size: 14px !important;
        color: #fff !important;
        font-weight: 700 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block !important;
    }

    .sticky-track-artist {
        font-size: 12px !important;
        color: rgba(255, 255, 255, 0.5) !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block !important;
    }

    .sticky-live-badge {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        color: #FF3D3D !important;
        font-weight: 800 !important;
        text-transform: uppercase;
        font-size: 9px !important;
        background: rgba(255, 61, 61, 0.1);
        padding: 2px 8px;
        border-radius: 50px;
        margin-bottom: 2px;
    }

    .live-dot {
        width: 6px;
        height: 6px;
        background: #FF3D3D;
        border-radius: 50%;
        display: inline-block;
        box-shadow: 0 0 10px #FF3D3D;
        animation: blink 1.5s infinite;
    }

    @keyframes blink {
        0% {
            opacity: 1;
        }

        50% {
            opacity: 0.3;
        }

        100% {
            opacity: 1;
        }
    }

    /* Far right: Share */
    .sticky-player-side-actions {
        flex-shrink: 0;
    }

    .sticky-share-btn {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
    }

    /* 6.5 Volume Bar (Underneath) */
    .sticky-volume-container {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 0 5px;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 10px;
    }

    .sticky-volume-container i {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.8rem;
    }

    .sticky-volume-slider {
        flex-grow: 1;
        height: 4px !important;
        -webkit-appearance: none;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 2px !important;
        outline: none;
    }

    .sticky-volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        background: #fff;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    /* 7. Footer Optimization */
    .footer-grid {
        gap: 35px !important;
        text-align: center;
    }

    .footer-col h3::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .social-links {
        justify-content: center !important;
    }

    /* Hide Desktop Player on Mobile */
    .luxury-player {
        display: none !important;
    }

    /* 8. Page Transitions Support */
    .page-header-premium {
        padding: 120px 0 70px !important;
    }

    .page-header-premium h1 {
        font-size: 2.2rem !important;
    }
}

/* Animations */
@keyframes mobile-slide-up {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sticky-mobile-player {
    animation: mobile-slide-up 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}