/*
 * Mobile Unified CSS - COMPREHENSIVE CONSOLIDATION
 * ================================================
 * 
 * This file consolidates ALL mobile styles from:
 * - mobile-consolidated.css
 * - mobile-nav-fix.css
 * - mobile-nav-embedded.css
 * - revenueqr-unified.css (mobile sections)
 * - main.css (mobile sections)
 * - business-theme-fixes.css (mobile sections)
 * 
 * ELIMINATES ALL CONFLICTS AND DUPLICATES
 * 
 * Generated: 2025-01-27 for Performance Optimization
 * Total consolidation: 6 files → 1 file
 */

/* ========================================
   CRITICAL MOBILE VISIBILITY FIXES
   ======================================== */

/* CRITICAL: Ensure content is visible on mobile */
@media (max-width: 991.98px) {
    body, html {
        overflow: visible !important;
        height: auto !important;
        position: static !important;
    }
    
    main {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* Don't override vote page container */
    .container-fluid:not(.vote-page-container), .container:not(.vote-page-container) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Keep elements visible but do NOT change the default flex behaviour of Bootstrap rows */
    .card, .col-md-6, .col-lg-4, .col-12 {
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ========================================
   MOBILE NAVIGATION - UNIFIED & CONFLICT-FREE
   ======================================== */

/* Mobile Navigation Fixes - SINGLE SOURCE OF TRUTH */
@media (max-width: 991.98px) {
    /* Fix navbar container layout - don't affect vote page */
    .navbar .container:not(.vote-page-container) {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    
    /* Fix navbar brand positioning */
    .navbar-brand {
        order: 1 !important;
        margin-right: auto !important;
    }
    
    /* Fix hamburger button positioning */
    .navbar-toggler {
        order: 2 !important;
        margin-left: auto !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        padding: 0.25rem 0.5rem !important;
        font-size: 1.1rem !important;
        border-radius: 0.375rem !important;
        position: relative !important;
        z-index: 1051 !important; /* STANDARDIZED Z-INDEX */
        min-width: 44px !important; /* TOUCH TARGET STANDARD */
        min-height: 44px !important; /* TOUCH TARGET STANDARD */
    }
    
    .navbar-toggler:focus {
        text-decoration: none !important;
        outline: 0 !important;
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25) !important;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        width: 1.2em !important;
        height: 1.2em !important;
    }
    
    /* Fix mobile navbar collapse - STANDARDIZED */
    .navbar-collapse {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(30, 60, 114, 0.98) !important; /* STANDARDIZED BACKGROUND */
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-top: none !important;
        border-radius: 0 0 15px 15px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
        z-index: 1040 !important; /* STANDARDIZED Z-INDEX */
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Mobile dropdown menu fixes - STANDARDIZED */
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none !important;
        width: auto !important;
        margin-top: 0 !important;
        background-color: rgba(30, 60, 114, 0.98) !important; /* STANDARDIZED BACKGROUND */
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 0.5rem !important;
        margin: 0.5rem 1rem !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    }

    /* Strong mobile dropdown fixes: ensure opaque background and readable items */
    .navbar .dropdown-menu,
    .navbar-nav .dropdown-menu,
    .navbar-collapse .navbar-nav .dropdown-menu {
        background: rgba(30, 60, 114, 0.98) !important;
        background-color: rgba(30, 60, 114, 0.98) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.35) !important;
        z-index: 12000 !important;
        position: static !important; /* keep within collapse flow on mobile */
        width: calc(100% - 2rem) !important;
        margin: 0.5rem 1rem !important;
    }

    .navbar .dropdown-item,
    .navbar-nav .dropdown-item {
        color: rgba(255,255,255,0.95) !important;
        background: transparent !important;
        padding: 0.85rem 1.25rem !important;
    }

    .navbar .dropdown-item:hover,
    .navbar-nav .dropdown-item:hover {
        background: rgba(255,255,255,0.06) !important;
        color: #ffffff !important;
    }
    
    /* Mobile nav links - STANDARDIZED TOUCH TARGETS */
    .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 1rem 1.5rem !important;
        min-height: 44px !important; /* TOUCH TARGET STANDARD */
        display: flex !important;
        align-items: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        font-size: 1.1rem !important;
        transition: all 0.15s ease-in-out !important;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 5px !important;
    }
    
    /* Mobile dropdown items - STANDARDIZED */
    .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 0.75rem 1.5rem !important;
        min-height: 44px !important; /* TOUCH TARGET STANDARD */
        display: flex !important;
        align-items: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        transition: all 0.15s ease-in-out !important;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
    }
    
    /* Mobile navbar brand optimization */
    .navbar-brand {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: #ffffff !important;
    }
    
    .navbar-brand img {
        height: 24px !important;
        width: auto !important;
    }
    
    .navbar-brand span {
        font-size: 0.9rem !important;
    }
}

