/* =============================================
   ULTRATHINK: MOBILE HEADER RECONSTRUCTION
   Inspired by itembizde.com.tr mobile UX
   ============================================= */

@media (max-width: 768px) {
    /* ===== PHASE 1: HEADER SIMPLIFICATION ===== */

    .main-header {
        padding: 0 !important;
        height: 60px !important;
        background: rgba(15, 18, 25, 0.98) !important;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: sticky;
        top: 0;
        z-index: 100;
        display: flex;
        align-items: center;
        overflow: hidden !important;
    }

    .main-header .container {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .header-content {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
        padding: 0 60px !important;
        position: relative !important;
        width: 100% !important;
    }

    /* Search Icon - Absolute Left */
    .header-search {
        display: none !important;
    }

    .header-content::before {
        content: '\f002';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        cursor: pointer;
        transition: all 0.3s;
        position: absolute !important;
        left: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
    }

    .header-content::before:active {
        transform: scale(0.95);
        color: var(--primary);
    }

    /* Logo - Center */
    .header-logo {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        margin: 0 !important;
    }

    .header-logo img {
        height: 170px !important;
        width: auto !important;
        max-width: 500px !important;
        object-fit: contain !important;
    }

    /* Game Icons Bar - Remove Dark Background */
    .game-icons-bar {
        background: transparent !important;
        position: relative !important;
        z-index: 50 !important;
    }

    /* Hamburger Menu - Absolute Right */
    .mobile-toggle {
        display: flex !important;
        background: transparent !important;
        border: none !important;
        width: 44px !important;
        height: 44px !important;
        color: rgba(255, 255, 255, 0.7) !important;
        font-size: 1.3rem !important;
        position: absolute !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
    }

    .mobile-toggle:active {
        transform: scale(0.95);
        color: var(--primary);
    }

    /* Hide all other header elements */
    .header-actions>*:not(.mobile-toggle) {
        display: none !important;
    }

    .header-balance,
    .user-avatar,
    .header-icon,
    .header-login-text {
        display: none !important;
    }

    /* ===== PHASE 2: FLOATING ACTION BUTTONS ===== */

    /* Container for floating buttons */
    body::after {
        content: '';
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: linear-gradient(to top, rgba(15, 18, 25, 0.95) 0%, transparent 100%);
        pointer-events: none;
        z-index: 998;
    }

    /* İlan Pazarı - Bottom Left */
    .mobile-nav-left {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        position: fixed !important;
        bottom: 20px !important;
        left: 20px !important;
        width: 70px !important;
        height: 70px !important;
        background: linear-gradient(135deg, rgba(37, 43, 61, 0.95), rgba(26, 31, 46, 0.95)) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 16px !important;
        color: white !important;
        text-decoration: none !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
        z-index: 999 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        backdrop-filter: blur(10px) !important;
        gap: 4px !important;
    }

    .mobile-nav-left i {
        font-size: 1.4rem !important;
        margin-bottom: 2px !important;
    }

    .mobile-nav-left span {
        font-size: 0.65rem !important;
        font-weight: 600 !important;
        text-align: center !important;
        line-height: 1.1 !important;
    }

    .mobile-nav-left:active {
        transform: scale(0.95) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }

    /* Giriş Yap / User - Bottom Right */
    .mobile-nav-right {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 70px !important;
        height: 70px !important;
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(34, 211, 238, 0.1)) !important;
        border: 1px solid rgba(34, 211, 238, 0.3) !important;
        border-radius: 16px !important;
        color: var(--primary) !important;
        text-decoration: none !important;
        box-shadow: 0 8px 24px rgba(34, 211, 238, 0.2), 0 0 0 1px rgba(34, 211, 238, 0.1) inset !important;
        z-index: 999 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        backdrop-filter: blur(10px) !important;
        gap: 4px !important;
    }

    .mobile-nav-right i {
        font-size: 1.4rem !important;
        margin-bottom: 2px !important;
    }

    .mobile-nav-right span {
        font-size: 0.65rem !important;
        font-weight: 600 !important;
        text-align: center !important;
        line-height: 1.1 !important;
    }

    .mobile-nav-right:active {
        transform: scale(0.95) !important;
        box-shadow: 0 4px 12px rgba(34, 211, 238, 0.15) !important;
    }

    /* ===== PHASE 3: NAVIGATION BAR ADJUSTMENTS ===== */

    .main-nav {
        display: none !important;
    }

    /* ===== SAFE AREA INSETS (for notched devices) ===== */

    @supports (padding: max(0px)) {
        .mobile-nav-left {
            bottom: max(20px, env(safe-area-inset-bottom)) !important;
            left: max(20px, env(safe-area-inset-left)) !important;
        }

        .mobile-nav-right {
            bottom: max(20px, env(safe-area-inset-bottom)) !important;
            right: max(20px, env(safe-area-inset-right)) !important;
        }
    }

    /* ===== MICRO-INTERACTIONS ===== */

    @keyframes float-in {
        from {
            opacity: 0;
            transform: translateY(20px) scale(0.9);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .mobile-nav-left,
    .mobile-nav-right {
        animation: float-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    }

    .mobile-nav-left {
        animation-delay: 0.1s;
    }

    .mobile-nav-right {
        animation-delay: 0.2s;
    }

    /* ===== PERFORMANCE OPTIMIZATION ===== */

    .mobile-nav-left,
    .mobile-nav-right {
        will-change: transform;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ===== TABLET BREAKPOINT (768px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {

    .mobile-nav-left,
    .mobile-nav-right {
        display: none !important;
    }

    /* SADECE MOBİL - Modern Pill Login Button Override */
    .mobile-nav-right {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 6px 12px !important;
        border-radius: 999px !important;
        background: rgba(255,255,255,0.08) !important;
        border: 1px solid rgba(255,255,255,0.15) !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        color: #fff !important;
        white-space: nowrap !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
    }

    .mobile-nav-right:hover,
    .mobile-nav-right:active {
        background: rgba(0,200,255,0.18) !important;
        border-color: rgba(0,200,255,0.4) !important;
        color: white !important;
    }

    .mobile-nav-right i {
        font-size: 14px !important;
        width: 28px !important;
        height: 28px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1.5px solid rgba(255,255,255,0.4) !important;
        border-radius: 50% !important;
        background: rgba(255,255,255,0.1) !important;
    }

    .mobile-nav-right span {
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
    }
}