/*--------------------------------------------------------------
>>> ENHANCED MOBILE MENU - SLIDE-IN DRAWER WITH KILLER FEATURES
----------------------------------------------------------------
Beautiful slide-in menu with icons, badges, and premium features
--------------------------------------------------------------*/

/* Backdrop Overlay */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.menu-open .menu-backdrop {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile Menu Drawer */
@media (max-width: 991px) {
    .header-bottom {
        position: fixed;
        top: 0;
        right: -100%;
        width: 90%;
        max-width: 380px;
        height: 100vh;
        background: linear-gradient(180deg, #ffffff 0%, #f8fffe 100%);
        box-shadow: -8px 0 40px rgba(16, 185, 129, 0.2);
        z-index: 999;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.menu-open .header-bottom {
        right: 0;
    }

    /* Menu Header */
    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 25px;
        background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
        position: relative;
        overflow: hidden;
    }

    .mobile-menu-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
        border-radius: 50%;
    }

    .mobile-menu-logo {
        font-size: 24px;
        font-weight: 800;
        color: #ffffff;
        text-decoration: none;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        letter-spacing: -0.5px;
        position: relative;
        z-index: 1;
    }

    .mobile-menu-close {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: none;
        position: relative;
        z-index: 1;
        backdrop-filter: blur(10px);
    }

    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.35);
        transform: rotate(90deg) scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .mobile-menu-close i {
        color: #ffffff;
        font-size: 20px;
    }

    /* Navigation Menu */
    .platform-navigation {
        max-height: none;
        overflow: visible;
        padding: 20px 15px;
    }

    .platform-menu {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .platform-menu li {
        list-style: none;
    }

    /* Card-Style Menu Items with Icons */
    .platform-menu a {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 20px;
        color: #1f2937;
        text-decoration: none;
        font-size: 16px;
        font-weight: 600;
        background: #ffffff;
        border-radius: 14px;
        border: 2px solid transparent;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .platform-menu a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(180deg, #10b981 0%, #06b6d4 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .platform-menu a:hover {
        background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
        border-color: #10b981;
        transform: translateX(4px);
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
    }

    .platform-menu a:hover::before {
        opacity: 1;
    }

    .platform-menu a.current {
        background: linear-gradient(135deg, #d1fae5 0%, #cffafe 100%);
        border-color: #10b981;
        color: #065f46;
        font-weight: 700;
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
    }

    .platform-menu a.current::before {
        opacity: 1;
    }

    /* Icon Container */
    .platform-menu a i {
        font-size: 22px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
        border-radius: 10px;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .platform-menu a:hover i {
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    }

    /* Platform-Specific Icon Colors */
    .platform-menu a[href*="windows"] i {
        color: #0078d4;
        background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    }

    .platform-menu a[href*="android"] i {
        color: #3ddc84;
        background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    }

    .platform-menu a[href*="mac"] i {
        color: #000000;
        background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    }

    .platform-menu a[href*="games"] i,
    .platform-menu a[href*="game"] i {
        color: #ef4444;
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    }

    .platform-menu a[href*="ebook"] i,
    .platform-menu a[href*="course"] i {
        color: #f59e0b;
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    }

    /* Premium Badge (Gold Crown) */
    .premium-badge {
        margin-left: auto;
        color: #f59e0b;
        font-size: 18px;
        animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {

        0%,
        100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.1);
        }
    }

    /* Menu Footer */
    .mobile-menu-footer {
        padding: 25px;
        border-top: 1px solid #e5e7eb;
        margin-top: auto;
        background: linear-gradient(180deg, transparent 0%, #f9fafb 100%);
    }

    .mobile-menu-footer p {
        font-size: 13px;
        color: #6b7280;
        margin: 0;
        text-align: center;
        font-weight: 500;
    }
}

/* Desktop - Hide mobile menu elements */
@media (min-width: 992px) {
    .menu-backdrop {
        display: none;
    }

    .mobile-menu-header {
        display: none;
    }

    .header-bottom {
        position: static;
        width: auto;
        height: auto;
        box-shadow: none;
    }
}

/* Custom Scrollbar */
.header-bottom::-webkit-scrollbar {
    width: 8px;
}

.header-bottom::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.header-bottom::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981 0%, #06b6d4 100%);
    border-radius: 10px;
}

.header-bottom::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #059669 0%, #0891b2 100%);
}

/* Smooth Entry Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.menu-open .platform-menu li {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

body.menu-open .platform-menu li:nth-child(1) {
    animation-delay: 0.05s;
}

body.menu-open .platform-menu li:nth-child(2) {
    animation-delay: 0.1s;
}

body.menu-open .platform-menu li:nth-child(3) {
    animation-delay: 0.15s;
}

body.menu-open .platform-menu li:nth-child(4) {
    animation-delay: 0.2s;
}

body.menu-open .platform-menu li:nth-child(5) {
    animation-delay: 0.25s;
}

body.menu-open .platform-menu li:nth-child(6) {
    animation-delay: 0.3s;
}

body.menu-open .platform-menu li:nth-child(7) {
    animation-delay: 0.35s;
}

body.menu-open .platform-menu li:nth-child(8) {
    animation-delay: 0.4s;
}

body.menu-open .mobile-menu-footer {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}