@media (max-width: 1200px) {
            .main-layout {
                flex-direction: column;
            }
            
            .control-panel {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid var(--border-color);
            }
            
            .input-fields {
                flex-wrap: wrap;
            }
            
            .input-field {
                min-width: 200px;
            }
        }
        
        @media (max-width: 768px) {
            .top-navbar {
                padding: 0 16px;
                overflow: visible;
            }
            
            .nav-left {
                gap: 12px;
                overflow: hidden;
                min-width: 0;
            }
            
            .originals-tab {
                padding: 6px 12px;
                font-size: 13px;
            }
            
            .originals-tab span {
                display: none;
            }

            .nav-right {
                gap: 10px;
                flex-wrap: nowrap;
                overflow: visible;
            }

            /* ═══ Move games-tabs BELOW navbar on mobile ═══ */
            .games-tabs {
                position: fixed;
                top: 64px;
                left: 0;
                width: 100%;
                z-index: 999;
                background-color: rgba(14, 19, 46, 0.97);
                backdrop-filter: blur(10px);
                -webkit-backdrop-filter: blur(10px);
                border-bottom: 1px solid rgba(37, 41, 78, 0.7);
                padding: 8px 16px;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 6px;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
                margin-left: 0;
            }
            
            /* ═══ Swap hamburger and wallet button positions on mobile ═══ */
            .hamburger-btn {
                order: -1;
            }
            
            .wallet-btn {
                order: 0;
                padding: 8px 14px;
                font-size: 14px;
            }
            
            .wallet-btn span {
                display: none;
            }
            
            .wallet-btn i {
                font-size: 18px;
            }

            .gift-btn {
                width: 40px;
                height: 40px;
                font-size: 17px;
            }

            .notifications-btn {
                width: 40px;
                height: 40px;
                font-size: 17px;
            }

            .dev-btn {
                width: 40px;
                height: 40px;
                font-size: 17px;
            }

            .enter-referral-btn {
                padding: 8px 12px;
                font-size: 13px;
                min-height: 40px;
            }

            .enter-referral-btn span {
                display: none;
            }
            
            .main-content {
                padding: 24px;
            }
            
            /* Extra top padding to account for fixed games-tabs bar below navbar */
            .main-layout {
                padding-top: 114px;
            }
            
            .input-fields {
                flex-direction: column;
            }
            
            .fairness-badge {
                position: static;
                margin-top: 40px;
                justify-content: center;
            }
            
            .action-buttons {
                grid-template-columns: repeat(4, 1fr);
            }
            
            .action-btn span {
                font-size: 12px;
            }
            
            .wallet-footer {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }

            .tasks-modal-content {
                width: 95%;
            }
            
            .task-item {
                padding: 16px;
            }
            
            .transactions-modal-content {
                width: 95%;
            }
            
            .transactions-filter {
                justify-content: center;
            }
            
            .filter-btn {
                padding: 6px 12px;
                font-size: 12px;
            }
            
            .transfer-modal-content {
                width: 95%;
            }
            
            .success-notification, .error-notification {
                top: 80px;
                right: 16px;
                left: auto;
                max-width: calc(100% - 32px);
            }
            
            .user-modal-content {
                width: 95%;
            }
            
            .profile-modal-content {
                width: 95%;
            }
            
            .user-tab {
                padding: 14px;
                font-size: 14px;
            }
            
            .profile-stats {
                grid-template-columns: 1fr;
            }
            
            .settings-modal-content {
                width: 95%;
            }
            
            .delete-confirm-content {
                width: 95%;
            }

            /* ═══ Hamburger: hide buttons from navbar ═══ */
            .gift-btn,
            .notifications-btn,
            .enter-referral-btn {
                display: none !important;
            }

            /* ═══ Show hamburger button ═══ */
            .hamburger-btn {
                display: flex !important;
            }
        }
        

        /* ═══════════════════════════════════════════
           Hamburger button — hidden by default on Desktop
           ═══════════════════════════════════════════ */
        .hamburger-btn {
            display: none;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            background: linear-gradient(135deg, #1A1F44, #25294E);
            border: 1.5px solid rgba(60, 70, 204, 0.4);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 20px;
            cursor: pointer;
            transition: all 0.25s ease;
            position: relative;
            flex-shrink: 0;
        }

        .hamburger-btn:hover {
            background: linear-gradient(135deg, #25294E, #3C46CC44);
            border-color: rgba(60, 70, 204, 0.8);
            transform: translateY(-1px);
        }

        /* Red dot on hamburger if there are notifications/rewards */
        .hamburger-btn .hamburger-dot {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 11px;
            height: 11px;
            background: var(--accent-red);
            border-radius: 50%;
            border: 2px solid var(--bg-primary);
            box-shadow: 0 0 8px rgba(250, 48, 96, 0.7);
            animation: glowPulse 1.5s infinite alternate;
            display: none;
        }

        .hamburger-btn.has-badge .hamburger-dot {
            display: block;
        }

        /* ═══════════════════════════════════════════
           Transparent overlay to close menu when clicking outside
           ═══════════════════════════════════════════ */
        .hamburger-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 99998;
            background: rgba(0,0,0,0.01);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .hamburger-overlay.active {
            display: block;
        }

        /* ═══════════════════════════════════════════
           Dropdown Menu
           ═══════════════════════════════════════════ */
        .hamburger-menu {
            display: none;
            position: fixed;
            min-width: 220px;
            background: linear-gradient(145deg, #0E132E, #13183A);
            border: 1px solid rgba(60, 70, 204, 0.35);
            border-radius: 16px;
            padding: 10px;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55),
                        0 0 0 1px rgba(255,255,255,0.04);
            z-index: 100001;
            animation: dropIn 0.22s ease;
            backdrop-filter: blur(12px);
        }

        .hamburger-menu.open {
            display: block;
        }

        @keyframes dropIn {
            from { opacity: 0; transform: translateY(-8px) scale(0.97); }
            to   { opacity: 1; transform: translateY(0) scale(1); }
        }

        .hamburger-menu-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 13px 16px;
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.2s ease;
            position: relative;
            border: 1px solid rgba(60, 70, 204, 0.45);
            background: rgba(14, 19, 46, 0.8);
            width: 100%;
            text-align: left;
            color: var(--text-primary);
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 6px;
        }

        .hamburger-menu-item:last-child {
            margin-bottom: 0;
        }

        .hamburger-menu-item:hover {
            background: rgba(60, 70, 204, 0.18);
        }

        .hamburger-menu-item:active {
            background: rgba(60, 70, 204, 0.28);
        }

        .hamburger-menu-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 10px;
            font-size: 17px;
            flex-shrink: 0;
            position: relative;
        }

        .hamburger-menu-icon.gift-icon {
            background: linear-gradient(135deg, #FF6B6B, #FF8E53);
            box-shadow: 0 4px 14px rgba(255, 107, 107, 0.35);
        }

        .hamburger-menu-icon.referral-icon {
            background: linear-gradient(135deg, #1AD093, #0FAF7C);
            box-shadow: 0 4px 14px rgba(26, 208, 147, 0.35);
        }

        .hamburger-menu-icon.notif-icon {
            background: linear-gradient(135deg, #6A5AED, #4E58E6);
            box-shadow: 0 4px 14px rgba(106, 90, 237, 0.35);
        }

        .hamburger-menu-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: var(--accent-red);
            color: white;
            font-size: 10px;
            font-weight: 800;
            min-width: 18px;
            height: 18px;
            border-radius: 9px;
            display: none;
            align-items: center;
            justify-content: center;
            border: 2px solid var(--bg-panel);
            padding: 0 3px;
        }

        .hamburger-menu-badge.visible {
            display: flex;
        }

        .hamburger-menu-label {
            flex: 1;
        }

        .hamburger-menu-divider {
            height: 1px;
            background: rgba(37, 41, 78, 0.7);
            margin: 6px 8px;
        }

        /* Provably Fair - hide/show based on screen size */
        .fairness-btn-mobile {
            display: none;
            margin-top: 8px;
            width: auto;
            margin-left: auto;
            margin-right: auto;
            justify-content: center;
            padding: 10px 20px;
            font-size: 14px;
        }

        @media (max-width: 767px) {
            /* Hide original button in main-content */
            .main-content .fairness-btn:not(.fairness-btn-mobile) {
                display: none;
            }
            /* Show button directly below Recent games */
            .fairness-btn-mobile {
                display: flex;
            }
        }
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        
        ::-webkit-scrollbar-track {
            background: var(--bg-input);
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb {
            background: var(--accent-blue);
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: var(--accent-blue-light);
        }

        /* Login Notification Interface */
        .login-notification-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            z-index: 2009;
            animation: fadeIn 0.3s ease;
        }

        .login-notification-modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .login-notification-content {
            width: 90%;
            max-width: 450px;
            margin-top: 0;
            margin-right: 0;
            background-color: var(--bg-panel);
            border-radius: 16px;
            border: 1px solid var(--border-color);
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            animation: slideUp 0.3s ease;
        }

        .login-notification-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            background-color: var(--bg-card);
            border-bottom: 1px solid var(--border-color);
        }

        .login-notification-header h3 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 20px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .login-notification-header h3 i {
            color: var(--accent-cyan);
        }

        .close-notification-btn {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 28px;
            cursor: pointer;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
        }

        .close-notification-btn:hover {
            background-color: var(--bg-input);
            color: var(--text-primary);
        }

        .notification-message {
            padding: 30px 24px;
            text-align: center;
        }

        .notification-message p {
            font-size: 16px;
            color: var(--text-secondary);
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .notification-message strong {
            color: var(--accent-cyan);
            font-weight: 700;
        }

        .notification-actions {
            display: flex;
            gap: 12px;
            padding: 0 24px 24px;
        }

        .notification-btn {
            flex: 1;
            padding: 16px;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .notification-btn.login-btn {
            background: linear-gradient(135deg, var(--accent-cyan), #1ab0a5);
            color: var(--bg-primary);
        }

        .notification-btn.login-btn:hover {
            background: linear-gradient(135deg, #1ab0a5, var(--accent-cyan));
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(38, 208, 196, 0.3);
        }

        .notification-btn.cancel-btn {
            background-color: var(--bg-input);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

        .notification-btn.cancel-btn:hover {
            background-color: var(--border-color);
            transform: translateY(-2px);
        }

        /* MAX button inside transfer field */
        .transfer-max-btn {
            position: absolute;
            right: 60px;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgba(60, 70, 204, 0.2);
            color: var(--accent-blue-light);
            border: 1px solid rgba(60, 70, 204, 0.5);
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
            z-index: 10;
        }

        .transfer-max-btn:hover {
            background-color: rgba(60, 70, 204, 0.3);
            color: var(--text-primary);
        }

        .transfer-max-btn:active {
            transform: translateY(-50%) scale(0.95);
        }

        /* ============================================
           MOBILE RESPONSIVE STYLES - ADDED FOR MOBILE
           ============================================ */

        /* Mobile-first base styles */
        * {
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
        }

        /* Ensure smooth scrolling on mobile */
        html {
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
        }

        /* Mobile viewport optimization */
        @viewport {
            width: device-width;
            initial-scale: 1;
            maximum-scale: 5;
            user-scalable: yes;
        }

        /* ============================================
           SMALL MOBILE DEVICES (up to 480px)
           ============================================ */
        @media (max-width: 480px) {
            /* Body adjustments */
            body {
                font-size: 14px;
                min-height: 100vh;
                min-height: -webkit-fill-available;
            }

            /* Top Navbar - Compact layout, no overflow */
            .top-navbar {
                height: 56px;
                padding: 0 10px;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                overflow: visible;
            }

            .nav-left {
                gap: 6px;
                flex-shrink: 0;
                overflow: hidden;
                min-width: 0;
            }

            .logo {
                font-size: 20px;
                white-space: nowrap;
                flex-shrink: 0;
            }

            /* Hide originals tab on very small screens */
            .originals-tab {
                display: none;
            }

            .nav-right {
                gap: 6px;
                flex-shrink: 0;
                flex-wrap: nowrap;
                overflow: visible;
            }

            /* Wallet button - icon only, compact */
            .wallet-btn {
                width: 40px;
                height: 40px;
                min-width: 40px;
                min-height: 40px;
                padding: 0;
                font-size: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 10px;
            }

            .wallet-btn span {
                display: none;
            }

            .wallet-btn i {
                font-size: 17px;
                margin: 0;
            }

            /* Gift and notification buttons */
            .gift-btn,
            .notifications-btn,
            .dev-btn {
                width: 40px;
                height: 40px;
                min-width: 40px;
                min-height: 40px;
                font-size: 15px;
                border-radius: 10px;
            }

            /* Enter referral button - icon only */
            .enter-referral-btn {
                width: 40px;
                height: 40px;
                min-width: 40px;
                min-height: 40px;
                padding: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 10px;
                font-size: 0;
            }

            .enter-referral-btn i {
                font-size: 15px;
            }

            .enter-referral-btn span {
                display: none;
            }

            /* Wallet container - compact on very small screens */
            .wallet-container {
                display: flex;
                gap: 6px;
                padding: 4px 8px;
                border-radius: 8px;
                align-items: center;
                min-width: 0;
                flex-shrink: 1;
            }

            .wallet-container .balance {
                font-size: 13px;
                font-weight: 700;
                white-space: nowrap;
            }

            .wallet-container .usdc-badge {
                padding: 3px 6px;
                font-size: 11px;
                gap: 4px;
            }

            .wallet-container .usdc-badge span {
                display: none;
            }

            /* User avatar */
            .user-avatar {
                width: 40px;
                height: 40px;
                min-width: 40px;
                padding: 4px;
                border-radius: 9px;
            }

            /* Main layout - stack vertically with reordered sections */
            .main-layout {
                flex-direction: column;
                padding-top: 56px;
                min-height: 100vh;
            }

            /* Main content area comes FIRST on mobile (slider + fields) */
            .main-content {
                order: 1;
            }

            /* Control panel comes SECOND on mobile (bet amount + roll button) */
            .control-panel {
                order: 2;
                width: 100%;
                padding: 16px 12px;
                border-right: none;
                border-top: 1px solid var(--border-color);
                border-bottom: none;
                gap: 16px;
            }

            .control-section {
                padding: 16px;
            }

            .section-title {
                font-size: 13px;
                margin-bottom: 10px;
            }

            /* Bet input */
            .bet-input {
                padding: 14px;
                font-size: 18px;
            }

            .currency-label {
                font-size: 12px;
            }

            /* Quick bet buttons */
            .quick-bet-buttons {
                gap: 6px;
            }

            .quick-bet-btn {
                padding: 12px 8px;
                font-size: 13px;
                min-height: 44px;
            }

            /* Profit display */
            .profit-display {
                margin-top: 16px;
                padding-top: 16px;
            }

            .profit-label {
                font-size: 13px;
            }

            .profit-value {
                font-size: 18px;
            }

            /* Roll button - large and touch friendly */
            .roll-button {
                padding: 18px;
                font-size: 16px;
                margin-top: 14px;
                min-height: 56px;
            }

            /* Game history */
            .game-history {
                margin-top: 16px;
                max-height: 150px;
            }

            /* Main content area */
            .main-content {
                padding: 20px 12px 12px;
                align-items: stretch;
            }

            .game-title {
                font-size: 32px;
                margin-bottom: 24px;
                letter-spacing: 1.5px;
            }

            /* Dice slider - optimized for touch */
            .dice-slider-container {
                margin-bottom: 30px;
                padding: 0 8px;
            }

            .slider-wrapper {
                position: relative;
                padding: 6px;
            }

            .slider-track {
                position: relative;
                height: 32px;
                border-radius: 16px;
                overflow: visible;
            }

            .slider-handle {
                width: 44px;
                height: 44px;
                min-width: 44px;
                min-height: 44px;
                position: absolute;
                top: 50%;
                left: 0;
                transform: translate(-50%, -50%);
                background-color: white;
                border-radius: 50%;
                cursor: grab;
                box-shadow:
                    0 0 0 2px rgba(255, 255, 255, 0.1),
                    0 8px 24px rgba(0, 0, 0, 0.4);
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 100;
                will-change: left;
            }

            .handle-cross {
                font-size: 18px;
            }

            .slider-dot {
                width: 6px;
                height: 6px;
            }

            /* Random number tooltip */
            .random-number-tooltip {
                top: -40px;
                padding: 6px;
                font-size: 12px;
                min-width: 50px;
            }

            /* Input fields - horizontal row, label above input */
            .input-fields {
                flex-direction: row;
                gap: 8px;
                width: 100%;
                max-width: 100%;
                align-items: stretch;
            }

            .input-field {
                flex: 1;
                min-width: 0;
                flex-direction: column;
                align-items: stretch;
                justify-content: flex-start;
                padding: 12px 8px;
            }

            .input-field .input-label {
                font-size: 12px;
                margin-bottom: 8px;
                height: auto;
                min-height: auto;
                flex-shrink: 0;
                min-width: unset;
            }

            .input-field .input-wrapper {
                flex: 1;
                max-width: 100%;
                width: 100%;
            }

            .number-input {
                padding: 10px 28px 10px 10px;
                font-size: 16px;
                height: 44px;
                width: 100%;
            }

            .multiplier-symbol,
            .percent-symbol {
                font-size: 14px;
                right: 8px;
            }

            .roll-over-button {
                padding: 4px 6px;
                font-size: 10px;
                height: 26px;
            }

            /* Provably Fair button → below all elements */
            .fairness-btn {
                order: 99;
                margin-top: 4px;
                align-self: center;
            }

            /* Fairness badge - repositioned */
            .fairness-badge {
                position: relative;
                bottom: auto;
                right: auto;
                margin-top: 24px;
                justify-content: center;
                padding: 10px 16px;
                font-size: 13px;
            }

            /* Fairness button - fixed position adjustment */
            .fairness-btn {
                position: relative;
                bottom: auto;
                right: auto;
                margin-top: 4px;
                align-self: center;
                padding: 12px 16px;
                font-size: 13px;
            }

            /* Modals - full screen on mobile */
            .wallet-modal-content,
            .tasks-modal-content,
            .transactions-modal-content,
            .transfer-modal-content,
            .user-modal-content,
            .profile-modal-content,
            .settings-modal-content,
            .delete-confirm-content,
            .deposit-modal-content,
            .withdraw-modal-content,
            .fairness-modal-content,
            .referral-code-content,
            .enter-referral-content,
            .dev-accounts-content,
            .dev-account-details-content,
            .dev-add-balance-content,
            .dev-delete-confirm-content,
            .account-banned-content,
            .dev-pending-operations-content,
            .user-notifications-content,
            .login-notification-content,
            .help-modal-content {
                width: 95%;
                max-width: 95%;
                max-height: 85vh;
                margin: 10px;
            }

            /* Modal headers */
            .wallet-modal-header,
            .tasks-modal-header,
            .transactions-modal-header,
            .transfer-modal-header,
            .user-modal-header,
            .profile-modal-header,
            .settings-modal-header,
            .delete-confirm-header,
            .deposit-modal-header,
            .withdraw-modal-header,
            .fairness-modal-header,
            .referral-code-header,
            .enter-referral-header,
            .dev-accounts-header,
            .dev-account-details-header,
            .dev-add-balance-header,
            .dev-delete-confirm-header,
            .account-banned-header,
            .dev-pending-operations-header,
            .user-notifications-header,
            .login-notification-header,
            .help-modal-header {
                padding: 16px 20px;
            }

            .wallet-modal-header h3,
            .tasks-modal-header h3,
            .transactions-modal-header h3,
            .transfer-modal-header h3,
            .user-modal-header h3,
            .profile-modal-header h3,
            .settings-modal-header h3,
            .delete-confirm-header h3,
            .deposit-modal-header h3,
            .withdraw-modal-header h3,
            .fairness-modal-header h3,
            .referral-code-header h3,
            .enter-referral-header h3,
            .dev-accounts-header h3,
            .dev-account-details-header h3,
            .dev-add-balance-header h3,
            .dev-delete-confirm-header h3,
            .account-banned-header h3,
            .dev-pending-operations-header h3,
            .user-notifications-header h3,
            .login-notification-header h3,
            .help-modal-header h3 {
                font-size: 16px;
            }

            /* Modal body padding */
            .wallet-balance-section,
            .tasks-list,
            .transactions-list,
            .transfer-form,
            .user-form,
            .profile-content,
            .settings-content,
            .delete-confirm-message,
            .deposit-body,
            .withdraw-body,
            .fairness-body,
            .referral-code-body,
            .enter-referral-body,
            .dev-accounts-list,
            .dev-account-details-body,
            .dev-add-balance-body,
            .dev-delete-confirm-body,
            .account-banned-body,
            .dev-pending-operations-body,
            .user-notifications-body,
            .notification-message,
            .help-content {
                padding: 16px;
            }

            /* Settings + Profile: scrollable body, fixed header */
            .settings-modal-content,
            .profile-modal-content {
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }
            .settings-content,
            .profile-content {
                overflow-y: auto;
                overflow-x: hidden;
                -webkit-overflow-scrolling: touch;
                max-height: calc(85vh - 64px);
                scrollbar-width: thin;
                scrollbar-color: rgba(255,255,255,0.15) transparent;
            }
            .settings-content::-webkit-scrollbar,
            .profile-content::-webkit-scrollbar {
                width: 4px;
            }
            .settings-content::-webkit-scrollbar-track,
            .profile-content::-webkit-scrollbar-track {
                background: transparent;
            }
            .settings-content::-webkit-scrollbar-thumb,
            .profile-content::-webkit-scrollbar-thumb {
                background: rgba(255,255,255,0.18);
                border-radius: 4px;
            }

            /* User modal (login/signup): same treatment */
            .user-modal-content {
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }
            .user-form {
                overflow-y: auto;
                overflow-x: hidden;
                -webkit-overflow-scrolling: touch;
                max-height: calc(85vh - 64px);
                scrollbar-width: thin;
                scrollbar-color: rgba(255,255,255,0.15) transparent;
            }
            .user-form::-webkit-scrollbar { width: 4px; }
            .user-form::-webkit-scrollbar-track { background: transparent; }
            .user-form::-webkit-scrollbar-thumb {
                background: rgba(255,255,255,0.18);
                border-radius: 4px;
            }

            /* Total balance in wallet */
            .total-balance {
                padding: 16px;
                margin-bottom: 20px;
            }

            .total-label {
                font-size: 13px;
            }

            .total-amount {
                font-size: 28px;
            }

            /* Balance items */
            .balance-item {
                padding: 14px;
            }

            .balance-item-label {
                font-size: 13px;
            }

            .balance-item-label i {
                font-size: 16px;
            }

            .balance-item-amount {
                font-size: 16px;
            }

            /* Action buttons - 2x2 grid */
            .action-buttons {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }

            .action-btn {
                padding: 14px 10px;
                font-size: 12px;
                min-height: 70px;
            }

            .action-btn i {
                font-size: 18px;
            }

            /* Wallet footer */
            .wallet-footer {
                padding: 16px;
                flex-direction: column;
                gap: 12px;
            }

            .wallet-info {
                font-size: 12px;
                text-align: center;
            }


            /* Task items */
            .task-item {
                padding: 14px;
                margin-bottom: 12px;
            }

            .task-header {
                margin-bottom: 12px;
            }

            .task-title {
                font-size: 14px;
            }

            .task-reward {
                font-size: 16px;
                padding: 8px 14px;
                min-width: 70px;
            }

            .task-reward i,
            .task-reward span {
                font-size: 16px;
            }

            .progress-label {
                font-size: 12px;
            }

            .progress-bar {
                height: 6px;
            }

            .claim-btn {
                padding: 10px;
                font-size: 13px;
            }

            /* Transaction filters */
            .transactions-filter {
                gap: 6px;
                margin-bottom: 16px;
            }

            .filter-btn {
                padding: 6px 10px;
                font-size: 11px;
            }

            /* Transaction items */
            .transaction-item {
                padding: 12px;
            }

            .transaction-type {
                font-size: 13px;
            }

            .transaction-details {
                font-size: 11px;
            }

            .transaction-amount-value {
                font-size: 14px;
            }

            .transaction-date {
                font-size: 11px;
            }

            /* Transfer form */
            .transfer-input-group {
                margin-bottom: 16px;
            }

            .transfer-label {
                font-size: 13px;
                margin-bottom: 6px;
            }

            .transfer-input {
                padding: 14px;
                font-size: 14px;
            }

            .transfer-currency {
                font-size: 12px;
            }

            .transfer-button {
                padding: 16px;
                font-size: 15px;
            }

            /* User tabs */
            .user-tabs {
                padding: 0;
            }

            .user-tab {
                padding: 14px 10px;
                font-size: 14px;
            }

            /* Form groups */
            .form-group {
                margin-bottom: 16px;
            }

            .form-group label {
                font-size: 13px;
                margin-bottom: 6px;
            }

            .user-input {
                padding: 14px;
                font-size: 15px;
            }

            .input-hint {
                font-size: 11px;
            }

            .user-submit-btn {
                padding: 16px;
                font-size: 15px;
            }

            /* Profile section */
            .profile-info {
                margin-bottom: 20px;
            }

            .profile-avatar-large {
                width: 70px;
                height: 70px;
                font-size: 28px;
            }

            .profile-username {
                font-size: 20px;
            }

            .profile-email {
                font-size: 13px;
            }

            /* Profile stats */
            .profile-stats {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
                margin-bottom: 20px;
            }

            .stat-item {
                padding: 14px;
            }

            .stat-label {
                font-size: 11px;
            }

            .stat-value {
                font-size: 18px;
            }

            /* Profile referral section */
            .profile-referral-section {
                padding: 14px;
                margin: 16px 0;
            }

            .profile-referral-label {
                font-size: 11px;
            }

            .profile-referral-value {
                font-size: 18px;
            }

            .profile-referral-copy-btn {
                padding: 6px 12px;
                font-size: 12px;
            }

            /* Logout and settings buttons */
            .logout-btn,
            .settings-btn {
                padding: 14px;
                font-size: 15px;
            }

            /* Settings section */
            .settings-section {
                margin-bottom: 20px;
                padding-bottom: 16px;
            }

            .settings-section h4 {
                font-size: 14px;
                margin-bottom: 14px;
            }

            .delete-account-btn {
                padding: 14px;
                font-size: 15px;
            }

            /* Delete confirmation */
            .delete-confirm-message p {
                font-size: 14px;
            }

            .delete-confirm-message .warning {
                font-size: 14px;
                padding: 12px;
                margin: 16px 0;
            }

            .delete-confirm-message ul {
                margin: 12px 0;
                padding-left: 20px;
            }

            .delete-confirm-message li {
                font-size: 13px;
                margin-bottom: 6px;
            }

            .delete-confirm-actions {
                padding: 0 16px 16px;
                gap: 10px;
            }

            .delete-confirm-btn {
                padding: 14px;
                font-size: 14px;
            }

            /* Deposit and withdraw options */
            .deposit-options,
            .withdraw-options {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }

            .deposit-option,
            .withdraw-option {
                padding: 12px;
                font-size: 13px;
            }

            .deposit-section,
            .withdraw-section {
                margin-bottom: 16px;
            }

            .deposit-section-title,
            .withdraw-section-title {
                font-size: 13px;
                margin-bottom: 10px;
            }

            .deposit-address-box {
                padding: 16px;
            }

            .deposit-address-label {
                font-size: 11px;
            }

            .deposit-address {
                font-size: 12px;
                padding: 10px 12px;
            }

            .copy-address-btn {
                padding: 8px 14px;
                font-size: 12px;
            }

            .deposit-input-group,
            .withdraw-input-group {
                margin-bottom: 16px;
            }

            .deposit-input,
            .withdraw-input {
                padding: 12px 14px;
                font-size: 13px;
            }

            .withdraw-amount-input {
                font-size: 18px;
            }

            .verify-deposit-btn,
            .confirm-withdraw-btn {
                padding: 16px;
                font-size: 15px;
            }

            /* Fairness modal */
            .fairness-section {
                margin-bottom: 16px;
            }

            .fairness-section h4 {
                font-size: 14px;
                margin-bottom: 10px;
            }

            .fairness-section p {
                font-size: 13px;
                margin-bottom: 10px;
            }

            .fairness-warning {
                padding: 14px;
                margin: 16px 0;
            }

            .fairness-warning h4 {
                font-size: 14px;
                margin-bottom: 6px;
            }

            .fairness-warning p {
                font-size: 13px;
            }

            /* Referral code modal */
            .referral-code-header {
                padding: 24px 20px;
            }

            .referral-code-header i {
                font-size: 40px;
            }

            .referral-code-header h3 {
                font-size: 20px;
            }

            .referral-code-body p {
                font-size: 14px;
                margin-bottom: 20px;
            }

            .referral-code-box {
                padding: 16px;
            }

            .referral-code-label {
                font-size: 11px;
            }

            .referral-code-value {
                font-size: 22px;
            }

            .referral-code-copy-btn {
                padding: 14px;
                font-size: 15px;
            }

            .referral-code-close-btn {
                font-size: 13px;
            }

            /* Enter referral modal */
            .enter-referral-info,
            .enter-referral-used {
                padding: 14px;
                margin-bottom: 16px;
            }

            .enter-referral-info i,
            .enter-referral-used i {
                font-size: 20px;
            }

            .enter-referral-info p,
            .enter-referral-used p {
                font-size: 13px;
            }

            .enter-referral-input-group {
                margin-bottom: 16px;
            }

            .enter-referral-input {
                padding: 14px;
                font-size: 18px;
            }

            .confirm-referral-btn {
                padding: 16px;
                font-size: 15px;
            }

            /* Developer modals */
            .dev-account-item {
                padding: 14px;
                margin-bottom: 10px;
            }

            .dev-account-avatar {
                width: 36px;
                height: 36px;
                font-size: 14px;
            }

            .dev-account-name {
                font-size: 14px;
            }

            .dev-account-balance {
                font-size: 12px;
            }

            .dev-details-section {
                padding: 16px;
                margin-bottom: 16px;
            }

            .dev-details-section h4 {
                font-size: 13px;
                margin-bottom: 12px;
            }

            .dev-detail-row {
                padding: 10px 0;
            }

            .dev-detail-label,
            .dev-detail-value {
                font-size: 12px;
            }

            .dev-actions {
                grid-template-columns: 1fr;
                gap: 10px;
                margin-top: 16px;
            }

            .dev-action-btn {
                padding: 14px;
                font-size: 13px;
            }

            /* Pending operations */
            .pending-operation-item {
                padding: 16px;
                margin-bottom: 12px;
            }

            .pending-operation-header {
                margin-bottom: 10px;
            }

            .pending-operation-type {
                font-size: 14px;
            }

            .pending-operation-status {
                padding: 4px 10px;
                font-size: 11px;
            }

            .pending-operation-details {
                grid-template-columns: 1fr;
                gap: 8px;
                margin-bottom: 12px;
            }

            .pending-operation-detail-label {
                font-size: 11px;
            }

            .pending-operation-detail-value {
                font-size: 13px;
            }

            .pending-operation-detail-value.amount {
                font-size: 16px;
            }

            .pending-operation-actions {
                gap: 8px;
            }

            .pending-operation-btn {
                padding: 10px 14px;
                font-size: 13px;
            }

            /* User notifications */
            .user-notification-item {
                padding: 12px;
                margin-bottom: 10px;
            }

            .user-notification-icon {
                width: 36px;
                height: 36px;
                font-size: 16px;
            }

            .user-notification-title {
                font-size: 13px;
            }

            .user-notification-message {
                font-size: 11px;
            }

            .user-notification-time {
                font-size: 10px;
            }

            .clear-all-notifications-btn {
                padding: 10px;
                font-size: 13px;
                margin-top: 12px;
            }

            /* Login notification */
            .notification-message p {
                font-size: 14px;
                margin-bottom: 20px;
            }

            .notification-actions {
                padding: 0 16px 16px;
                gap: 10px;
            }

            .notification-btn {
                padding: 14px;
                font-size: 14px;
            }

            /* Account banned modal */
            .account-banned-header {
                padding: 24px 20px;
            }

            .account-banned-header i {
                font-size: 48px;
            }

            .account-banned-header h2 {
                font-size: 20px;
            }

            .account-banned-body p {
                font-size: 14px;
            }

            .account-banned-body .ban-reason {
                padding: 14px;
                margin: 16px 0;
            }

            .account-banned-body .no-recourse {
                font-size: 12px;
            }

            .account-banned-btn {
                padding: 14px;
                margin-top: 16px;
            }

            /* Help modal */
            .help-content p {
                font-size: 13px;
                margin-bottom: 12px;
            }

            .help-content ul {
                margin-left: 16px;
                margin-bottom: 16px;
            }

            .help-content li {
                font-size: 13px;
                margin-bottom: 6px;
            }

            /* Success/Error notifications */
            .success-notification,
            .error-notification {
                top: 70px;
                right: 12px;
                left: auto;
                max-width: calc(100% - 24px);
                padding: 14px 18px;
            }

            .success-notification i,
            .error-notification i {
                font-size: 20px;
            }

            .success-notification-title,
            .error-notification-title {
                font-size: 14px;
            }

            .success-notification-message,
            .error-notification-message {
                font-size: 12px;
            }

            /* Close buttons in modals */
            .close-wallet-btn,
            .close-tasks-btn,
            .close-help-btn,
            .close-transactions-btn,
            .close-transfer-btn,
            .close-user-btn,
            .close-profile-btn,
            .close-settings-btn,
            .close-delete-confirm-btn,
            .close-deposit-btn,
            .close-withdraw-btn,
            .close-fairness-btn,
            .close-enter-referral-btn,
            .close-dev-accounts-btn,
            .close-dev-details-btn,
            .close-dev-add-balance-btn,
            .close-dev-delete-confirm-btn,
            .close-dev-pending-operations-btn,
            .close-user-notifications-btn,
            .close-notification-btn {
                width: 40px;
                height: 40px;
                font-size: 24px;
                min-width: 44px;
                min-height: 44px;
            }

            /* Password toggle button */
            .toggle-password-btn {
                width: 40px;
                height: 40px;
                font-size: 16px;
                min-width: 44px;
                min-height: 44px;
            }

            /* Transfer max button */
            .transfer-max-btn {
                right: 50px;
                padding: 3px 6px;
                font-size: 10px;
            }

            /* Notification badge */
            .notification-badge {
                width: 20px;
                height: 20px;
                font-size: 10px;
                top: -4px;
                right: -6px;
            }

            /* Game history items */
            .game-history-item {
                padding: 10px 12px;
            }

            .game-history-amount {
                font-size: 13px;
            }

            .game-history-result {
                font-size: 11px;
                padding: 2px 6px;
            }

            /* No data messages */
            .no-transactions,
            .no-notifications,
            .no-pending-operations {
                padding: 30px 20px;
            }

            .no-transactions i,
            .no-notifications i,
            .no-pending-operations i {
                font-size: 36px;
            }

            .no-transactions p,
            .no-notifications p,
            .no-pending-operations p {
                font-size: 14px;
            }

            /* Dev pending deposits/withdrawals */
            .dev-pending-deposits,
            .dev-pending-withdrawals {
                padding: 14px;
                margin-bottom: 16px;
            }

            .dev-pending-deposits h5,
            .dev-pending-withdrawals h5 {
                font-size: 13px;
                margin-bottom: 10px;
            }

            .dev-pending-item {
                padding: 10px;
                font-size: 12px;
            }

            /* Currency options */
            .dev-add-balance-currency {
                gap: 8px;
                margin-bottom: 16px;
            }

            .dev-currency-option {
                padding: 10px;
                font-size: 13px;
            }

            .dev-add-balance-input {
                padding: 14px;
                font-size: 20px;
            }

            .dev-confirm-add-balance-btn {
                padding: 16px;
                font-size: 15px;
            }

            /* Scrollbar styling for mobile */
            ::-webkit-scrollbar {
                width: 4px;
                height: 4px;
            }

            /* Form error messages */
            .form-error {
                font-size: 12px;
                margin-top: 8px;
            }

            /* User modal footer */
            .user-modal-footer {
                padding: 16px;
                gap: 10px;
            }

            .user-info {
                font-size: 12px;
                text-align: center;
            }

            .current-user {
                padding: 8px 14px;
                font-size: 13px;
            }

            .help-btn {
                width: 36px;
                height: 36px;
                font-size: 16px;
            }

            /* Tab active indicator */
            .user-tab.active::after {
                height: 2px;
            }

            /* Loader adjustments */
            .loader-logo {
                gap: 10px;
            }

            .logo-text {
                font-size: 36px;
            }

            .ball {
                width: 60px;
                height: 60px;
            }

            .loader-progress {
                width: 150px;
                height: 3px;
            }

            .loader-text {
                font-size: 12px;
            }

            /* Reorder control panel sections on mobile to match game image layout */
            .control-section:first-child {
                display: flex;
                flex-direction: column;
            }

            /* Roll Dice button first */
            .roll-button {
                order: 1;
                margin-top: 0;
                margin-bottom: 4px;
            }

            /* Profit on Win second */
            .profit-display {
                order: 2;
                margin-top: 0;
                padding-top: 12px;
                padding-bottom: 12px;
            }

            /* Amount label (section-title) third */
            .section-title {
                order: 3;
                margin-bottom: 8px;
            }

            /* Bet amount input fourth */
            .bet-amount-container {
                order: 4;
                margin-bottom: 0;
            }

            /* Quick bet buttons fifth */
            .quick-bet-buttons {
                order: 5;
                margin-top: 8px;
            }
        }

        /* ============================================
           MEDIUM MOBILE DEVICES (481px - 767px)
           ============================================ */
        @media (min-width: 481px) and (max-width: 767px) {
            .top-navbar {
                height: 60px;
                padding: 0 16px;
            }

            .logo {
                font-size: 24px;
            }

            .originals-tab span {
                display: inline;
            }

            .wallet-btn span {
                display: inline;
            }

            .wallet-container {
                display: flex;
            }

            .main-layout {
                flex-direction: column;
                padding-top: 60px;
            }

            .main-content {
                order: 1;
            }

            .control-panel {
                order: 2;
                width: 100%;
                border-right: none;
                border-top: 1px solid var(--border-color);
                border-bottom: none;
            }

            .control-section:first-child {
                display: flex;
                flex-direction: column;
            }

            .roll-button { order: 1; margin-top: 0; }
            .profit-display { order: 2; }
            .section-title { order: 3; }
            .bet-amount-container { order: 4; }
            .quick-bet-buttons { order: 5; }

            .input-fields {
                flex-direction: row;
                gap: 10px;
                align-items: stretch;
            }

            .input-field {
                flex: 1;
                min-width: 0;
                flex-direction: column;
                align-items: stretch;
                justify-content: flex-start;
                padding: 12px 10px;
            }

            .input-field .input-label {
                margin-bottom: 8px;
                flex-shrink: 0;
                min-width: unset;
                height: auto;
                min-height: auto;
            }

            .input-field .input-wrapper {
                flex: 1;
                max-width: 100%;
                width: 100%;
            }

            .fairness-btn {
                order: 99;
                margin-top: 16px;
                align-self: center;
            }

            .main-content {
                padding: 24px 16px;
            }

            .modal-content {
                width: 90%;
                max-width: 450px;
            }
        }

        /* ============================================
           TABLET DEVICES (768px - 1024px)
           ============================================ */
        @media (min-width: 768px) and (max-width: 1024px) {
            .control-panel {
                width: 300px;
                padding: 20px;
            }

            .main-content {
                padding: 30px 20px;
            }

            .input-fields {
                flex-wrap: wrap;
                gap: 16px;
            }

            .input-field {
                flex: 1;
                min-width: 200px;
            }

            .modal-content {
                width: 80%;
                max-width: 500px;
            }
        }

        /* ============================================
           LANDSCAPE ORIENTATION ON MOBILE
           ============================================ */
        @media (max-height: 500px) and (orientation: landscape) {
            .top-navbar {
                height: 48px;
            }

            .main-layout {
                padding-top: 48px;
            }

            .modal-content {
                max-height: 90vh;
            }

            .wallet-balance-section,
            .tasks-list,
            .transactions-list,
            .transfer-form,
            .user-form,
            .profile-content,
            .settings-content,
            .deposit-body,
            .withdraw-body,
            .fairness-body {
                max-height: 60vh;
                overflow-y: auto;
            }

            .dice-slider-container {
                margin-bottom: 20px;
            }

            .input-fields {
                flex-direction: row;
                flex-wrap: wrap;
            }

            .input-field {
                flex: 1;
                min-width: 120px;
            }
        }

        /* ============================================
           HIGH-DPI / RETINA DISPLAYS
           ============================================ */
        @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
            .quick-bet-btn,
            .action-btn,
            .claim-btn,
            .filter-btn,
            .user-submit-btn,
            .logout-btn,
            .settings-btn,
            .delete-account-btn,
            .delete-confirm-btn,
            .notification-btn,
            .verify-deposit-btn,
            .confirm-withdraw-btn,
            .referral-code-copy-btn,
            .confirm-referral-btn,
            .dev-action-btn,
            .pending-operation-btn,
            .clear-all-notifications-btn,
            .account-banned-btn,
            .dev-confirm-add-balance-btn,
            .dev-delete-confirm-btn,
            .copy-address-btn,
            }
            /* slider-handle must keep translate(-50%, -50%) and add translateZ alongside it */
            .slider-handle {
                transform: translate(-50%, -50%) translateZ(0);
            }
        }

        /* ============================================
           SAFE AREA INSETS FOR NOTCH DEVICES
           ============================================ */
        @supports (padding-top: env(safe-area-inset-top)) {
            .top-navbar {
                padding-top: env(safe-area-inset-top);
                padding-left: max(12px, env(safe-area-inset-left));
                padding-right: max(12px, env(safe-area-inset-right));
            }

            .main-layout {
                padding-top: calc(56px + env(safe-area-inset-top));
            }

            .success-notification,
            .error-notification {
                top: calc(70px + env(safe-area-inset-top));
                right: max(12px, env(safe-area-inset-right));
                left: auto;
            }
        }

        /* ============================================
           REDUCED MOTION PREFERENCE
           ============================================ */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }

            .page-loader {
                transition: none;
            }

            .slider-handle {
                transition: none;
            }
        }

        /* ============================================
           DARK MODE SUPPORT (if system preference)
           ============================================ */
        @media (prefers-color-scheme: dark) {
            /* Already dark theme - no changes needed */
        }

        /* ============================================
           PRINT STYLES
           ============================================ */
        @media print {
            .top-navbar,
            .control-panel,
            .fairness-btn,
            .wallet-modal,
            .tasks-modal,
            .transactions-modal,
            .transfer-modal,
            .user-modal,
            .profile-modal,
            .settings-modal,
            .delete-confirm-modal,
            .deposit-modal,
            .withdraw-modal,
            .fairness-modal,
            .referral-code-modal,
            .enter-referral-modal,
            .dev-accounts-modal,
            .dev-account-details-modal,
            .dev-add-balance-modal,
            .dev-delete-confirm-modal,
            .account-banned-modal,
            .dev-pending-operations-modal,
            .user-notifications-modal,
            .login-notification-modal,
            .help-modal,
            .page-loader,
            .success-notification,
            .error-notification {
                display: none !important;
            }

            .main-content {
                padding: 0;
            }

            body {
                background: white;
                color: black;
            }
        }

        /* ============================================
           TOUCH DEVICE OPTIMIZATIONS
           ============================================ */
        @media (hover: none) and (pointer: coarse) {
            /* Larger touch targets for touch devices */
            .quick-bet-btn,
            .action-btn,
            .filter-btn,
            .claim-btn,
            .user-submit-btn,
            .logout-btn,
            .settings-btn,
            .delete-account-btn,
            .delete-confirm-btn,
            .notification-btn,
            .verify-deposit-btn,
            .confirm-withdraw-btn,
            .referral-code-copy-btn,
            .confirm-referral-btn,
            .dev-action-btn,
            .pending-operation-btn,
            .clear-all-notifications-btn,
            .account-banned-btn,
            .dev-confirm-add-balance-btn,
            .dev-delete-confirm-btn,
            .copy-address-btn,
            .profile-referral-copy-btn,
            .toggle-password-btn,
            .close-wallet-btn,
            .close-tasks-btn,
            .close-help-btn,
            .close-transactions-btn,
            .close-transfer-btn,
            .close-user-btn,
            .close-profile-btn,
            .close-settings-btn,
            .close-delete-confirm-btn,
            .close-deposit-btn,
            .close-withdraw-btn,
            .close-fairness-btn,
            .close-enter-referral-btn,
            .close-dev-accounts-btn,
            .close-dev-details-btn,
            .close-dev-add-balance-btn,
            .close-dev-delete-confirm-btn,
            .close-dev-pending-operations-btn,
            .close-user-notifications-btn,
            .close-notification-btn,
            .help-btn {
                min-height: 44px;
                min-width: 44px;
            }

            /* Remove hover effects on touch devices */
            .quick-bet-btn:hover,
            .action-btn:hover,
            .filter-btn:hover,
            .claim-btn:hover,
            .user-submit-btn:hover,
            .logout-btn:hover,
            .settings-btn:hover,
            .delete-account-btn:hover,
            .delete-confirm-btn:hover,
            .notification-btn:hover,
            .verify-deposit-btn:hover,
            .confirm-withdraw-btn:hover,
            .referral-code-copy-btn:hover,
            .confirm-referral-btn:hover,
            .dev-action-btn:hover,
            .pending-operation-btn:hover,
            .clear-all-notifications-btn:hover,
            .account-banned-btn:hover,
            .dev-confirm-add-balance-btn:hover,
            .dev-delete-confirm-btn:hover,
            .copy-address-btn:hover,
            .transfer-button:hover,
            .roll-button:hover {
                transform: none;
            }

            /* Add active state for touch feedback */
            .quick-bet-btn:active,
            .action-btn:active,
            .filter-btn:active,
            .claim-btn:active,
            .user-submit-btn:active,
            .logout-btn:active,
            .settings-btn:active,
            .delete-account-btn:active,
            .delete-confirm-btn:active,
            .notification-btn:active,
            .verify-deposit-btn:active,
            .confirm-withdraw-btn:active,
            .referral-code-copy-btn:active,
            .confirm-referral-btn:active,
            .dev-action-btn:active,
            .pending-operation-btn:active,
            .clear-all-notifications-btn:active,
            .account-banned-btn:active,
            .dev-confirm-add-balance-btn:active,
            .dev-delete-confirm-btn:active,
            .copy-address-btn:active,
            .transfer-button:active,
            .roll-button:active {
                transform: scale(0.98);
                opacity: 0.9;
            }
        }

        /* ============================================
           FOCUS STYLES FOR ACCESSIBILITY
           ============================================ */
        button:focus-visible,
        input:focus-visible,
        .action-btn:focus-visible,
        .quick-bet-btn:focus-visible,
        .claim-btn:focus-visible,
        .filter-btn:focus-visible,
        .user-submit-btn:focus-visible,
        .logout-btn:focus-visible,
        .settings-btn:focus-visible,
        .delete-account-btn:focus-visible,
        .delete-confirm-btn:focus-visible,
        .notification-btn:focus-visible,
        .verify-deposit-btn:focus-visible,
        .confirm-withdraw-btn:focus-visible,
        .referral-code-copy-btn:focus-visible,
        .confirm-referral-btn:focus-visible,
        .dev-action-btn:focus-visible,
        .pending-operation-btn:focus-visible,
        .clear-all-notifications-btn:focus-visible,
        .account-banned-btn:focus-visible,
        .dev-confirm-add-balance-btn:focus-visible,
        .dev-delete-confirm-btn:focus-visible,
        .copy-address-btn:focus-visible,
        .transfer-button:focus-visible,
        .roll-button:focus-visible,
        .enter-referral-btn:focus-visible,
        .profile-referral-copy-btn:focus-visible {
            outline: 2px solid var(--accent-cyan);
            outline-offset: 2px;
        }

        /* ============================================
           UTILITY CLASSES FOR RESPONSIVE DESIGN
           ============================================ */
        .hide-on-mobile {
            display: block;
        }

        .show-on-mobile {
            display: none;
        }

        @media (max-width: 480px) {
            .hide-on-mobile {
                display: none !important;
            }

            .show-on-mobile {
                display: block !important;
            }
        }

        /* Text truncation for mobile */
        .truncate-mobile {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        @media (max-width: 480px) {
            .truncate-mobile {
                max-width: 120px;
            }
        }

        /* Flexible grid for mobile */
        .flex-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }

        .flex-grid > * {
            flex: 1 1 calc(50% - 6px);
            min-width: 140px;
        }

        @media (max-width: 480px) {
            .flex-grid > * {
                flex: 1 1 100%;
            }
        }
    

/* ════════════════════════════════════════ */


        /* ---------- Fonts ---------- */
        body { font-family: 'Inter', sans-serif; }

        /* ---------- Backdrop ---------- */
        .user-modal {
            background-color: rgba(0, 0, 0, 0.80) !important;
            backdrop-filter: blur(8px) !important;
            -webkit-backdrop-filter: blur(8px) !important;
        }

        /* ---------- Card ---------- */
        .user-modal-content {
            position: relative !important;
            width: 90% !important;
            max-width: 448px !important;
            background: rgba(14, 19, 46, 0.60) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
            border: 1px solid rgba(255, 255, 255, 0.10) !important;
            border-radius: 16px !important;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
            overflow: visible !important;
            padding: 0 !important;
            animation: boulietScale 0.3s ease !important;
        }
        @keyframes boulietScale {
            from { transform: scale(0.90); opacity: 0; }
            to   { transform: scale(1);    opacity: 1; }
        }

        /* ---------- Close button (now absolute top-right) ---------- */
        .close-user-btn {
            position: absolute !important;
            top: 14px !important;
            right: 14px !important;
            background: none !important;
            border: none !important;
            color: rgba(255,255,255,0.45) !important;
            cursor: pointer !important;
            width: 32px !important;
            height: 32px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            border-radius: 50% !important;
            transition: color 0.2s ease, background 0.2s ease !important;
            z-index: 10 !important;
        }
        .close-user-btn:hover {
            color: #fff !important;
            background: rgba(255,255,255,0.08) !important;
        }

        /* ---------- Logo + Header ---------- */
        .bouliet-modal-header {
            text-align: center;
            padding: 36px 32px 0;
        }
        .bouliet-logo-wrap {
            display: flex;
            justify-content: center;
            margin-bottom: 14px;
        }
        .bouliet-logo-img {
            width: 64px;
            height: 64px;
            border-radius: 12px;
            object-fit: cover;
            box-shadow: 0 10px 30px rgba(26, 208, 147, 0.30);
            animation: boulietLogoFloat 4s ease-in-out infinite;
        }
        @keyframes boulietLogoFloat {
            0%,100% { transform: translateY(0); }
            50%      { transform: translateY(-6px); }
        }
        .bouliet-modal-title {
            font-family: 'Inter', sans-serif;
            font-size: 22px;
            font-weight: 700;
            color: #fff;
            margin: 0 0 6px;
        }
        .bouliet-modal-subtitle {
            font-size: 14px;
            color: #9CA3AF;
            margin: 0 0 24px;
        }

        /* ---------- Tabs ---------- */
        .user-tabs {
            display: flex !important;
            border-bottom: 1px solid rgba(255,255,255,0.08) !important;
            background: transparent !important;
        }
        .user-tab {
            flex: 1 !important;
            padding: 14px !important;
            background: none !important;
            border: none !important;
            color: rgba(255,255,255,0.40) !important;
            font-family: 'Inter', sans-serif !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            cursor: pointer !important;
            position: relative !important;
            transition: color 0.2s ease !important;
        }
        .user-tab:hover { color: rgba(255,255,255,0.80) !important; }
        .user-tab.active { color: #1AD093 !important; }
        .user-tab.active::after {
            content: '' !important;
            position: absolute !important;
            bottom: -1px !important;
            left: 0 !important;
            width: 100% !important;
            height: 3px !important;
            background: linear-gradient(to right, #1AD093, #3C46CC) !important;
            border-radius: 3px 3px 0 0 !important;
        }

        /* ---------- Forms ---------- */
        .user-form {
            padding: 24px 32px !important;
            display: none !important;
        }
        .user-form.active { display: block !important; }

        /* ---------- Labels ---------- */
        .form-group { margin-bottom: 16px !important; }
        .form-group label {
            display: block !important;
            font-family: 'Inter', sans-serif !important;
            font-size: 13px !important;
            font-weight: 500 !important;
            color: #9CA3AF !important;
            margin-bottom: 8px !important;
        }

        /* ---------- Inputs ---------- */
        .user-input {
            width: 100% !important;
            padding: 12px 16px !important;
            background: rgba(255,255,255,0.05) !important;
            border: 1px solid rgba(255,255,255,0.10) !important;
            border-radius: 12px !important;
            color: #fff !important;
            font-family: 'Inter', sans-serif !important;
            font-size: 15px !important;
            outline: none !important;
            transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
        }
        .user-input:focus {
            border-color: #1AD093 !important;
            box-shadow: 0 0 0 3px rgba(26,208,147,0.12) !important;
        }
        .user-input::placeholder { color: rgba(255,255,255,0.25) !important; }

        /* eye button */
        .password-input-wrapper .user-input { padding-right: 46px !important; }
        .toggle-password-btn {
            color: rgba(255,255,255,0.30) !important;
            transition: color 0.2s ease !important;
        }
        .toggle-password-btn:hover {
            color: #fff !important;
            background: rgba(255,255,255,0.06) !important;
        }
        .toggle-password-btn:active { transform: translateY(-50%) scale(0.95) !important; }

        /* hint */
        .input-hint { color: rgba(255,255,255,0.28) !important; font-size: 12px !important; }

        /* ---------- Form footer / Submit ---------- */
        .form-footer { margin-top: 24px !important; }
        .user-submit-btn {
            width: 100% !important;
            padding: 13px !important;
            background: linear-gradient(to right, #1AD093, #3C46CC) !important;
            border: none !important;
            border-radius: 12px !important;
            color: #fff !important;
            font-family: 'Inter', sans-serif !important;
            font-size: 15px !important;
            font-weight: 600 !important;
            cursor: pointer !important;
            transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
        }
        .user-submit-btn:hover {
            opacity: 0.88 !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 8px 24px rgba(26,208,147,0.25) !important;
        }
        .user-submit-btn:active { transform: translateY(0) !important; opacity: 1 !important; }

        /* ---------- Errors ---------- */
        .form-error {
            color: #F87171 !important;
            font-family: 'Inter', sans-serif !important;
            font-size: 13px !important;
            text-align: center !important;
            margin-top: 10px !important;
            min-height: 20px !important;
        }

        /* ---------- Footer ---------- */
        .user-modal-footer {
            padding: 16px 32px !important;
            background: rgba(0,0,0,0.15) !important;
            border-top: 1px solid rgba(255,255,255,0.07) !important;
            border-radius: 0 0 16px 16px !important;
        }
        .user-info, .current-user {
            font-family: 'Inter', sans-serif !important;
            font-size: 13px !important;
            color: rgba(255,255,255,0.32) !important;
        }
        .user-info i, .current-user i { color: #1AD093 !important; }

        /* ---------- Hide old header (replaced by bouliet-modal-header) ---------- */
        .user-modal-header { display: none !important; }

        /* ---------- Switcher ---------- */
        .bouliet-switcher {
            margin-top: 20px;
            text-align: center;
            font-family: 'Inter', sans-serif;
            font-size: 13px;
        }
        .bouliet-switcher span {
            color: #9CA3AF;
        }
        .bouliet-switcher button {
            background: none;
            border: none;
            color: #1AD093;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            margin-left: 4px;
            padding: 0;
            transition: opacity 0.2s ease;
        }
        .bouliet-switcher button:hover {
            text-decoration: underline;
            opacity: 0.85;
        }
    

/* ════════════════════════════════════════ */


        /* Page Loader Styles */
        .page-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #070B24 0%, #0E132E 50%, #13183A 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 99999;
            transition: opacity 0.6s ease, visibility 0.6s ease;
        }

        .page-loader.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        .loader-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 30px;
        }

        /* CSS Drawn Logo */
        .loader-logo {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            animation: logoFloat 3s ease-in-out infinite;
        }

        .logo-text {
            font-family: 'Brush Script MT', 'Segoe Script', cursive;
            font-size: 52px;
            font-weight: 400;
            background: linear-gradient(135deg, #9B7CB6 0%, #B8A4D0 50%, #7A5A9C 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 0 30px rgba(155, 124, 182, 0.5);
            letter-spacing: 2px;
            animation: textGlow 2s ease-in-out infinite;
        }

        @keyframes textGlow {
            0%, 100% { filter: brightness(1); }
            50% { filter: brightness(1.2); }
        }

        .balls-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: -20px;
            position: relative;
        }

        .ball {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            position: relative;
            animation: ballPulse 2s ease-in-out infinite;
        }

        .red-ball {
            background: radial-gradient(circle at 35% 35%, #FF6B6B 0%, #E53935 30%, #C62828 60%, #8B0000 100%);
            box-shadow: 
                inset -10px -10px 30px rgba(0, 0, 0, 0.4),
                inset 10px 10px 30px rgba(255, 255, 255, 0.3),
                0 10px 30px rgba(229, 57, 53, 0.5),
                0 0 40px rgba(229, 57, 53, 0.3);
            z-index: 2;
            margin-right: -20px;
        }

        .red-ball::before {
            content: '';
            position: absolute;
            top: 20%;
            left: 25%;
            width: 35%;
            height: 35%;
            background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
            border-radius: 50%;
        }

        .green-ball {
            background: radial-gradient(circle at 35% 35%, #81C784 0%, #4CAF50 30%, #2E7D32 60%, #1B5E20 100%);
            box-shadow: 
                inset -10px -10px 30px rgba(0, 0, 0, 0.4),
                inset 10px 10px 30px rgba(255, 255, 255, 0.3),
                0 10px 30px rgba(76, 175, 80, 0.5),
                0 0 40px rgba(76, 175, 80, 0.3);
            z-index: 1;
            animation-delay: 0.3s;
        }

        .green-ball::before {
            content: '';
            position: absolute;
            top: 20%;
            left: 25%;
            width: 35%;
            height: 35%;
            background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
            border-radius: 50%;
        }

        @keyframes ballPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        @keyframes logoFloat {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }

        /* Progress Bar */
        .loader-progress {
            width: 200px;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
            position: relative;
        }

        .loader-bar {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #3C46CC, #6A5AED, #26D0C4);
            border-radius: 2px;
            animation: loadingProgress 2.5s ease-in-out infinite;
            box-shadow: 0 0 10px rgba(60, 70, 204, 0.5);
        }

        @keyframes loadingProgress {
            0% { width: 0%; left: 0; }
            50% { width: 70%; left: 15%; }
            100% { width: 100%; left: 100%; }
        }

        /* Loading Text */
        .loader-text {
            font-size: 14px;
            color: #8C90B8;
            letter-spacing: 2px;
        }

        .loading-dots::after {
            content: '';
            animation: dots 1.5s steps(4, end) infinite;
        }

        @keyframes dots {
            0% { content: ''; }
            25% { content: '.'; }
            50% { content: '..'; }
            75% { content: '...'; }
            100% { content: ''; }
        }

        /* Particles Effect */
        .page-loader::before,
        .page-loader::after {
            content: '';
            position: absolute;
            width: 300px;
            height: 300px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(60, 70, 204, 0.1) 0%, transparent 70%);
            animation: pulse 4s ease-in-out infinite;
        }

        .page-loader::before {
            top: 10%;
            left: 10%;
        }

        .page-loader::after {
            bottom: 10%;
            right: 10%;
            animation-delay: 2s;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.2); opacity: 0.8; }
        }

        /* ═══════════════════════════════════════════
           GAME TABS SELECTOR
        ═══════════════════════════════════════════ */
        .games-tabs {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        @media (min-width: 769px) {
            .games-tabs {
                margin-left: 32px;
            }
        }
        .game-tab {
            display: flex;
            align-items: center;
            gap: 7px;
            padding: 7px 14px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 13px;
            color: var(--text-secondary);
            cursor: pointer;
            border: 1px solid transparent;
            transition: all 0.2s;
            background: transparent;
            white-space: nowrap;
        }
        .game-tab:hover {
            color: var(--text-primary);
            background: var(--bg-card);
            border-color: var(--border-color);
        }
        .game-tab.active {
            background: linear-gradient(135deg, var(--accent-blue), #5A4FCF);
            color: var(--text-primary);
            border-color: transparent;
            box-shadow: 0 4px 12px rgba(60,70,204,0.35);
        }
        .game-tab i { font-size: 14px; }

        /* ═══════════════════════════════════════════
           MINES GAME
        ═══════════════════════════════════════════ */
        #minesPanel, #plinkoPanel, #wheelPanel { display: none; }

        .mines-board {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            width: min(520px, 100%);
            max-width: 520px;
            margin: 0 auto;
        }
        .mine-cell {
            aspect-ratio: 1;
            background: var(--bg-input);
            border: 1.5px solid var(--border-color);
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 38px;
            transition: all 0.18s;
            position: relative;
            overflow: hidden;
        }
        .mine-cell:hover:not(.revealed) {
            background: var(--bg-card);
            border-color: var(--accent-blue);
            transform: scale(1.04);
        }
        .mine-cell.gem {
            background: linear-gradient(135deg, #0d3d2a, #1a5c3f);
            border-color: var(--accent-green);
            box-shadow: 0 0 12px rgba(26,208,147,0.3);
            animation: gemPop 0.3s ease;
        }
        .mine-cell.bomb {
            background: linear-gradient(135deg, #3d0d0d, #5c1a1a);
            border-color: var(--accent-red);
            box-shadow: 0 0 12px rgba(250,48,96,0.3);
            animation: bombShake 0.4s ease;
        }
        .mine-cell.safe-reveal {
            background: var(--bg-card);
            border-color: var(--border-color);
            opacity: 0.5;
            cursor: default;
        }
        @keyframes gemPop {
            0% { transform: scale(0.7); }
            60% { transform: scale(1.15); }
            100% { transform: scale(1); }
        }
        @keyframes bombShake {
            0%,100% { transform: translateX(0); }
            20% { transform: translateX(-5px); }
            40% { transform: translateX(5px); }
            60% { transform: translateX(-4px); }
            80% { transform: translateX(4px); }
        }
        .mines-multiplier {
            font-size: 36px;
            font-weight: 800;
            color: var(--accent-green);
            font-family: 'Orbitron', sans-serif;
            text-shadow: 0 0 20px rgba(26,208,147,0.5);
            margin: 6px 0 4px;
        }
        .mines-gems-label {
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 16px;
        }
        .mines-control { display: flex; flex-direction: column; gap: 10px; }
        .mines-count-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 8px 12px;
            font-size: 14px;
            color: var(--text-secondary);
        }
        .mines-count-row span:last-child {
            color: var(--text-primary);
            font-weight: 600;
        }
        .mines-count-btns {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        .mines-count-btns button {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 16px;
            cursor: pointer;
            transition: background 0.15s;
            display: flex; align-items: center; justify-content: center;
        }
        .mines-count-btns button:hover { background: var(--accent-blue); border-color: var(--accent-blue); }
        .mines-start-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #1AD093, #0fa86d);
            border: none;
            border-radius: 10px;
            color: #fff;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.15s;
        }
        .mines-start-btn:hover { opacity: 0.9; transform: translateY(-1px); }
        .mines-start-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
        .mines-cashout-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, var(--accent-gold), #e6a800);
            border: none;
            border-radius: 10px;
            color: #000;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: opacity 0.2s;
            display: none;
        }
        .mines-cashout-btn:hover { opacity: 0.85; }

        /* ═══════════════════════════════════════════
           PLINKO GAME
        ═══════════════════════════════════════════ */
        #plinkoBoardWrap {
            position: relative;
            width: 100%;
            max-width: 520px;
            margin: 0 auto;
        }
        #plinkoCanvas {
            width: 100%;
            border-radius: 12px 12px 0 0;
            display: block;
        }

        @media (max-width: 768px) {
            #plinkoPanel .main-content {
                padding: 12px 4px 8px;
                overflow-x: hidden;
            }
            #plinkoPanel .game-title {
                font-size: 38px;
                margin-bottom: 10px;
            }
            #plinkoPanel {
                padding-top: 120px !important;
            }
            #minesPanel {
                padding-top: 120px !important;
            }
            #minesPanel .game-title {
                font-size: 38px;
                margin-bottom: 10px;
            }
            #wheelPanel {
                padding-top: 120px !important;
            }
            #wheelPanel .game-title {
                font-size: 38px;
                margin-bottom: 10px;
            }
            #plinkoBoardFlex {
                margin-left: 0 !important;
                justify-content: center !important;
                flex-direction: column !important;
                align-items: center !important;
                width: 100%;
            }
            #plinkoBoardWrap {
                max-width: 100%;
                width: 100%;
            }
            #plinkoMultHistory {
                flex-direction: row !important;
                flex-wrap: wrap;
                justify-content: center;
                min-width: unset !important;
                padding-top: 6px !important;
                gap: 4px !important;
            }
        }

        @media (max-width: 480px) {
            #plinkoPanel {
                padding-top: 110px !important;
            }
            #plinkoPanel .game-title {
                font-size: 34px;
                margin-bottom: 6px;
            }
            #minesPanel {
                padding-top: 110px !important;
            }
            #minesPanel .game-title {
                font-size: 34px;
                margin-bottom: 6px;
            }
            #wheelPanel {
                padding-top: 110px !important;
            }
            #wheelPanel .game-title {
                font-size: 34px;
                margin-bottom: 6px;
            }
            #plinkoBoardWrap {
                border-radius: 8px;
                overflow: hidden;
            }
        }
        .plinko-buckets {
            display: flex;
            gap: 4px;
            width: min(620px, 100%);
            max-width: 620px;
            margin: 0 auto 0;
        }
        .plinko-bucket {
            flex: 1;
            padding: 7px 2px;
            border-radius: 0 0 6px 6px;
            text-align: center;
            font-size: 13px;
            font-weight: 800;
            transition: transform 0.15s, box-shadow 0.15s;
        }
        .plinko-bucket.hit {
            transform: scale(1.15);
            box-shadow: 0 0 14px currentColor;
        }
        .plinko-drop-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, var(--accent-purple), #8B5CF6);
            border: none;
            border-radius: 10px;
            color: #fff;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.15s;
            margin-top: 4px;
        }
        .plinko-drop-btn:hover { opacity: 0.9; transform: translateY(-1px); }
        @keyframes speedPanelIn {
            from { opacity:0; transform:scale(0.92) translateY(20px); }
            to   { opacity:1; transform:scale(1) translateY(0); }
        }
        @keyframes speedOverlayIn {
            from { opacity:0; }
            to   { opacity:1; }
        }

        /* ── Lightning Speed Toggle Button ── */
        .plinko-speed-toggle-btn {
            width: 38px; height: 38px;
            border-radius: 10px;
            border: none;
            background: transparent;
            color: #ffffff;
            font-size: 18px;
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.25s ease;
            filter: drop-shadow(0 0 0px #ffffff);
            position: relative;
        }
        .plinko-speed-toggle-btn:hover,
        .plinko-speed-toggle-btn.on {
            background: transparent;
            border-color: transparent;
            filter:
                drop-shadow(0 0 6px rgba(255,255,255,0.9))
                drop-shadow(0 0 14px rgba(200,220,255,0.7))
                drop-shadow(0 0 28px rgba(160,190,255,0.4));
            transform: scale(1.08);
        }
        .plinko-speed-toggle-btn.on {
            animation: boltPulse 1.8s ease-in-out infinite;
        }
        @keyframes boltPulse {
            0%,100% { filter: drop-shadow(0 0 5px rgba(255,255,255,0.8))  drop-shadow(0 0 12px rgba(200,220,255,0.6)); }
            50%     { filter: drop-shadow(0 0 10px rgba(255,255,255,1))   drop-shadow(0 0 24px rgba(180,210,255,0.9)) drop-shadow(0 0 40px rgba(140,180,255,0.5)); }
        }

        /* ── Speed Choice Buttons ── */
        .speed-btn {
            flex: 1; padding: 9px 3px; border-radius: 10px; cursor: pointer;
            border: 1.5px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.04);
            display: flex; flex-direction: column; align-items: center; gap: 5px;
            transition: all 0.18s;
        }
        .speed-label {
            font-size: 9px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
        }
        .speed-btn[data-speed="slow"].active  {
            border-color: rgba(34,197,94,0.85)  !important;
            background: rgba(34,197,94,0.18)    !important;
            box-shadow: 0 0 12px rgba(34,197,94,0.3);
        }
        .speed-btn[data-speed="normal"].active {
            border-color: rgba(99,102,241,0.85) !important;
            background: rgba(99,102,241,0.18)   !important;
            box-shadow: 0 0 12px rgba(99,102,241,0.3);
        }
        .speed-btn[data-speed="fast"].active  {
            border-color: rgba(250,48,96,0.85)  !important;
            background: rgba(250,48,96,0.18)    !important;
            box-shadow: 0 0 12px rgba(250,48,96,0.3);
        }
        .speed-btn:hover { transform: translateY(-2px); }

        /* Speed wrapper: hidden by default, shown only on plinko via JS */
        #plinkoSpeedWrapper { display: none; }

        .plinko-risk-row {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
        }
        .plinko-risk-btn {
            flex: 1;
            padding: 7px;
            border-radius: 7px;
            border: 1px solid var(--border-color);
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .plinko-risk-btn.active, .plinko-risk-btn:hover {
            background: var(--accent-blue);
            border-color: var(--accent-blue);
            color: #fff;
        }

        /* ═══════════════════════════════════════════
           WHEEL GAME
        ═══════════════════════════════════════════ */
        #wheelTitle {
            margin-bottom: 16px;
            margin-top: -12px;
        }
        .wheel-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            margin-top: 16px;
        }
        .wheel-container {
            position: relative;
            width: 280px;
            height: 280px;
        }
        @media (max-width: 768px) {
            .wheel-container {
                width: min(320px, 85vw);
                height: min(320px, 85vw);
            }
            #wheelCanvas {
                width: 100% !important;
                height: 100% !important;
            }
            .wheel-pointer {
                top: calc(-18px * min(320px, 85vw) / 280);
            }
        }
        #wheelCanvas {
            border-radius: 0;
            box-shadow: none;
        }
        .wheel-pointer {
            position: absolute;
            top: -18px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 12px solid transparent;
            border-right: 12px solid transparent;
            border-top: 24px solid var(--accent-gold);
            filter: drop-shadow(0 2px 6px rgba(255,215,0,0.6));
            z-index: 10;
        }
        .wheel-result-display {
            font-family: 'Inter', sans-serif;
            text-align: center;
            padding: 14px 24px;
            border-radius: 14px;
            min-width: 220px;
            min-height: 58px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            background: rgba(255,255,255,0.03);
            border: 1.5px solid rgba(255,255,255,0.07);
            color: var(--text-secondary);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .wheel-result-display::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 14px;
            opacity: 0;
            transition: opacity 0.3s;
        }
        .wheel-result-display .res-icon   { font-size: 24px; line-height: 1; }
        .wheel-result-display .res-mult   { font-family: 'Orbitron', sans-serif; font-size: 22px; font-weight: 900; letter-spacing: 1.5px; line-height: 1; }
        .wheel-result-display .res-amount { font-size: 13px; font-weight: 600; letter-spacing: 0.5px; opacity: 0.85; }

        /* WIN */
        .wheel-result-display.win {
            background: linear-gradient(135deg, rgba(26,208,147,0.12), rgba(26,208,147,0.04));
            border-color: rgba(26,208,147,0.4);
            box-shadow: 0 0 24px rgba(26,208,147,0.15), inset 0 0 20px rgba(26,208,147,0.05);
            animation: resultPopIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
        }
        .wheel-result-display.win .res-mult   { color: #1AD093; text-shadow: 0 0 14px rgba(26,208,147,0.7); }
        .wheel-result-display.win .res-amount { color: #6EE7B7; }
        .wheel-result-display.win::before     { background: radial-gradient(ellipse at 50% 0%, rgba(26,208,147,0.18), transparent 70%); opacity: 1; }

        /* LOSE */
        .wheel-result-display.lose {
            background: linear-gradient(135deg, rgba(250,48,96,0.10), rgba(250,48,96,0.03));
            border-color: rgba(250,48,96,0.35);
            box-shadow: 0 0 20px rgba(250,48,96,0.12), inset 0 0 16px rgba(250,48,96,0.04);
            animation: resultShakeIn 0.45s ease;
        }
        .wheel-result-display.lose .res-mult   { color: #FA3060; text-shadow: 0 0 12px rgba(250,48,96,0.6); }
        .wheel-result-display.lose .res-amount { color: #FDA4AF; }
        .wheel-result-display.lose::before     { background: radial-gradient(ellipse at 50% 0%, rgba(250,48,96,0.15), transparent 70%); opacity: 1; }

        /* JACKPOT */
        .wheel-result-display.jackpot {
            background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.06));
            border-color: rgba(255,215,0,0.5);
            box-shadow: 0 0 30px rgba(255,215,0,0.2), inset 0 0 24px rgba(255,215,0,0.08);
            animation: jackpotPulse 0.6s ease-in-out infinite alternate;
        }
        .wheel-result-display.jackpot .res-mult   { color: #FFD700; text-shadow: 0 0 20px #FFD700, 0 0 40px #FFB800; }
        .wheel-result-display.jackpot .res-amount { color: #FDE68A; }

        @keyframes resultPopIn {
            0%   { transform: scale(0.75) translateY(8px); opacity: 0; }
            60%  { transform: scale(1.05) translateY(-3px); opacity: 1; }
            100% { transform: scale(1) translateY(0); opacity: 1; }
        }
        @keyframes resultShakeIn {
            0%   { transform: scale(0.85) translateX(-12px); opacity: 0; }
            30%  { transform: scale(1.03) translateX(8px); opacity: 1; }
            55%  { transform: translateX(-5px); }
            75%  { transform: translateX(4px); }
            90%  { transform: translateX(-2px); }
            100% { transform: translateX(0); opacity: 1; }
        }

        @keyframes jackpotPulse {
            from { transform: scale(1);   text-shadow: 0 0 20px #FFD700, 0 0 40px #FFB800; }
            to   { transform: scale(1.08); text-shadow: 0 0 40px #FFD700, 0 0 80px #FFB800, 0 0 120px #FF6600; }
        }
        @keyframes canvasGlow {
            0%,100% { box-shadow: 0 0 30px rgba(60,70,204,0.4); }
            50%      { box-shadow: 0 0 80px #FFD700, 0 0 140px #FFB800, 0 0 200px #FF8C00; }
        }
        @keyframes jackpotShake {
            0%,100% { transform: translateX(0); }
            15%     { transform: translateX(-8px) rotate(-2deg); }
            30%     { transform: translateX(8px)  rotate(2deg); }
            45%     { transform: translateX(-6px) rotate(-1deg); }
            60%     { transform: translateX(6px)  rotate(1deg); }
            75%     { transform: translateX(-3px); }
            90%     { transform: translateX(3px); }
        }
        @keyframes overlayFadeIn {
            from { opacity: 0; transform: translate(-50%, -50%) scale(0.7) translateY(30px); }
            to   { opacity: 1; transform: translate(-50%, -50%) scale(1)   translateY(0); }
        }
        @keyframes overlayFadeOut {
            from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
            to   { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
        }
        @keyframes starFloat {
            0%   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
            100% { opacity: 0; transform: translateY(-120px) scale(0.3) rotate(360deg); }
        }

        #jackpotOverlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9999;
            pointer-events: none;
        }
        #jackpotOverlay.active { display: block; }
        #jackpotBanner {
            position: absolute;
            top: 50%;
            left: 50%;
            /* لا تضع transform هنا — الأنيميشن يتولى كل شيء بما فيها translate(-50%,-50%) */
            width: min(380px, calc(100vw - 32px));
            box-sizing: border-box;
            background: linear-gradient(135deg, #1a0f00, #3d2600, #1a0f00);
            border: 3px solid #FFD700;
            border-radius: 20px;
            padding: clamp(20px, 5vw, 36px) clamp(16px, 6vw, 52px);
            text-align: center;
            box-shadow: 0 0 60px #FFD700, 0 0 120px #FFB800, inset 0 0 40px rgba(255,215,0,0.08);
            animation: overlayFadeIn 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
        }
        #jackpotBanner .jb-top {
            font-size: clamp(9px, 2.5vw, 13px);
            letter-spacing: clamp(2px, 1.2vw, 6px);
            color: #FFB800; text-transform: uppercase; font-weight: 700; margin-bottom: 8px;
        }
        #jackpotBanner .jb-mult {
            font-family: 'Orbitron', sans-serif;
            font-size: clamp(40px, 13vw, 72px);
            font-weight: 900; color: #FFD700;
            text-shadow: 0 0 30px #FFD700, 0 0 60px #FFB800; line-height: 1; margin-bottom: 4px;
        }
        #jackpotBanner .jb-label {
            font-size: clamp(11px, 3.5vw, 18px);
            letter-spacing: clamp(2px, 1vw, 4px);
            color: #FDE68A; text-transform: uppercase; font-weight: 700; margin-bottom: 16px;
        }
        #jackpotBanner .jb-amount {
            font-family: 'Orbitron', sans-serif;
            font-size: clamp(18px, 6vw, 32px);
            color: #4ade80;
            text-shadow: 0 0 20px rgba(74,222,128,0.7); font-weight: 800;
        }
        #confettiCanvas {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 9998;
        }
        .wheel-spin-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, var(--accent-gold), #e6a800);
            border: none;
            border-radius: 10px;
            color: #000;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.15s;
            margin-top: 10px;
        }
        .wheel-spin-btn:hover { opacity: 0.88; transform: translateY(-1px); }
        .wheel-spin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
        .wheel-segments-row {
            display: flex;
            gap: 6px;
            margin-bottom: 4px;
        }
        .wheel-seg-btn {
            flex: 1;
            padding: 7px;
            border-radius: 7px;
            border: 1px solid var(--border-color);
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .wheel-seg-btn.active, .wheel-seg-btn:hover {
            background: var(--accent-blue);
            border-color: var(--accent-blue);
            color: #fff;
        }
        .wheel-seg-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            pointer-events: none;
        }