
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Outfit', sans-serif;
            background: linear-gradient(135deg, #0e0e0e, #1a1a1a);
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .container {
            width: 100%;
            max-width: 420px;
           margin: 0 auto;
            padding: 16px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        /* Header Styles */
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: var(--header-bg);
            padding: 10px 15px;
            border-radius: 12px;
            margin-bottom: 15px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .header h1 {
            font-size: 1.4em; /* UPDATED: Adjusted font size */
            margin: 0;
            color: var(--primary-color);
            text-shadow: 0 0 5px var(--primary-color);
            white-space: nowrap; /* UPDATED: Ensures title stays on one line */
        }

        .balance-section {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1em;
        }

        #refresh-balance-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
            display: flex;
            align-items: center;
        }

        #refresh-balance-btn svg {
            width: 20px;
            height: 20px;
            stroke: var(--primary-color);
            transition: transform 0.5s ease;
        }

        #refresh-balance-btn.spinning svg {
            animation: spin 0.5s linear infinite;
        }

        @keyframes spin {
            100% { transform: rotate(360deg); }
        }

        /* Notice Bar */
        .notice-bar {
            background-color: var(--accent-yellow);
            color: #000;
            padding: 8px 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            font-weight: 600;
            text-align: center;
            overflow: hidden;
            position: relative;
        }

        .notice-content {
            display: inline-block;
            white-space: nowrap;
            animation: notice-scroll 30s linear infinite; /* Increased duration */
        }

        @keyframes notice-scroll {
            0% { transform: translateX(100%); }
            100% { transform: translateX(-100%); }
        }

        /* Navigation Tabs */
        .nav-tabs {
            display: flex;
            background-color: var(--header-bg);
            border-radius: 10px;
            margin-bottom: 15px;
            overflow: hidden;
            padding: 5px;
        }

        .nav-tab {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-secondary);
            padding: 12px;
            font-size: 0.9em;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.3s, color 0.3s, opacity 0.3s;
            border-radius: 8px;
        }

        .nav-tab.active {
            background-color: var(--primary-color);
            color: var(--dark-bg);
            box-shadow: 0 0 10px var(--primary-color);
        }
        
        .nav-tab:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            color: #666;
        }
        
        /* Back button for pages */
        .page-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        .back-btn {
            background: none;
            border: none;
            color: var(--primary-color);
            font-size: 1.5em;
            cursor: pointer;
            margin-right: 15px;
        }
        .page-title {
            font-size: 1.5em;
            font-weight: bold;
        }


        /* Page Content Animation */
        .page-content {
            display: none;
            flex: 1;
            flex-direction: column;
            animation: fadeIn 0.5s ease-in-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .page-content.active {
            display: flex;
        }

        /* Home Page Styles */
        .game-container {
            background: var(--card-bg);
            border-radius: 14px;
            box-shadow: 0 0 15px rgba(0,255,200,0.15);
            padding: 16px;
            margin-bottom: 16px;
            text-align: center;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(0,255,200,0.2);
        }

        .timer-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .timer-info h2 {
            margin: 0;
            font-size: 1.2em;
            color: var(--secondary-color);
        }

        .timer-info p {
            margin: 0;
            font-size: 0.9em;
            color: #ccc;
        }

        #countdown {
            font-size: 2.2em;
            font-weight: bold;
            color: var(--accent-yellow);
            text-shadow: 0 0 8px var(--accent-yellow);
        }

        #timer-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(31, 31, 31, 0.95);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 10;
        }

        #overlay-countdown-text {
            font-size: 6em;
            font-weight: 700;
            color: var(--accent-yellow);
            text-shadow: 0 0 15px var(--accent-yellow);
        }

        .betting-area {
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: opacity 0.3s; /* Added */
        }

        .betting-options, .number-grid, .size-options {
            display: grid;
            gap: 10px;
        }

        .betting-options { grid-template-columns: repeat(3, 1fr); }
        .number-grid { grid-template-columns: repeat(5, 1fr); }
        .size-options { grid-template-columns: repeat(2, 1fr); }

        .btn {
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-size: 1.2em;
            font-weight: bold;
            color: white;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
        }

        .btn:hover:not(:disabled) {
             transform: translateY(-3px);
             box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }

        .btn:disabled {
            cursor: not-allowed;
            opacity: 0.5;
        }

        .btn:active:not(:disabled) {
            transform: scale(0.95);
        }

        .btn-green { background: linear-gradient(145deg, #57c55b, #49a54c); }
        .btn-violet { background: linear-gradient(145deg, #a941c4, #8d36a4); }
        .btn-red { background: linear-gradient(145deg, #f44336, #d32f2f); }
        .btn-big { background: linear-gradient(145deg, #ff9800, #f57c00); }
        .btn-small { background: linear-gradient(145deg, #03a9f4, #0288d1); }
        .btn-num-green { background-color: #4CAF50; }
        .btn-num-red { background-color: #F44336; }
        .btn-num-0 { background: linear-gradient(to right, #F44336 50%, #9C27B0 50%); }
        .btn-num-5 { background: linear-gradient(to right, #4CAF50 50%, #9C27B0 50%); }

        .tabs {
            display: flex;
            background-color: var(--header-bg);
            border-radius: 10px;
            margin-top: 16px;
            padding: 5px;
        }

        .tab-btn {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-secondary);
            padding: 10px;
            font-size: 1em;
            font-weight: bold;
            cursor: pointer;
            border-radius: 8px;
            transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
        }

        .tab-btn.active {
            background-color: var(--primary-color);
            color: var(--dark-bg);
            box-shadow: 0 0 8px var(--primary-color);
        }

        .tab-panel {
            display: none;
            background-color: var(--card-bg);
            border-radius: 14px;
            margin-top: 5px;
        }

        .tab-panel.active {
            display: block;
        }

        /* Profile Page Styles */
        .profile-card {
            background: var(--card-bg);
            border-radius: 14px;
            padding: 20px;
            margin-bottom: 20px;
            text-align: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .profile-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: var(--gradient-primary);
            color: var(--dark-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5em;
            margin: 0 auto 15px;
            box-shadow: 0 0 15px var(--primary-color);
        }

        .profile-info {
            margin-bottom: 20px;
        }

        .profile-info h2 {
            margin-bottom: 5px;
            color: var(--primary-color);
        }

        .profile-info p {
            color: var(--text-secondary);
            margin-bottom: 10px;
        }

        .profile-menu-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .profile-menu-item {
            display: flex;
            align-items: center;
            padding: 15px;
            background-color: var(--header-bg);
            border-radius: 10px;
            cursor: pointer;
            transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
        }

        .profile-menu-item:hover {
            transform: translateY(-3px);
            background-color: rgba(0, 255, 200, 0.1);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .profile-menu-item i {
            font-size: 1.2em;
            margin-right: 15px;
            color: var(--primary-color);
            width: 25px;
            text-align: center;
        }

        .profile-menu-item span {
            font-size: 1em;
            font-weight: 500;
        }

        /* Wallet Page Styles */
        .wallet-card {
            background: var(--card-bg);
            border-radius: 14px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .balance-breakdown {
            display: flex;
            justify-content: space-around;
            text-align: center;
            margin-top: 15px;
        }
        .balance-breakdown > div {
            flex: 1;
        }
        .balance-breakdown h3 {
            font-size: 0.9em;
            color: var(--text-secondary);
            margin-bottom: 5px;
        }
        .balance-breakdown p {
            font-size: 1.2em;
            font-weight: bold;
        }

        .wallet-balance {
            text-align: center;
            margin-bottom: 20px;
        }

        .wallet-balance h2 {
            font-size: 1em; /* Smaller label */
            margin-bottom: 8px;
            color: var(--text-secondary);
        }

        .wallet-balance p {
            font-size: 2.2em; /* Adjusted size */
            font-weight: bold;
            color: var(--primary-color);
            text-shadow: 0 0 8px var(--primary-color);
        }

        .wallet-actions {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .wallet-action-btn {
            padding: 15px;
            border: none;
            border-radius: 10px;
            font-size: 1.1em;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .wallet-action-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }
        
        .wallet-action-btn:active {
            transform: scale(0.95);
        }

        .deposit-btn {
            background: var(--gradient-success);
            color: white;
        }

        .withdraw-btn {
            background: var(--gradient-danger);
            color: white;
        }

        .transaction-history {
            background: var(--card-bg);
            border-radius: 14px;
            padding: 20px;
            margin-top: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .transaction-history h3 {
            margin-bottom: 15px;
            color: var(--primary-color);
        }

        .transaction-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .transaction-item:last-child {
            border-bottom: none;
        }

        .transaction-type {
            font-weight: bold;
        }
        .transaction-date { /* NEW */
            font-size: 0.8em;
            color: var(--text-secondary);
        }

        .transaction-amount {
            font-weight: bold;
        }

        .transaction-amount.credit {
            color: #4CAF50;
        }

        .transaction-amount.debit {
            color: #F44336;
        }
        .transaction-history-list {
            max-height: 300px;
            overflow-y: auto;
        }

        /* Referral Page Styles */
        .referral-card {
            background: var(--card-bg);
            border-radius: 14px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .referral-code-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background-color: var(--header-bg);
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
        }

        .referral-code {
            font-size: 1.5em;
            font-weight: bold;
            color: var(--primary-color);
            font-family: 'Roboto Mono', monospace;
        }

        .copy-btn {
            background-color: var(--primary-color);
            color: var(--dark-bg);
            border: none;
            padding: 8px 15px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.2s;
        }

        .copy-btn:hover {
            background-color: rgba(0, 255, 200, 0.8);
            transform: scale(1.05);
        }

        .referral-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-top: 20px;
        }

        .stat-card {
            background-color: var(--header-bg);
            padding: 15px;
            border-radius: 10px;
            text-align: center;
        }

        .stat-value {
            font-size: 1.8em;
            font-weight: bold;
            color: var(--primary-color);
            margin-bottom: 5px;
        }

        .stat-label {
            color: var(--text-secondary);
            font-size: 0.9em;
        }

        /* Gift Code Page Styles */
        .gift-code-card {
            background: var(--card-bg);
            border-radius: 14px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .gift-code-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .form-group label {
            font-weight: bold;
            color: var(--text-secondary);
        }

        .form-group input {
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            background-color: var(--header-bg);
            color: var(--text-primary);
            font-size: 1em;
            transition: border-color 0.3s, box-shadow 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 8px var(--primary-color);
        }

        .submit-btn {
            background: var(--gradient-primary);
            color: var(--dark-bg);
            border: none;
            padding: 14px;
            border-radius: 8px;
            font-size: 1.1em;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        
        .submit-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 15px rgba(0, 255, 200, 0.3);
        }

        .submit-btn:active {
            transform: scale(0.95);
        }

        /* Login/Register Page Styles - REDESIGNED */
        .auth-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            flex: 1;
            background: linear-gradient(-45deg, #0e0e0e, #1a1a1a, #2c2c2e, #001f3f);
            background-size: 400% 400%;
            animation: auth-bg-animation 15s ease infinite;
        }
        
        @keyframes auth-bg-animation {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .auth-card {
            background: rgba(31, 31, 31, 0.75);
            backdrop-filter: blur(10px);
            border-radius: 14px;
            padding: 30px;
            width: 100%;
            max-width: 350px;
            box-shadow: 0 8px 32px 0 rgba(0, 255, 200, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.18);
        }

        .auth-logo {
            text-align: center;
            margin-bottom: 20px;
        }

        .auth-logo h1 {
            font-size: 2em;
            color: var(--primary-color);
            margin-bottom: 5px;
            text-shadow: 0 0 10px var(--primary-color);
        }

        .auth-logo p {
            color: var(--text-secondary);
        }

        .auth-tabs {
            display: flex;
            margin-bottom: 20px;
            background-color: var(--header-bg);
            border-radius: 8px;
            overflow: hidden;
            padding: 4px;
        }

        .auth-tab {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-secondary);
            padding: 10px;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.3s, color 0.3s;
            border-radius: 6px;
        }

        .auth-tab.active {
            background-color: var(--primary-color);
            color: var(--dark-bg);
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .checkbox-group {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.9em;
            color: var(--text-secondary);
        }

        .checkbox-group input[type="checkbox"] {
            accent-color: var(--primary-color);
            width: 16px;
            height: 16px;
        }

        /* Popup Styles */
        .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(5px);
        }

        .popup-content {
            background: var(--card-bg);
            padding: 20px;
            border-radius: 12px;
            border-top: 4px solid var(--primary-color);
            width: 85%;
            max-width: 320px;
            text-align: center;
            animation: popup-fade-in 0.3s ease-out;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        }

        @keyframes popup-fade-in {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        .popup-content h3 {
            margin-top: 0;
            color: var(--primary-color);
        }
        
        /* OLD INPUT - Kept for other popups */
        .popup-content input {
            width: 90%;
            padding: 10px;
            margin: 15px 0;
            border-radius: 5px;
            border: 1px solid #555;
            background: var(--header-bg);
            color: var(--text-primary);
            font-size: 1em;
        }

        .popup-buttons {
            display: flex;
            justify-content: space-between;
            gap: 10px;
        }

        .popup-buttons button {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            border: none;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.2s;
        }
        .popup-buttons button:hover {
            transform: translateY(-2px);
        }

        #btn-cancel {
            background-color: #666;
            color: var(--text-primary);
        }

        #btn-confirm {
            background-color: #4CAF50;
            color: white;
        }
        
        /* --- NEW: High Quality Bet Popup Styles --- */
        .bet-popup-content {
            border-top-color: var(--secondary-color);
            background: linear-gradient(var(--card-bg), #111);
        }
        
        #bet-popup-title {
            font-size: 1.5em;
            margin-bottom: 5px;
            color: var(--text-secondary);
        }
        #bet-popup-title span {
            font-weight: bold;
            color: var(--primary-color);
        }
        
        .bet-popup-balance {
            font-size: 0.9em;
            color: var(--text-secondary);
            margin-bottom: 15px;
        }
        .bet-popup-balance span {
            color: var(--accent-yellow);
            font-weight: bold;
        }

        .bet-input-container {
            display: flex;
            align-items: center;
            background: var(--header-bg);
            border-radius: 8px;
            border: 1px solid var(--header-bg);
            margin: 10px 0;
            transition: border-color 0.3s, box-shadow 0.3s;
        }
        .bet-input-container:focus-within {
            border-color: var(--primary-color);
            box-shadow: 0 0 8px var(--primary-color);
        }
        .bet-input-container span {
            font-size: 1.5em;
            font-weight: bold;
            color: var(--primary-color);
            padding-left: 15px;
        }
        
        #bet-amount {
            width: 100%;
            padding: 15px 15px 15px 10px; /* Adjusted padding */
            margin: 0;
            border: none;
            background: transparent;
            color: var(--text-primary);
            font-size: 1.8em; /* Much larger */
            font-weight: bold;
            font-family: 'Roboto Mono', monospace;
            -moz-appearance: textfield; /* Hide arrows */
        }
        #bet-amount::-webkit-outer-spin-button,
        #bet-amount::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        #bet-amount:focus {
            outline: none;
        }

        .bet-quick-select {
            display: flex;
            justify-content: space-around;
            gap: 10px;
            margin: 10px 0 20px 0;
        }
        .bet-quick-select button {
            flex: 1;
            background: var(--header-bg);
            border: 1px solid var(--header-bg);
            color: var(--text-secondary);
            padding: 8px;
            border-radius: 20px;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.2s;
        }
        .bet-quick-select button:hover {
            border-color: var(--secondary-color);
            color: var(--secondary-color);
        }

        .bet-popup-content .popup-buttons #btn-confirm {
             background: var(--gradient-primary); /* Make confirm button stand out */
             color: var(--dark-bg);
        }
        /* --- End Bet Popup Styles --- */
        
        /* NEW: Deposit Page Styles */
        .payment-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        .payment-tab {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            border: 2px solid var(--header-bg);
            background-color: var(--card-bg);
            color: var(--text-secondary);
            font-weight: bold;
            cursor: pointer;
            text-align: center;
            transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
        }
        .payment-tab:hover {
            border-color: var(--secondary-color);
        }
        .payment-tab.active {
            border-color: var(--primary-color);
            color: var(--primary-color);
            box-shadow: 0 0 8px var(--primary-color);
        }
        
        .deposit-notice {
            background-color: rgba(255, 51, 102, 0.1);
            color: var(--accent-red);
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
            text-align: center;
            font-weight: bold;
            border: 1px solid var(--accent-red);
        }
        
        .number-selection-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .number-card {
            background-color: var(--header-bg);
            padding: 15px;
            border-radius: 10px;
            cursor: pointer;
            border: 2px solid transparent;
            text-align: center;
            transition: border-color 0.3s, box-shadow 0.3s;
        }
        .number-card.selected {
            border-color: var(--primary-color);
            box-shadow: 0 0 10px var(--primary-color);
        }
        .number-card .label { font-weight: bold; }
        .number-card .number { font-size: 0.9em; color: var(--text-secondary); }
        
        .amount-quick-select {
            display: flex;
            gap: 10px;
            margin-top: 10px;
            flex-wrap: wrap;
        }
        .amount-btn {
            background-color: var(--header-bg);
            border: none;
            color: var(--text-primary);
            padding: 8px 15px;
            border-radius: 20px;
            cursor: pointer;
        }
        
        .confirmation-box {
            background-color: var(--card-bg);
            padding: 20px;
            border-radius: 10px;
            text-align: center;
        }
        
        .confirmation-box .label {
            color: var(--text-secondary);
            margin-bottom: 10px;
        }
        .confirmation-box .value-box {
            background-color: var(--header-bg);
            padding: 15px;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .confirmation-box .value-box .value {
            font-family: 'Roboto Mono', monospace;
            font-size: 1.2em;
        }


        #alert-popup-content {
            background: var(--card-bg);
            border-radius: 12px;
            border-top: 4px solid var(--secondary-color);
            padding: 25px;
        }

        #alert-popup-content.error {
            border-top-color: var(--accent-red);
        }

        #alert-title {
            font-size: 1.5em;
            margin: 0 0 10px 0;
            color: var(--primary-color);
        }

        #alert-popup-content.error #alert-title {
            color: var(--accent-red);
        }

        #alert-message {
            font-size: 1.1em;
            color: var(--text-secondary);
            margin: 0 0 20px 0;
        }

        #btn-alert-ok {
            width: 100%;
            padding: 12px;
            border-radius: 8px;
            background: var(--gradient-primary);
            color: var(--dark-bg);
            font-size: 1.1em;
            font-weight: bold;
            border: none;
            cursor: pointer;
        }

        #alert-popup-content.error #btn-alert-ok {
            background: var(--gradient-danger);
            color: white;
        }
        
        /* RESULT POPUP - REDESIGNED */
        .result-popup-content {
            width: 90%;
            max-width: 340px;
            border-radius: 15px;
            padding: 25px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            box-sizing: border-box;
        }

        .result-popup-content.win {
            background: #1a1f36;
            border: 2px solid #00f0ff;
            box-shadow: 0 0 25px #00f0ff, inset 0 0 15px #00f0ff33;
        }

        .result-popup-content.win #loss-content { display: none; }
        .result-popup-content.win #win-content { display: flex; flex-direction: column; align-items: center; }

        #win-title {
            color: #00f0ff;
            font-size: 2em;
            font-weight: 700;
            margin: 0;
            text-shadow: 0 0 5px #fff, 0 0 10px #00f0ff, 0 0 15px #00f0ff;
        }

        #win-subtitle {
            color: #ccc;
            margin: 5px 0 20px 0;
            font-size: 1.1em;
        }

        #winnings-amount {
            font-family: 'Roboto Mono', monospace;
            font-size: 2.5em;
            color: #fff;
            font-weight: 700;
            padding: 10px 20px;
            border-radius: 8px;
            background: rgba(0, 240, 255, 0.1);
            margin-bottom: 25px;
            position: relative;
        }

        #winnings-amount::before, #winnings-amount::after {
            content: attr(data-text);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent;
        }

        #winnings-amount::before {
            left: 2px;
            text-shadow: -1px 0 red;
            clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
            animation: glitch-anim-1 2s infinite linear alternate-reverse;
        }

        #winnings-amount::after {
            left: -2px;
            text-shadow: -1px 0 blue;
            clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
            animation: glitch-anim-2 2s infinite linear alternate-reverse;
        }

        @keyframes glitch-anim-1 {
            0% { clip-path: polygon(0 2%, 100% 2%, 100% 33%, 0 33%); } 25% { clip-path: polygon(0 40%, 100% 40%, 100% 50%, 0 50%); } 50% { clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); } 75% { clip-path: polygon(0 15%, 100% 15%, 100% 25%, 0 25%); } 100% { clip-path: polygon(0 75%, 100% 75%, 100% 90%, 0 90%); }
        }
        @keyframes glitch-anim-2 {
            0% { clip-path: polygon(0 67%, 100% 67%, 100% 80%, 0 80%); } 25% { clip-path: polygon(0 10%, 100% 10%, 100% 30%, 0 30%); } 50% { clip-path: polygon(0 85%, 100% 85%, 100% 95%, 0 95%); } 75% { clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%); } 100% { clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%); }
        }

        .result-popup-content.loss {
            background-color: var(--card-bg);
            border: 2px solid #F44336;
            box-shadow: 0 0 15px #f4433688;
        }

        .result-popup-content.loss #win-content { display: none; }
        .result-popup-content.loss #loss-content { display: flex; flex-direction: column; align-items: center; }

        #loss-image {
            width: 60px;
            margin-bottom: 10px;
        }

        #loss-title {
            color: #F44336;
            margin: 0;
            font-size: 1.8em;
        }

        #loss-message {
            color: var(--text-secondary);
            margin: 10px 0 20px 0;
        }

        .btn-close {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-size: 1.2em;
            font-weight: bold;
            color: white;
            cursor: pointer;
            transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
        }
        .btn-close:hover {
            transform: translateY(-2px);
        }

        .result-popup-content.win .btn-close {
            background-color: #008b9b;
        }

        .result-popup-content.win .btn-close:hover {
            background-color: #00f0ff;
            color: #1a1f36;
            box-shadow: 0 0 10px #00f0ff;
        }

        .result-popup-content.loss .btn-close {
            background-color: #F44336;
        }
        
        /* History Tables */
        .history-container {
            background: var(--card-bg);
            border-radius: 12px;
            overflow-x: auto;
            padding: 8px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            min-width: 350px;
        }

        th {
            background-color: var(--header-bg);
            color: var(--accent-yellow);
            padding: 10px;
            font-size: 14px;
        }

        td {
            padding: 10px;
            font-size: 14px;
            text-align: center;
            border-bottom: 1px solid #333;
        }

        .dot {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .dot.red { background: red; }
        .dot.green { background: lime; }
        .dot.violet { background: violet; }

        .num.red { color: #ff4c4c; font-weight: bold; }
        .num.green { color: #00ff88; font-weight: bold; }
        .num.violet { color: #bb66ff; font-weight: bold; }

        #my-history-table .outcome-win {
            color: #2ecc71;
            font-weight: bold;
        }

        #my-history-table .outcome-loss {
            color: #e74c3c;
            font-weight: bold;
        }

        #my-history-table th, #my-history-table td {
            text-align: left;
            padding: 12px 8px;
        }
        
        /* NUMBER BUTTON ROUND SHAPE */
.num {
    border-radius: 100%;
    width: 55px;
    height: 55px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover !important;
    background-position: center !important;
    border: none;
}

/* Number Grid */
.number-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* IMAGE SETUP */
.img0 { background-image: url("ball_0.webp"); }
.img1 { background-image: url("ball_1.webp"); }
.img2 { background-image: url("ball_2.webp"); }
.img3 { background-image: url("ball_3.webp"); }
.img4 { background-image: url("ball_4.webp"); }
.img5 { background-image: url("ball_5.webp"); }
.img6 { background-image: url("ball_6.webp"); }
.img7 { background-image: url("ball_7.webp"); }
.img8 { background-image: url("ball_8.webp"); }
.img9 { background-image: url("ball_9.webp"); }

}
        
        /* NEW: Floating Support Button */
        .floating-support-btn {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 55px;
            height: 55px;
            background: var(--gradient-primary);
            color: var(--dark-bg);
            border-radius: 50%;
            display: none; /* Initially hidden */
            justify-content: center;
            align-items: center;
            font-size: 1.8em;
            box-shadow: 0 4px 15px rgba(0, 255, 200, 0.4);
            z-index: 999;
            text-decoration: none;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .floating-support-btn:hover {
            transform: scale(1.1) rotate(15deg);
            box-shadow: 0 6px 20px rgba(0, 255, 200, 0.6);
        }