/* ========================================
   MOBILE NAVIGATION - CRITICAL FIXES
   ======================================== */

@media (max-width: 991.98px) {
    /* CRITICAL: Force navbar-collapse background - OVERRIDE ALL OTHER RULES */
    .navbar-collapse,
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background: rgba(30, 60, 114, 0.98) !important;
        background-color: rgba(30, 60, 114, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-top: none !important;
        border-radius: 0 0 15px 15px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
        z-index: 1040 !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Ensure navbar-nav inside collapse also has background */
    .navbar-collapse .navbar-nav,
    .navbar-collapse .navbar-nav .nav-link,
    .navbar-collapse .navbar-nav .dropdown-menu {
        background: rgba(30, 60, 114, 0.98) !important;
        background-color: rgba(30, 60, 114, 0.98) !important;
    }
}

/* ========================================
   MOBILE LAYOUT OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
    /* Mobile container optimization - don't override vote page */
    .container:not(.vote-page-container) {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Mobile card overflow fixes */
    /* Allow overflow visible specifically inside dashboard cards to prevent dropdown clipping */
    .card {
        overflow: hidden !important;
        word-wrap: break-word !important;
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    .card.dashboard-card,
    .dashboard-card .card-body {
        overflow: visible !important;
    }
    
    /* Mobile button optimization - STANDARDIZED TOUCH TARGETS */
    .btn {
        min-height: 44px !important; /* TOUCH TARGET STANDARD */
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Fix vote card button layout */
    .vote-card .vote-buttons {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .vote-card .vote-buttons .btn {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Fix business card buttons */
    .business-card .btn,
    .card .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Fix button groups */
    .card .btn-group {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .card .btn-group .btn {
        width: 100% !important;
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Improve card content readability */
    .card-body {
        padding: 1rem !important;
    }
    
    .card-title,
    .card-text {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    /* Prevent horizontal scroll */
    * {
        max-width: 100% !important;
    }
    
    /* Mobile table optimization */
    .table-responsive {
        border: none !important;
        border-radius: 0 !important;
    }
    
    /* Mobile modal optimization */
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    /* Mobile dropdown optimization */
    .dropdown-menu {
        border-radius: 10px !important;
        margin-top: 0.5rem !important;
    }
}

/* ========================================
   SMALL MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 576px) {
    /* Optimize hamburger button for small screens */
    .navbar-toggler {
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 0.25rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Ensure proper spacing on very small screens - don't affect vote page */
    .navbar .container:not(.vote-page-container) {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Optimize navbar brand for small screens */
    .navbar-brand img {
        height: 20px !important;
    }
    
    .navbar-brand span {
        font-size: 0.8rem !important;
    }
    
    /* Optimize main content for small screens */
    main {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    /* Optimize container for small screens - don't override vote page */
    .container-fluid:not(.vote-page-container) {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

/* ========================================
   USER DASHBOARD MOBILE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    /* User dashboard cards - more compact */
    .card.gradient-card-primary {
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    
    .card.gradient-card-primary .card-body {
        padding: 1rem !important;
    }
    
    .card.gradient-card-primary h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .card.gradient-card-primary p {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* User stats grid - stack on mobile */
    .card.bg-gradient-primary .row .col-md-4 {
        margin-bottom: 1rem !important;
    }
    
    .card.bg-gradient-primary .row .col-md-4:last-child {
        margin-bottom: 0 !important;
    }
    
    .card.bg-gradient-primary h3 {
        font-size: 1.8rem !important;
    }
    
    .card.bg-gradient-primary p {
        font-size: 0.8rem !important;
    }
    
    /* User avatar section - more compact */
    .d-flex.align-items-center.mb-3 {
        min-height: 80px !important;
        padding: 0.75rem !important;
    }
    
    .d-flex.align-items-center.mb-3 img {
        max-width: 60px !important;
    }
    
    .d-flex.align-items-center.mb-3 h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .d-flex.align-items-center.mb-3 p {
        font-size: 0.8rem !important;
        margin-bottom: 0 !important;
    }
    
    /* Spin wheel container - responsive sizing */
    .spin-wheel-container {
        max-width: 100% !important;
        padding: 0.5rem !important;
    }
    
    /* Prize rarity cards - better mobile layout */
    .rarity-legend {
        gap: 0.5rem !important;
    }
    
    .rarity-item {
        min-width: 80px !important;
        max-width: 90px !important;
        padding: 0.5rem 0.25rem !important;
    }
    
    .rarity-item .small {
        font-size: 0.6rem !important;
    }
    
    .rarity-item img {
        width: 20px !important;
        height: 20px !important;
    }
    
    .rarity-item i {
        font-size: 1em !important;
    }
}

@media (max-width: 576px) {
    /* Extra small mobile - even more compact */
    .card.gradient-card-primary h3 {
        font-size: 1.3rem !important;
    }
    
    .card.bg-gradient-primary h3 {
        font-size: 1.5rem !important;
    }
    
    .d-flex.align-items-center.mb-3 {
        min-height: 60px !important;
        padding: 0.5rem !important;
    }
    
    .d-flex.align-items-center.mb-3 img {
        max-width: 50px !important;
    }
    
    .d-flex.align-items-center.mb-3 h1 {
        font-size: 1.2rem !important;
    }
    
    .d-flex.align-items-center.mb-3 p {
        font-size: 0.7rem !important;
    }
    
    /* Prize rarity cards - single column on very small screens */
    .rarity-legend {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .rarity-item {
        min-width: 120px !important;
        max-width: 150px !important;
        margin-bottom: 0.5rem !important;
    }
}

/* ========================================
   GENERAL MOBILE LAYOUT IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Prevent horizontal scroll on all pages */
    body {
        overflow-x: hidden !important;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Improve form elements on mobile */
    .form-control, .form-select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem !important;
    }
    
    /* Better button spacing */
    .btn + .btn {
        margin-left: 0 !important;
        margin-top: 0.5rem !important;
    }
    
    /* Improve table responsiveness */
    .table-responsive {
        border-radius: 8px !important;
        overflow: hidden !important;
    }
    
    /* Better modal sizing */
    .modal-dialog {
        margin: 1rem !important;
        max-width: calc(100% - 2rem) !important;
    }
    
    /* Improve dropdown positioning */
    .dropdown-menu {
        max-width: calc(100vw - 2rem) !important;
        left: 1rem !important;
        right: 1rem !important;
    }
}

/* ========================================
   CASINO GAMES - MOBILE OPTIMIZATION
   ======================================== */

@media (max-width: 768px) {
    /* Casino game layout - stack vertically on mobile */
    .blackjack-table-card,
    .game-area,
    .betting-panel,
    .info-panel {
        margin-bottom: 1rem !important;
        padding: 1rem !important;
        border-radius: 12px !important;
    }
    
    /* Game area - more compact on mobile */
    .game-area {
        padding: 0.75rem !important;
    }
    
    .game-area h4 {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .game-area small {
        font-size: 0.8rem !important;
    }
    
    /* Dealer and player areas - smaller on mobile */
    .dealer-area,
    .player-area {
        padding: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .dealer-area h5,
    .player-area h5 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Playing cards - smaller on mobile */
    .playing-card {
        width: 60px !important;
        height: 80px !important;
        font-size: 0.8rem !important;
    }
    
    .card-back {
        width: 60px !important;
        height: 80px !important;
    }
    
    /* Game controls - stack vertically on mobile */
    .game-controls .btn-group {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .game-controls .btn-group .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* Betting panel - more compact */
    .betting-panel,
    .info-panel {
        padding: 0.75rem !important;
    }
    
    .betting-panel h5,
    .info-panel h5 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Bet options - smaller on mobile */
    .bet-option {
        padding: 0.25rem 0.5rem !important;
        margin-bottom: 0.25rem !important;
        font-size: 0.8rem !important;
    }
    
    /* Game stats - smaller on mobile */
    .game-stats {
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .game-stats i {
        font-size: 1rem !important;
    }
    
    /* Current bet display - smaller */
    .current-bet-display {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Game status - smaller text */
    .game-status h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Casino buttons - full width on mobile */
    .btn-casino-primary,
    .btn-casino-secondary,
    .btn-casino-danger {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* Baccarat specific mobile optimizations */
    .baccarat-table {
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    
    .baccarat-table h4 {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .baccarat-table h5 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .btn-baccarat {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* Layout fixes for mobile */
    .col-lg-8,
    .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Reduce margins and padding for mobile */
    .row {
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
    
    .row > [class*="col-"] {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    /* Extra small mobile - even more compact */
    .blackjack-table-card,
    .game-area,
    .betting-panel,
    .info-panel {
        padding: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .game-area {
        padding: 0.5rem !important;
    }
    
    .game-area h4 {
        font-size: 1.1rem !important;
    }
    
    .dealer-area,
    .player-area {
        padding: 0.25rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .dealer-area h5,
    .player-area h5 {
        font-size: 0.9rem !important;
    }
    
    /* Even smaller cards for very small screens */
    .playing-card,
    .card-back {
        width: 50px !important;
        height: 70px !important;
        font-size: 0.7rem !important;
    }
    
    /* Smaller buttons */
    .game-controls .btn-group .btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Smaller betting options */
    .bet-option {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Smaller game stats */
    .game-stats {
        padding: 0.4rem !important;
        font-size: 0.7rem !important;
    }
    
    .game-stats i {
        font-size: 0.9rem !important;
    }
    
    /* Smaller casino buttons */
    .btn-casino-primary,
    .btn-casino-secondary,
    .btn-casino-danger {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Baccarat extra small mobile optimizations */
    .baccarat-table {
        padding: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .baccarat-table h4 {
        font-size: 1.1rem !important;
    }
    
    .baccarat-table h5 {
        font-size: 0.9rem !important;
    }
    
    .btn-baccarat {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }
}

/* ========================================
   CASINO GAME CARDS - MOBILE OPTIMIZATION
   ======================================== */

@media (max-width: 768px) {
    /* Casino game cards - make smaller for mobile */
    .game-card {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    
    .game-card h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .game-card p {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
    
    .casino-icon {
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Casino card info boxes - smaller on mobile */
    .game-card .bg-white.bg-opacity-10 {
        padding: 0.5rem !important;
    }
    
    .game-card .bg-white.bg-opacity-10 small {
        font-size: 0.7rem !important;
    }
    
    .game-card .bg-white.bg-opacity-10 i {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Casino buttons - full width on mobile */
    .game-card .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* VIP promotion cards - stack vertically on mobile */
    .casino-card .row .col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .casino-card .row .col-md-3 .bg-white.bg-opacity-20 {
        padding: 0.75rem !important;
    }
    
    .casino-card .row .col-md-3 h5 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .casino-card .row .col-md-3 p {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .casino-card .row .col-md-3 small {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 576px) {
    /* Extra small mobile - make casino cards even more compact */
    .game-card {
        padding: 0.75rem !important;
    }
    
    .game-card h3 {
        font-size: 1.1rem !important;
    }
    
    .game-card p {
        font-size: 0.8rem !important;
    }
    
    .casino-icon {
        font-size: 1.5rem !important;
    }
    
    /* VIP promotion - single column on very small screens */
    .casino-card .row .col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .casino-card .row .col-md-3 .bg-white.bg-opacity-20 {
        padding: 0.5rem !important;
    }
}

/* ========================================
   EXTRA SMALL DEVICE FIXES
   ======================================== */

@media (max-width: 375px) {
    /* Prevent horizontal scroll */
    * {
        overflow-x: hidden !important;
    }
    
    /* Optimize table for very small screens */
    .table-responsive {
        font-size: 0.8rem !important;
    }
    
    /* Optimize modal for very small screens */
    .modal-dialog {
        margin: 0.25rem !important;
        max-width: calc(100% - 0.5rem) !important;
    }
    
    /* Optimize dropdown for very small screens */
    .dropdown-menu {
        margin: 0.25rem !important;
        border-radius: 8px !important;
    }
}

/* ========================================
   GLASS CARD MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 991.98px) {
    .glass-card,
    .card.glass-card {
        background: #0066ff !important;  /* Changed from rgba(255, 255, 255, 0.1) to solid blue */
        backdrop-filter: none !important;  /* Remove blur effect */
        border: 2px solid #3388ff !important;  /* Solid blue border */
        border-radius: 15px !important;
        margin-bottom: 1rem !important;
    }
    
    .glass-card .card-title,
    .card.glass-card .card-title {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
    }
    
    .glass-card .btn,
    .card.glass-card .btn {
        background: #004dd9 !important;  /* Changed from rgba(255, 255, 255, 0.15) to solid blue */
        border: 1px solid #00ccff !important;
        color: white !important;
    }
}

/* ========================================
   MOBILE ANIMATION OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
    /* Optimize animations for mobile performance */
    .card {
        transition: transform 0.2s ease !important;
    }
    
    .card:hover {
        transform: translateY(-1px) !important;
    }
    
    .btn {
        transition: all 0.2s ease !important;
    }
    
    .btn:hover {
        transform: translateY(-1px) !important;
    }
}

/* ========================================
   MOBILE ACCESSIBILITY IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Ensure proper focus indicators */
    .nav-link:focus,
    .dropdown-item:focus,
    .btn:focus {
        outline: 2px solid rgba(255, 255, 255, 0.5) !important;
        outline-offset: 2px !important;
    }
    
    /* Improve text contrast */
    .card-title,
    .card-text,
    .nav-link,
    .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    /* Ensure proper spacing for touch targets */
    .nav-item {
        margin-bottom: 0.25rem !important;
    }
    
    .dropdown-item {
        margin-bottom: 0.125rem !important;
    }
}

/* ========================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
    /* Reduce box shadows for better performance */
    .card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }
    
    .card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Optimize backdrop filters */
    .navbar-collapse {
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    /* Reduce animation complexity */
    .btn,
    .nav-link,
    .dropdown-item {
        transition: background-color 0.2s ease, color 0.2s ease !important;
    }
}

/* ========================================
   END OF MOBILE UNIFIED CSS
   ======================================== */ /* FORCE DASHBOARD CARDS HORIZONTAL */

/* Dashboard enhanced: neutralize global mobile constraints for the first row */
@media (max-width: 768px) {
  .row.g-4.card-row.no-wrap-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .row.g-4.card-row.no-wrap-row > [class^="col-"],
  .row.g-4.card-row.no-wrap-row > [class*=" col-"] {
    max-width: none !important;
    flex: 0 0 auto !important;
    min-width: 320px !important;
  }
}
