/* ═══════════════════════════════════════════════════════════════
   📱 MOBILE RESPONSIVE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════ */

/* Tablet & Mobile Breakpoints */
@media (max-width: 1024px) {
    .btn-back-to-cards {
        padding: 0.7rem 1.5rem !important;
        font-size: 0.9rem !important;
        top: 15px !important;
        left: 15px !important;
    }

    .btn-back-to-cards i {
        font-size: 1rem !important;
    }

    /* Warning Popup Mobile Fix */
    .warning-box {
        max-width: 90% !important;
        padding: 2.5rem 1.5rem !important;
        margin: 1rem !important;
    }

    .warning-box h2 {
        font-size: 2rem !important;
    }

    .warning-box p {
        font-size: 1rem !important;
    }

    .btn-accept {
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
        width: 100% !important;
        max-width: 300px !important;
    }
}

@media (max-width: 768px) {
    .btn-back-to-cards {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
        top: 10px !important;
        left: 10px !important;
        gap: 0.5rem !important;
        border-width: 2px !important;
        border-radius: 40px !important;
    }

    .btn-back-to-cards i {
        font-size: 0.9rem !important;
    }

    /* Header Optimizations */
    .casino-header {
        padding: 1rem 0.5rem !important;
    }

    .balance-display {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: center !important;
    }

    .balance-card {
        min-width: 120px !important;
    }

    /* Language Switcher - FIX: Sabit pozisyon */
    .language-switcher {
        padding: 0.5rem 1rem !important;
        position: relative !important;
        z-index: 100 !important;
    }

    /* Warning Popup Mobile Optimizations */
    .warning-overlay {
        padding: 1rem !important;
        overflow-y: auto !important;
    }

    .warning-box {
        max-width: 95% !important;
        padding: 2rem 1.5rem !important;
        margin: 0.5rem !important;
    }

    .warning-icon {
        font-size: 3rem !important;
        margin-bottom: 1rem !important;
    }

    .warning-box h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem !important;
    }

    .warning-box p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 0.8rem !important;
    }

    .warning-box .highlight {
        font-size: 1.2rem !important;
    }

    .btn-accept {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        width: 100% !important;
        margin-top: 1.5rem !important;
        min-height: 50px !important;
        touch-action: manipulation !important;
    }
}

@media (max-width: 480px) {
    .btn-back-to-cards {
        padding: 0.5rem 1rem !important;
        font-size: 0.75rem !important;
        top: 8px !important;
        left: 8px !important;
        gap: 0.4rem !important;
        border-radius: 30px !important;
        letter-spacing: 0.3px !important;
    }

    .btn-back-to-cards i {
        font-size: 0.8rem !important;
    }

    /* Ultra compact for very small screens */
    .btn-back-to-cards {
        /* Show only icon on very small screens */
        white-space: nowrap !important;
        overflow: hidden !important;
    }

    /* Game Menu Optimizations */
    #game-menu {
        padding: 80px 0.5rem 1rem !important;
    }

    #game-menu > div > div {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 0.8rem !important;
    }

    #game-menu button {
        padding: 1.5rem 1rem !important;
        font-size: 0.9rem !important;
    }

    #game-menu button > div:first-child {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Ultra Small Screen Warning Popup */
    .warning-box {
        max-width: 98% !important;
        padding: 1.5rem 1rem !important;
        margin: 0.3rem !important;
    }

    .warning-icon {
        font-size: 2.5rem !important;
        margin-bottom: 0.8rem !important;
    }

    .warning-box h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.8rem !important;
    }

    .warning-box p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.6rem !important;
    }

    .warning-box .highlight {
        font-size: 1.1rem !important;
    }

    .btn-accept {
        padding: 0.9rem 1.2rem !important;
        font-size: 0.95rem !important;
        width: 100% !important;
        margin-top: 1rem !important;
        min-height: 48px !important;
    }

    /* Header Mobile Fix */
    .casino-header {
        padding: 0.8rem 0.3rem !important;
    }

    .balance-display {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }

    .balance-card {
        min-width: 100px !important;
        font-size: 0.85rem !important;
    }

    .language-switcher {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .btn-back-to-cards {
        top: 8px !important;
        left: 8px !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
    }

    #game-menu {
        padding: 70px 1rem 1rem !important;
    }
}

/* Touch-Friendly Enhancements */
@media (hover: none) and (pointer: coarse) {
    .btn-back-to-cards {
        min-height: 44px !important;
        min-width: 44px !important;
        touch-action: manipulation !important;
    }

    #game-menu button {
        min-height: 120px !important;
        touch-action: manipulation !important;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn-back-to-cards {
        border-width: 2.5px !important;
    }
}
