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

        body {            
            background: linear-gradient(180deg, #1a1a3e 0%, #2d1b69 30%, #4a2c85 60%, #1a1a3e 100%);
            color: white;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
            overflow-y: auto;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.8), transparent),
                radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.6), transparent),
                radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.9), transparent),
                radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.7), transparent),
                radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.8), transparent),
                radial-gradient(1px 1px at 200px 100px, rgba(255,255,255,0.6), transparent),
                radial-gradient(2px 2px at 250px 50px, rgba(255,255,255,0.9), transparent);
            background-repeat: repeat;
            background-size: 300px 200px;
            opacity: 0.6;
            animation: starTwinkle 3s ease-in-out infinite alternate;
            pointer-events: none;
        }

        @keyframes starTwinkle {
            0% { opacity: 0.4; }
            100% { opacity: 0.8; }
        }

        .game-container {
            width: 100%;
            max-width: 400px;
            position: relative;
            z-index: 10;
            margin: auto;
            padding: 20px 0;
        }

        .main-game-area {
            background: linear-gradient(180deg, rgba(26,26,62,0.9) 0%, rgba(45,27,105,0.95) 100%);
            border-radius: 20px;
            overflow: hidden;
            border: 2px solid rgba(255,255,255,0.1);
            backdrop-filter: blur(10px);
            margin-bottom: 20px;
        }

        .history-bar {
            display: flex;
            gap: 8px;
            padding: 15px 20px 10px;
            justify-content: center;
        }

        .history-multiplier {
            padding: 6px 12px;
            border-radius: 15px;
            font-weight: bold;
            font-size: 0.8rem;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.2);
        }

        .history-high { background: rgba(46, 204, 113, 0.3); color: #2ecc71; }
        .history-medium { background: rgba(241, 196, 15, 0.3); color: #f1c40f; }
        .history-low { background: rgba(231, 76, 60, 0.3); color: #e74c3c; }

        .countdown-section {
            display: none; /* Hide HTML countdown - use canvas version instead */
        }

        .countdown-label {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.7);
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .countdown-timer {
            font-size: 2rem;
            font-weight: bold;
            color: white;
            font-family: 'Courier New', monospace;
        }

        .game-canvas-container {
            position: relative;
            width: 100%;
            height: 400px;
            overflow: hidden;
        }

        #gameCanvas {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .multiplier-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 3.5rem;
            font-weight: bold;
            z-index: 5;
            text-shadow: 0 0 30px rgba(255,255,255,0.8);
            transition: all 0.2s ease;
            pointer-events: none;
        }

        .multiplier-flying {
            color: #2ecc71;
            text-shadow: 0 0 30px #2ecc71;
            animation: pulse 1s ease-in-out infinite alternate;
        }

        .multiplier-crashed {
            color: #e74c3c;
            text-shadow: 0 0 30px #e74c3c;
        }

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

        .game-status {
            text-align: center;
            font-size: 0.9rem;
            font-weight: bold;
            padding: 15px 20px;
            min-height: 24px;
            border-top: 1px solid rgba(255,255,255,0.1);
            background: rgba(0,0,0,0.2);
        }

        .status-waiting { color: #f39c12; }
        .status-countdown { color: #3498db; }
        .status-flying { color: #2ecc71; }
        .status-crashed { color: #e74c3c; }

        .controls {
            margin-bottom: 20px;
        }

        .mode-toggle {
            display: flex;
            background: rgba(26, 26, 62, 0.8);
            border-radius: 25px;
            padding: 4px;
            margin-bottom: 20px;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .mode-button {
            flex: 1;
            padding: 12px 20px;
            border: none;
            border-radius: 20px;
            background: transparent;
            color: rgba(255,255,255,0.6);
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
        }

        .mode-button.active {
            background: rgba(96, 125, 139, 0.9);
            color: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        .auto-controls {
            display: none;
        }

        .auto-controls.active {
            display: block;
        }

        .manual-controls.hidden {
            display: none;
        }

        .control-group {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-bottom: 12px;
        }

        .control-group.full-width {
            grid-template-columns: 1fr;
        }

        .control-item {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            padding: 12px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.2);
            width: 100%;
            box-sizing: border-box;
        }

        .control-label {
            font-size: 0.7rem;
            color: rgba(255,255,255,0.7);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .control-amount {
            font-size: 0.8rem;
            color: #f1c40f;
            font-weight: bold;
            float: right;
        }

        .control-input-row {
            display: flex;
            align-items: center;
            gap: 6px;
            width: 100%;
        }

        .control-input {
            flex: 1;
            min-width: 0;
            padding: 8px 10px;
            border: none;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 0.9rem;
            font-weight: bold;
            width: 100%;
            box-sizing: border-box;
        }

        .control-button {
            width: 30px;
            height: 30px;
            min-width: 30px;
            min-height: 30px;
            border: none;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.8rem;
        }

        .control-button:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .strategy-section {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            padding: 12px;
            border-radius: 10px;
            margin-bottom: 12px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .strategy-label {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.7);
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .strategy-toggle-container {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 4px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .strategy-percentage {
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 6px;
            padding: 8px 10px;
            width: 100px;
            flex-shrink: 0;
        }

        .percentage-symbol {
            font-size: 1rem;
            color: white;
            font-weight: bold;
            margin-right: 4px;
        }

        .strategy-percentage-input {
            background: transparent;
            border: none;
            color: white;
            font-size: 1rem;
            font-weight: bold;
            width: 50px;
            outline: none;
        }

        .strategy-percentage-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .strategy-toggle {
            display: flex;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            overflow: hidden;
            flex: 1;
            min-width: 140px;
        }

        .strategy-toggle-btn {
            flex: 1;
            padding: 8px 12px;
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.85rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
            min-width: 70px;
        }

        .strategy-toggle-btn.active {
            background: #f1c40f;
            color: #000;
        }

        .strategy-toggle-btn:hover:not(.active) {
            background: rgba(255, 255, 255, 0.1);
            color: white;
        }

        .stop-section {
            margin-bottom: 15px;
        }

        .stop-item {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            padding: 12px;
            border-radius: 10px;
            margin-bottom: 8px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .stop-label {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.7);
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .stop-amount {
            font-size: 0.8rem;
            color: #f1c40f;
            font-weight: bold;
        }

        .stop-input-row {
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
        }

        .stop-input {
            flex: 1;
            min-width: 0;
            padding: 10px 12px 10px 35px;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 0.9rem;
            font-weight: bold;
        }

        .stop-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .start-autobet-button {
            width: 100%;
            padding: 16px;
            border: none;
            border-radius: 15px;
            background: linear-gradient(135deg, #27ae60, #2ecc71);
            color: white;
            font-size: 1.1rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-top: 15px;
        }

        .strategy-button {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255,255,255,0.7);
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
            font-weight: bold;
        }

        .strategy-button.active {
            background: rgba(46, 204, 113, 0.8);
            color: white;
        }

        .strategy-button:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .strategy-button.active:hover {
            background: rgba(46, 204, 113, 1);
        }

        .start-autobet-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(39, 174, 96, 0.4);
        }

        .start-autobet-button:disabled {
            background: rgba(255, 255, 255, 0.2);
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .stop-autobet-button {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
        }

        .bet-section {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            padding: 15px;
            border-radius: 15px;
            margin-bottom: 12px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .bet-label {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.7);
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .bet-input-row {
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
        }

        .coin-icon {
            position: absolute;
            left: 12px;
            z-index: 2;
            width: 22px;
            height: 22px;
            background: linear-gradient(135deg, #f1c40f, #f39c12);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            font-size: 0.7rem;
        }

        .cashout-icon {
            position: absolute;
            left: 12px;
            z-index: 2;
            width: 22px;
            height: 22px;
            background: linear-gradient(135deg, #2ecc71, #27ae60);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            font-size: 0.8rem;
        }

        .clear-cashout-button {
            width: 25px;
            height: 25px;
            min-width: 25px;
            min-height: 25px;
            border: none;
            border-radius: 50%;
            background: rgba(231, 76, 60, 0.8);
            color: white;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.7rem;
            position: absolute;
            right: 10px;
            z-index: 2;
        }

        .clear-cashout-button:hover {
            background: rgba(231, 76, 60, 1);
            transform: scale(1.1);
        }

        .enable-cashout-button {
            width: 25px;
            height: 25px;
            min-width: 25px;
            min-height: 25px;
            border: none;
            border-radius: 50%;
            background: rgba(46, 204, 113, 0.8);
            color: white;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.7rem;
            position: absolute;
            right: 10px;
            z-index: 2;
        }

        .enable-cashout-button:hover {
            background: rgba(46, 204, 113, 1);
            transform: scale(1.1);
        }

        .bet-input:disabled {
            background: rgba(255, 255, 255, 0.1);
            cursor: not-allowed;
            opacity: 0.6;
        }

        .bet-input {
            flex: 1;
            min-width: 0;
            padding: 12px 15px 12px 45px;
            border: none;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 1rem;
            font-weight: bold;
        }

        .bet-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .bet-button, .arrow-button {
            width: 45px;
            height: 45px;
            min-width: 45px;
            min-height: 45px;
            border: none;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.9rem;
        }

        .arrow-button {
            font-size: 1.1rem;
        }

        .bet-button:hover, .arrow-button:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }

        .place-bet-button {
            width: 100%;
            padding: 16px;
            border: none;
            border-radius: 15px;
            background: linear-gradient(135deg, #8e44ad, #9b59b6);
            color: white;
            font-size: 1.1rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 15px;
        }

        .place-bet-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(142, 68, 173, 0.4);
        }

        .place-bet-button:disabled {
            background: rgba(255, 255, 255, 0.2);
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .cashout-button {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
        }

        .cashout-button:hover {
            box-shadow: 0 10px 25px rgba(231, 76, 60, 0.4);
        }

        .bank-display {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(0, 0, 0, 0.3);
            padding: 12px 15px;
            border-radius: 15px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .bank-label {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: bold;
            color: rgba(255,255,255,0.8);
            font-size: 0.9rem;
        }

        .bank-icon {
            width: 20px;
            height: 20px;
            background: linear-gradient(135deg, #f1c40f, #f39c12);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
        }

        .bank-amount {
            font-size: 1.1rem;
            font-weight: bold;
            color: #f1c40f;
        }

        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .game-container {
                max-width: 350px;
                padding: 10px 0;
            }
            
            .game-canvas-container {
                height: 350px;
            }
            
            .multiplier-overlay {
                font-size: 2.8rem;
            }
            
            .bet-button, .arrow-button {
                width: 40px;
                height: 40px;
                min-width: 40px;
                min-height: 40px;
                font-size: 0.8rem;
            }
            
            .arrow-button {
                font-size: 1rem;
            }
            
            .bet-input {
                padding: 10px 12px 10px 40px;
                font-size: 0.9rem;
            }
            
            .coin-icon, .cashout-icon {
                width: 20px;
                height: 20px;
                left: 10px;
                font-size: 0.6rem;
            }

            .bet-section {
                padding: 12px;
            }

            .place-bet-button {
                padding: 14px;
                font-size: 1rem;
            }
        }
    
        /* Import modern casino-style fonts */
        @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Exo+2:wght@300;400;500;600;700;800&display=swap');
        
        /* Global font family for casino/gaming app feel */
        * {
            font-family: 'Exo 2', 'Orbitron', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
        }
        
        /* Special font for headings and important elements */
        .drawer-title,
        .strategy-name,
        .form-label,
        .popup-title,
        .chart-title {
            font-family: 'Orbitron', 'Exo 2', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
            font-weight: 600;
        }
        
        /* Monospace for numbers and data */
        .strategy-example-table,
        .bank-amount,
        .bet-input,
        .form-input {
            font-family: 'Exo 2', 'Orbitron', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif
        }
        
        /* Tooltip Styles */
        .tooltip-container {
            position: relative;
            display: inline-block;
            margin-left: 4px;
        }
        
        .tooltip-icon {
            width: 14px;
            height: 14px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.8);
            cursor: help;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.2s ease;
            font-weight: bold;
            vertical-align: middle;
        }
        
        .tooltip-icon:hover {
            background: rgba(255, 255, 255, 0.4);
            color: white;
            transform: scale(1.05);
        }
        
        .tooltip-text {
            visibility: hidden;
            opacity: 0;
            width: 280px;
            background: rgba(26, 26, 62, 0.96);
            color: white;
            text-align: left;
            border-radius: 8px;
            padding: 12px 14px;
            position: absolute;
            z-index: 1000;
            bottom: 130%;
            right: 0;
            border: 1px solid rgba(255, 255, 255, 0.2);
            font-size: 0.8rem;
            line-height: 1.4;
            transition: all 0.3s ease;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(10px);
            word-wrap: break-word;
        }
        
        .tooltip-text::after {
            content: "";
            position: absolute;
            top: 100%;
            right: 12px;
            border-width: 6px;
            border-style: solid;
            border-color: rgba(26, 26, 62, 0.96) transparent transparent transparent;
        }
        
        .tooltip-container:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        
        /* Adjust form label to accommodate tooltip */
        .form-label {
            display: flex;
            align-items: center;
            font-size: 0.8rem;
            color: rgba(255,255,255,0.7);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .label-text {
            /* No margin needed - tooltip is directly after */
        }
        
        /* Mobile responsive tooltips */
        @media (max-width: 768px) {
            .tooltip-text {
                width: 240px;
                font-size: 0.75rem;
                padding: 10px 12px;
                /* Position from right edge on mobile */
                bottom: auto;
                top: 130%;
                right: 0;
                left: auto;
            }
            
            .tooltip-text::after {
                top: -6px;
                bottom: auto;
                right: 12px;
                left: auto;
                border-color: transparent transparent rgba(26, 26, 62, 0.96) transparent;
            }
            
            /* Ensure tooltip doesn't overflow screen */
            .tooltip-text {
                max-width: calc(100vw - 40px);
            }
            
            /* If tooltip would go off left edge, position from left */
            @media (max-width: 320px) {
                .tooltip-text {
                    right: auto;
                    left: 0;
                }
                
                .tooltip-text::after {
                    right: auto;
                    left: 12px;
                }
            }
        }
        
        /* Strategy Cards Styles */
        .strategy-cards-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 12px;
            margin-bottom: 8px;            
        }
        
        .strategy-card {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            padding: 16px 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            position: relative;
            backdrop-filter: blur(10px);
            min-height: 80px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        
        .strategy-card:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.4);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        
        .strategy-card.active {
            background: rgba(46, 204, 113, 0.2);
            border-color: #2ecc71;
            box-shadow: 0 0 0 1px #2ecc71, 0 4px 12px rgba(46, 204, 113, 0.3);
        }
        
        .strategy-card.active:hover {
            background: rgba(46, 204, 113, 0.25);
            transform: translateY(-1px);
        }
        
        .strategy-info-icon {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 20px;
            height: 20px;
            background: rgba(52, 152, 219, 0.8);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            color: white;
            cursor: pointer;
            border: 1px solid rgba(255, 255, 255, 0.3);
            transition: all 0.2s ease;
            font-weight: bold;
            z-index: 10;
        }
        
        .strategy-info-icon:hover {
            background: rgba(52, 152, 219, 1);
            transform: scale(1.1);
        }
        
        .strategy-name {
            font-weight: bold;
            font-size: 0.9rem;
            color: white;
            margin-bottom: 6px;
            line-height: 1.2;            
        }
        
        .strategy-description {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.7);
            line-height: 1.3;
        }
        
        /* Mobile horizontal scroll layout - FIXED */
        @media (max-width: 768px) {
            /* Prevent body/html horizontal scroll */
            body, html {
                overflow-x: hidden;
            }
            
            /* Container that holds the strategy cards */
            .form-group {
                overflow: hidden; /* Contain the horizontal scroll */
                padding: 0; /* Remove any padding that might interfere */
            }
            
            .strategy-cards-container {
                display: flex;
                overflow-x: auto;
                overflow-y: hidden;
                gap: 8px;
                padding: 0 20px 8px 20px; /* Proper padding on all sides */
                scroll-snap-type: x mandatory;
                -webkit-overflow-scrolling: touch;
                /* Keep it within the form bounds */
                width: 100%;
                box-sizing: border-box;
            }
            
            .strategy-card {
                flex: 0 0 calc(50% - 24px); /* 50% minus padding and gap */
                min-width: calc(50% - 24px);
                max-width: calc(50% - 24px);
                scroll-snap-align: start;
                padding: 12px 10px;
                min-height: 70px;
            }
            .strategy-card.active {
    border: 2px solid #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* Form fields hidden state */
#sessionSetup.hidden {
    display: none !important;
}

/* Strategy selection always visible */
.strategy-selection-container {
    display: block !important;
}

/* Add visual feedback when no strategy selected */
.no-strategy-selected .form-group {
    opacity: 0.3;
    pointer-events: none;
}

/* Show loading state for strategy cards */
.strategy-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.strategy-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}
            .strategy-name {
                font-size: 0.8rem;
                margin-bottom: 4px;

            }
            
            .strategy-description {
                font-size: 0.7rem;
            }
            
            .strategy-info-icon {
                top: 6px;
                right: 6px;
                width: 18px;
                height: 18px;
                font-size: 0.65rem;
            }
            
            /* Styled scrollbar for the cards container only */
            .strategy-cards-container::-webkit-scrollbar {
                height: 4px;
            }
            
            .strategy-cards-container::-webkit-scrollbar-track {
                background: rgba(255, 255, 255, 0.1);
                border-radius: 2px;
            }
            
            .strategy-cards-container::-webkit-scrollbar-thumb {
                background: rgba(255, 255, 255, 0.3);
                border-radius: 2px;
            }
            
            .strategy-cards-container::-webkit-scrollbar-thumb:hover {
                background: rgba(255, 255, 255, 0.5);
            }
        }
        /* Mobile: Grid layout by default, horizontal scroll after strategy selection */
@media (max-width: 768px) {
    /* Default: Grid layout (same as desktop) */
    .strategy-cards-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 8px;
        padding: 0 !important;
        overflow: visible;
    }
    
    .strategy-card {
        flex: none;
        min-width: auto;
        max-width: none;
        scroll-snap-align: none;
    }
    
    /* After strategy selection: Switch to horizontal scroll */
    .strategy-cards-container.mobile-horizontal {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 0 20px 8px 20px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        box-sizing: border-box;
    }
    
    .strategy-cards-container.mobile-horizontal .strategy-card {
        flex: 0 0 calc(50% - 24px);
        min-width: calc(50% - 24px);
        max-width: calc(50% - 24px);
        scroll-snap-align: start;
        padding: 12px 10px;
        min-height: 70px;
    }
    
    /* Scrollbar styles only for horizontal mode */
    .strategy-cards-container.mobile-horizontal::-webkit-scrollbar {
        height: 4px;
    }
    
    .strategy-cards-container.mobile-horizontal::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    
    .strategy-cards-container.mobile-horizontal::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
}
        /* Extra small screens */
        @media (max-width: 480px) {
            .strategy-cards-container {
                padding: 0 16px 8px 16px; /* Slightly less padding on small screens */
            }
            
            .strategy-card {
                flex: 0 0 calc(50% - 20px); /* Adjust for smaller padding */
                min-width: calc(50% - 20px);
                padding: 10px 8px;
                min-height: 90px;
            }
            
            .strategy-name {
                font-size: 0.75rem;
            }
            
            .strategy-description {
                font-size: 0.65rem;
            }
            
            .strategy-info-icon {
                width: 16px;
                height: 16px;
                font-size: 0.6rem;
            }
        }
        
        /* Strategy example tables */
        .strategy-example-table {
            width: 100%;
            margin: 12px 0;
            border-collapse: collapse;
            font-size: 0.85rem;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 6px;
            overflow: hidden;
        }
        
        .strategy-example-table th,
        .strategy-example-table td {
            padding: 8px 10px;
            text-align: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .strategy-example-table th {
            background: rgba(255, 255, 255, 0.1);
            font-weight: bold;
            color: #f1c40f;
            font-size: 0.8rem;
        }
        
        .strategy-example-table td {
            color: white;
        }
        
        .strategy-example-table .result-win {
            color: #2ecc71;
            font-weight: bold;
        }
        
        .strategy-example-table .result-loss {
            color: #e74c3c;
            font-weight: bold;
        }
        
        .strategy-example-table .bet-amount {
            font-weight: bold;
            color: #3498db;
        }
        
        .strategy-example-table .sequence {
            font-family: monospace;
            color: #f39c12;
        }
    
/* ===== MAIN TRIGGER BUTTON ===== */
.trigger-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 500;
    font-weight: bold;
    transition: all 0.3s ease;
}

.trigger-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* ===== SIMULATOR OVERLAY & DRAWER ===== */
.simulator-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.simulator-overlay.active {
    opacity: 1;
    visibility: visible;
}

.simulator-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #1a1a3e 0%, #2d1b69 30%);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid rgba(255,255,255,0.1);
}

.simulator-drawer.active {
    transform: translateY(0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin: 12px auto 8px;
    cursor: pointer;
}

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

.drawer-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-button {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: rgba(255,255,255,0.2);
}

.drawer-content {
    padding: 20px;
}

/* ===== STRATEGY INFO POPUP ===== */
.info-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.info-popup {
    background: linear-gradient(180deg, #1a1a3e 0%, #2d1b69 30%);
    border-radius: 15px;
    padding: 24px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid rgba(255,255,255,0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    margin: 20px;
    color: white;
}

.info-popup-overlay.active .info-popup {
    transform: scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.popup-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #f1c40f;
}

.popup-close {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    line-height: 1.6;
}

.popup-section {
    margin-bottom: 16px;
}

.popup-section h4 {
    color: #2ecc71;
    margin-bottom: 8px;
    font-size: 1rem;
}

.popup-section.risk h4 {
    color: #e74c3c;
}

.popup-section.example h4 {
    color: #3498db;
}

/* ===== FORM STYLING ===== */
.strategy-select-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon {
    width: 24px;
    height: 24px;
    background: rgba(52, 152, 219, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    font-weight: bold;
}

.info-icon:hover {
    background: rgba(52, 152, 219, 1);
    transform: scale(1.1);
}

.simulator-form {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row.full-width {
    grid-template-columns: 1fr;
}

.form-group {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}

.form-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.form-input, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: #2d1b69;
    color: white;
}

.strategy-specific {
    display: none;
}

.strategy-specific.active {
    display: block;
}

/* ===== BUTTONS ===== */
.run-button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.run-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.4);
}

.run-button:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.compare-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    margin-top: 8px;
}

.compare-button:hover {
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.4);
}

/* ===== RESULTS SECTION ===== */
.results-section {
    display: none;
    margin-top: 20px;
}

.results-section.active {
    display: block;
}

.results-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 16px;
}

.tab-button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tab-content {
    display: none;
}

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

/* ===== CHARTS ===== */
.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

.chart-container canvas {
    width: 100% !important;
    height: 250px !important;
    max-height: 250px;
}

.chart-title {
    color: white;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: bold;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.stat-value.positive {
    color: #2ecc71;
}

.stat-value.negative {
    color: #e74c3c;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #2ecc71);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.simulation-status {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.8);
}

/* ===== COMPARISON TABLE ===== */
.comparison-table {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.comparison-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.comparison-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.strategy-name {
    font-weight: bold;
    color: #f1c40f;
}

/* ===== DETAILS CONTENT ===== */
.details-content {
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .drawer-content {
        padding: 16px;
    }

    .info-popup {
        margin: 10px;
        padding: 20px;
        max-height: 85vh;
    }

    .comparison-table {
        font-size: 0.8rem;
    }

    .trigger-button {
        top: 10px;
        left: 10px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ===== MARTINGALE TRACKER SPECIFIC STYLES ===== */

/* Enhanced tracker container */
.tracker-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10 !important;
    margin: auto;
    padding: 20px 0;
    background: transparent !important;
}

.page-header {
    text-align: center;
    padding: 20px 0;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f1c40f;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.session-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active {
    background: #2ecc71;
    animation: pulse 2s infinite;
}

.status-inactive {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Current stats grid */
.current-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

.stat-value.positive {
    color: #2ecc71;
}

.stat-value.negative {
    color: #e74c3c;
}

/* Enhanced next bet section */
.next-bet-section {
    background: rgba(46, 204, 113, 0.2);
    border: 2px solid #2ecc71;
    border-radius: 15px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.next-bet-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.next-bet-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 8px;
}

.auto-cashout-display {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.4);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cashout-icon {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    font-weight: bold;
}

.cashout-multiplier {
    font-size: 1.1rem;
    font-weight: bold;
    color: #3498db;
}

.cashout-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.next-bet-reason {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-bottom: 8px;
}

.strategy-info-display {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.strategy-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.strategy-info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    color: rgba(255, 255, 255, 0.6);
}

.info-value {
    color: #f39c12;
    font-weight: bold;
}

/* ===== MARTINGALE OPTIMIZATION STYLES ===== */

.martingale-optimization {
    margin: 20px 0;
}

.optimization-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.card-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.card-title {
    font-weight: bold;
    color: #f1c40f;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.param-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.param-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    
}




.param-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.param-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    margin-bottom: 2px;
}

.param-note {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Risk analysis components */
.risk-meter {
    margin-bottom: 16px;
}

.risk-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.risk-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.risk-fill.low-risk {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.risk-fill.medium-risk {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.risk-fill.high-risk {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
}

.risk-good { color: #2ecc71; }
.risk-medium { color: #f39c12; }
.risk-bad { color: #e74c3c; }

.risk-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.risk-stat {
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.risk-stat.positive {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
}

.risk-stat.negative {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
}

.risk-explanation {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}


/* Warnings and recommendations */
.warnings-list, .recommendations-list {
    space-y: 8px;
}

.warning-item, .recommendation-item {
    display: flex;
    align-items: flex-start;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.warning-item.danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.warning-item.warning {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.recommendation-item {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.warning-icon, .recommendation-icon {
    margin-right: 8px;
    font-size: 1rem;
    flex-shrink: 0;
}

.warning-message, .recommendation-message {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

/* ===== PROGRESSION TRACKER STYLES ===== */

.progression-tracker {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    border: 2px solid;
    backdrop-filter: blur(10px);
}

.progression-tracker.safe {
    border-color: #2ecc71;
}

.progression-tracker.caution {
    border-color: #f39c12;
}

.progression-tracker.danger {
    border-color: #e74c3c;
}

.progression-tracker.critical {
    border-color: #8e44ad;
    animation: criticalPulse 2s infinite;
}

@keyframes criticalPulse {
    0%, 100% { 
        border-color: #8e44ad;
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.4);
    }
    50% { 
        border-color: #e74c3c;
        box-shadow: 0 0 0 10px rgba(142, 68, 173, 0);
    }
}

.progression-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progression-title {
    font-weight: bold;
    color: #f1c40f;
    font-size: 0.9rem;
}

.progression-step {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.progression-visual {
    margin-bottom: 16px;
}

.progression-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progression-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #f39c12, #e74c3c);
    transition: width 0.5s ease;
}

.progression-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.progression-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.progression-marker.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.progression-marker.current {
    background: #e74c3c;
    border-color: #e74c3c;
    animation: markerPulse 1.5s infinite;
}

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

.progression-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.progression-stat {
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.progression-status {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.progression-status.safe {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.progression-status.caution {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.progression-status.danger {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.progression-status.critical {
    background: rgba(142, 68, 173, 0.2);
    color: #9b59b6;
}

.status-icon {
    margin-right: 8px;
    font-size: 1rem;
}

/* ===== COMPARISON TABLE STYLES ===== */

.comparison-table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.base-bet-comparison {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.base-bet-comparison th {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    text-align: left;
    font-weight: bold;
    color: #f1c40f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.base-bet-comparison td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.comparison-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.comparison-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.comparison-row.selected {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
}

.comparison-row.optimal {
    border-left: 3px solid #2ecc71;
}

.comparison-row.good {
    border-left: 3px solid #3498db;
}

.comparison-row.risky {
    border-left: 3px solid #f39c12;
}

.comparison-row.dangerous {
    border-left: 3px solid #e74c3c;
}

.survival-rate.excellent { color: #2ecc71; font-weight: bold; }
.survival-rate.good { color: #3498db; font-weight: bold; }
.survival-rate.fair { color: #f39c12; font-weight: bold; }
.survival-rate.poor { color: #e74c3c; font-weight: bold; }

.rec-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rec-badge.optimal {
    background: #2ecc71;
    color: white;
}

.rec-badge.good {
    background: #3498db;
    color: white;
}

.rec-badge.risky {
    background: #f39c12;
    color: white;
}

.rec-badge.dangerous {
    background: #e74c3c;
    color: white;
}

.comparison-legend {
    margin-top: 12px;
    font-size: 0.7rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 6px;
    flex-shrink: 0;
}

.legend-item.optimal .legend-color { background: #2ecc71; }
.legend-item.good .legend-color { background: #3498db; }
.legend-item.risky .legend-color { background: #f39c12; }
.legend-item.dangerous .legend-color { background: #e74c3c; }

.legend-text {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== SMART RECOMMENDATIONS SECTION ===== */

.smart-recommendations {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(52, 152, 219, 0.1));
    border: 2px solid rgba(46, 204, 113, 0.3);
    border-radius: 15px;
    padding: 16px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

.smart-rec-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.smart-rec-icon {
    font-size: 1.5rem;
    margin-right: 8px;
}

.smart-rec-title {
    font-weight: bold;
    color: #2ecc71;
    font-size: 1rem;
}

.optimal-bet-display {
    text-align: center;
    margin: 16px 0;
}

.optimal-bet-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
}

.optimal-bet-reason {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    line-height: 1.4;
}

.apply-optimal-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 0px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.apply-optimal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

/* Quick actions buttons */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.action-button {
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-win {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.btn-win:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.btn-loss {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-loss:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}

/* Session controls */
.session-controls {
    margin-top: 30px;
}

.control-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.4);
}

/* Strategy progress section */
.strategy-progress {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.sequence-display {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: #f39c12;
    text-align: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.current-position {
    color: #2ecc71;
    font-weight: bold;
    text-decoration: underline;
}

/* Alert boxes */
.alert-box {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-left: 4px solid;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.alert-warning {
    background: rgba(241, 196, 15, 0.2);
    border-color: #f1c40f;
    color: #f1c40f;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #e74c3c;
}

.alert-success {
    background: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
    color: #2ecc71;
}

/* Strategy Selection */
.strategy-selection-container {
    transition: all 0.3s ease;
    margin-bottom:20px
}

.strategy-selection-container.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 768px) {
    .tracker-container {
        padding: 15px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .next-bet-amount {
        font-size: 1.8rem;
    }
    
    .optimal-bet-amount {
        font-size: 2rem;
    }
    
    .param-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .expectation-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .progression-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .current-stats {
        gap: 8px;
    }
    
    .quick-actions {
        gap: 8px;
    }
    
    .action-button {
        padding: 14px;
        font-size: 0.9rem;
    }
    
    .base-bet-comparison {
        font-size: 0.7rem;
    }
    
    .base-bet-comparison th,
    .base-bet-comparison td {
        padding: 6px 4px;
    }
    
    .progression-markers {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }
    
    .progression-marker {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .tracker-container {
        padding: 10px;
    }
    
    .param-grid {
        grid-template-columns: 1fr;
    }
    
    .risk-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .comparison-table-container {
        padding: 12px;
    }
    
    .base-bet-comparison {
        font-size: 0.65rem;
    }
    
    .optimal-bet-amount {
        font-size: 1.8rem;
    }
}
/* History Popup Styles */
.history-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.history-popup {
    background: #2c3e50;
    border-radius: 16px;
    padding: 24px;
    max-width: 90vw;
    max-height: 80vh;
    width: 800px;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.history-header h3 {
    margin: 0;
    color: #f39c12;
}

.history-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.history-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.history-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-stat .stat-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

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

.history-table-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table th {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
}

.history-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-win {
    background: rgba(46, 204, 113, 0.1);
}

.history-loss {
    background: rgba(231, 76, 60, 0.1);
}

.profit-positive {
    color: #2ecc71;
    font-weight: bold;
}

.profit-negative {
    color: #e74c3c;
    font-weight: bold;
}

.history-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.history-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #3498db;
    color: white;
}

.history-btn:hover {
    background: #5dade2;
}

.history-popup-active body {
    overflow: hidden;
}

/* Session Targets Styles */
.session-target {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.target-warning {
    background: rgba(231, 76, 60, 0.2) !important;
    color: #e74c3c !important;
    animation: pulse 2s infinite;
}

.target-close {
    background: rgba(46, 204, 113, 0.2) !important;
    color: #2ecc71 !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* View History Button */
.view-history-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .history-popup {
        width: 95vw;
        height: 85vh;
        padding: 16px;
    }
    
    .history-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .history-table {
        font-size: 12px;
    }
    
    .history-table th,
    .history-table td {
        padding: 6px 4px;
    }
}
/* Input Validation Styles */
.form-input.error, .bet-input.error {
    border-color: #e74c3c !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

.form-input.success, .bet-input.success {
    border-color: #2ecc71 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2) !important;
}

/* Shake animation for error fields */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Required field indicator */
.form-label.required::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Validation summary styles */
.validation-summary {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.validation-summary h4 {
    margin: 0 0 12px 0;
    color: #e74c3c;
    font-size: 16px;
}

.validation-summary ul {
    margin: 0;
    padding-left: 20px;
}

.validation-summary li {
    color: #ecf0f1;
    margin-bottom: 4px;
    font-size: 14px;
}

/* Enhanced input focus states */
.form-input:focus, .bet-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Disabled start button when validation fails */
.action-button:disabled {
    background: #7f8c8d !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.action-button:disabled:hover {
    background: #7f8c8d !important;
    transform: none !important;
}
.apply-optimal-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.apply-optimal-btn:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.apply-optimal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.apply-optimal-btn.applied {
    background: linear-gradient(135deg, #27ae60, #229954);
    animation: applied-pulse 0.6s ease;
}

@keyframes applied-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.sequence-steps-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sequence-step-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    min-width: 32px;
}

.sequence-step-compact.affordable {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
}

.sequence-step-compact.casino-limited {
    background: rgba(241, 196, 15, 0.2);
    border: 1px solid #f1c40f;
}

.sequence-step-compact.unaffordable {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
}
// Enhanced Fibonacci sequence visualization styles
const fibonacciSequenceStyles = `
<style>
/* Enhanced Sequence Visualization */
.sequence-visualization.enhanced {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(142, 68, 173, 0.05));
    border: 1px solid rgba(155, 89, 182, 0.2);
}

.sequence-summary {
    background: rgba(155, 89, 182, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #f7f7f7;
}

/* Summary Stats Bar */
.sequence-stats-bar {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-item .stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.stat-item .stat-value {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
}

/* Horizontal Sequence Flow */
.sequence-flow-container {
    position: relative;
    margin-bottom: 20px;
}

.sequence-flow {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(155, 89, 182, 0.5) transparent;
}

.sequence-flow::-webkit-scrollbar {
    height: 6px;
}

.sequence-flow::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sequence-flow::-webkit-scrollbar-thumb {
    background: rgba(155, 89, 182, 0.6);
    border-radius: 3px;
}

/* Fibonacci Step Cards */
.fib-step-card {
    min-width: 90px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    scroll-snap-align: start;
}

.fib-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

/* Risk Level Colors */
.fib-step-card.risk-low {
    border-color: rgba(46, 204, 113, 0.6);
    background: rgba(46, 204, 113, 0.1);
}

.fib-step-card.risk-medium {
    border-color: rgba(241, 196, 15, 0.6);
    background: rgba(241, 196, 15, 0.1);
}

.fib-step-card.risk-high {
    border-color: rgba(231, 76, 60, 0.6);
    background: rgba(231, 76, 60, 0.1);
}
span#sessionStatusText {
    text-transform: capitalize
}
.fib-step-card.unaffordable {
    opacity: 0.5;
    border-style: dashed;
    background: rgba(231, 76, 60, 0.15);
}

/* Step Card Content */
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.step-number {
    background: rgba(155, 89, 182, 0.8);
    color: white;
    width: 20px;
    height: 20px;    
    font-size: 0.75rem;
    font-weight: bold;
}

.step-multiplier {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.step-bet-amount {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.step-status {
    font-size: 1.2rem;
    margin-top: 4px;
}

.fib-step-card.affordable .step-status {
    color: #2ecc71;
}

.fib-step-card.unaffordable .step-status {
    color: #e74c3c;
}

/* Flow Arrows */
.flow-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 45px;
    color: rgba(155, 89, 182, 0.6);
    font-size: 1.5rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 1;
}

/* Enhanced Legend */
.sequence-legend.enhanced {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-section {
    flex: 1;
}

.legend-title {
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.legend-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.legend-indicator.affordable {
    background: #2ecc71;
    color: white;
}

.legend-indicator.unaffordable {
    background: #e74c3c;
    color: white;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.legend-color.risk-low {
    background: rgba(46, 204, 113, 0.6);
}

.legend-color.risk-medium {
    background: rgba(241, 196, 15, 0.6);
}

.legend-color.risk-high {
    background: rgba(231, 76, 60, 0.6);
}

.legend-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Interactive Tip */
.sequence-tip {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sequence-flow {
        gap: 6px;
    }
    
    .fib-step-card {
        min-width: 75px;
        padding: 10px 6px;
    }
    
    .step-bet-amount {
        font-size: 1rem;
    }
    
    .sequence-legend.enhanced {
        flex-direction: column;
        gap: 15px;
    }
    
    .sequence-stats-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-item .stat-label,
    .stat-item .stat-value {
        display: inline;
        margin: 0;
    }
}

/* Hover Effects */
.fib-step-card:hover .step-number {
    background: rgba(155, 89, 182, 1);
    transform: scale(1.1);
}

.fib-step-card:hover .step-bet-amount {
    color: #9b59b6;
}

/* Current Position Indicator (for active sessions) */
.fib-step-card.current-position {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(243, 156, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

/* Fibonacci Sequence Preview Styling */
.sequence-preview {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.sequence-preview:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(155, 89, 182, 0.4);
    transform: translateY(-1px);
}

.sequence-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sequence-label::before {
    content: "🔢";
    font-size: 1rem;
}

.sequence-values {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    background: rgba(155, 89, 182, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(155, 89, 182, 0.2);
    text-align: center;
}
/* Fibonacci Progression Table Styling */
.sequence-table-container {
    margin: 20px 0;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.fibonacci-progression-table, .dalembert-progression-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
}

.fibonacci-progression-table th, .dalembert-progression-table th {
    background: rgba(155, 89, 182, 0.3);
    color: #fff;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(155, 89, 182, 0.5);
}

.fibonacci-progression-table td, .dalembert-progression-table td {
    padding: 10px 8px;
    color:#fff;
    text-align: center;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle; /* Add this line */
}

.fibonacci-progression-table tr:hover, .dalembert-progression-table tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Row styling based on results */
.fibonacci-progression-table tr.win, .dalembert-progression-table tr.win {
    background: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
}

.fibonacci-progression-table tr.loss, .dalembert-progression-table tr.loss {
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
}

.fibonacci-progression-table tr.unaffordable, .dalembert-progression-table tr.unaffordable {
    opacity: 0.6;
    background: rgba(231, 76, 60, 0.2);
}

/* Column-specific styling */
.step-number {
    font-weight: bold;
    color: #fff;
}

.multiplier {
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.9);
}

.current-bet, .next-bet {
    font-weight: bold;
    color: #fff;
}
.next-bet {
    font-weight: bold;
    color: #fff;
}

.next-bet .step-indicator, .next-bet .units-indicator {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
    display: block
}
.result.win {
    color: #2ecc71;
    font-weight: bold;
}

.result.loss {
    color: #e74c3c;
    font-weight: bold;
}

/* Insights section */
.sequence-insights {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.insight-item {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .fibonacci-progression-table th,
    .fibonacci-progression-table td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    
    .sequence-stats-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}
.grand-martingale-params {
    border-left: 4px solid #e74c3c;
}

.formula-card {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.formula-display {
    text-align: center;
    margin-bottom: 15px;
}

.formula-main {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 6px;
}

.formula-example {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-family: monospace;
}

.formula-comparison {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.comparison-item {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(149, 165, 166, 0.1);
}

.comparison-item.grand {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.comparison-label {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.comparison-formula {
    font-family: monospace;
    font-size: 0.9rem;
}

.acceleration-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(230, 126, 34, 0.1);
    border: 1px solid rgba(230, 126, 34, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin-top: 15px;
}

.warning-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.progression-preview {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.progression-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.progression-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    overflow-x: auto;
}

.progression-step {
    min-width: 60px;
    text-align: center;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.progression-step.final-step {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
}

.step-number {
    font-size: 0.7rem;
    font-weight: bold;
    color: #7f8c8d;
}

.step-bet {
    font-size: 0.9rem;
    font-weight: bold;
    margin: 2px 0;
}

.step-multiplier {
    font-size: 0.7rem;
    color: #95a5a6;
}

.progression-warning {
    font-size: 0.8rem;
    color: #e67e22;
    text-align: center;
    font-style: italic;
}

.critical-warning {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.critical-points {
    margin-bottom: 15px;
}

.critical-point {
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(231, 76, 60, 0.2);
    font-size: 0.9rem;
}

.warning-footer {
    background: rgba(231, 76, 60, 0.1);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    color: #c0392b;
    font-size: 0.9rem;
}

.escalation-comparison {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #e67e22;
}

.escalation-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.escalation-label {
    font-weight: bold;
    min-width: 100px;
}

.escalation-regular {
    color: #3498db;
}

.escalation-grand {
    color: #e74c3c;
    font-weight: bold;
}

.safer-alternatives {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.alternatives-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #27ae60;
}

.alternatives-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.alternative-item {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    color: #27ae60;
}

.grand-martingale-progression-tracker {
    border-left: 4px solid #e74c3c;
}

.progression-formula {
    font-family: monospace;
    font-size: 0.8rem;
    color: #e67e22;
    background: rgba(230, 126, 34, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.progression-stats.grand-martingale .stat-value.critical {
    color: #e74c3c;
    font-weight: bold;
    animation: blink 1s infinite;
}

.progression-stats.grand-martingale .stat-value.high {
    color: #e67e22;
}

.progression-stats.grand-martingale .stat-value.escalation {
    color: #8e44ad;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.progression-marker.dangerous {
    background: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
}

.escalation-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(155, 89, 182, 0.1);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.alert-icon {
    font-size: 1rem;
    color: #9b59b6;
}
.strategy-philosophy {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}
.philosophy-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    font-weight: bold;
}
.philosophy-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}
.dalembert-tracker {
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.1), rgba(155, 89, 182, 0.1));
    border: 1px solid rgba(142, 68, 173, 0.3);
}

.dalembert-visual {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.current-unit-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(142, 68, 173, 0.1);
    padding: 10px;
    border-radius: 8px;
    min-width: 80px;
}

.unit-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.unit-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #9b59b6;
    line-height: 1;
}

.unit-size {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.dalembert-mechanics {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
}

.mechanics-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: bold;
}

.mechanics-rules {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rule-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.rule-item.win {
    background: rgba(46, 204, 113, 0.1);
}

.rule-item.loss {
    background: rgba(231, 76, 60, 0.1);
}

.rule-item.highlighted {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(1.02);
}

.rule-icon {
    margin-right: 8px;
    font-size: 0.9rem;
}

.rule-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.progression-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.progression-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    border-radius: 6px;
    min-width: 60px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.progression-step.affordable {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.progression-step.unaffordable {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    opacity: 0.6;
}

.progression-step.base-step {
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.4);
    font-weight: bold;
}

.progression-step.more-steps {
    background: rgba(127, 140, 141, 0.1);
    border: 1px solid rgba(127, 140, 141, 0.3);
    font-style: italic;
}

.progression-step.selected {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.step-number {
    font-weight: bold;
    color: #9b59b6;
}

.step-unit {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.step-bet {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
}

.progression-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
    font-size: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.affordable {
    background: rgba(46, 204, 113, 0.3);
    border: 1px solid rgba(46, 204, 113, 0.5);
}

.legend-color.base-step {
    background: rgba(241, 196, 15, 0.3);
    border: 1px solid rgba(241, 196, 15, 0.5);
}

.legend-color.unaffordable {
    background: rgba(231, 76, 60, 0.3);
    border: 1px solid rgba(231, 76, 60, 0.5);
}

.progression-explanation {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.comparison-value.safer {
    color: #2ecc71;
    font-weight: bold;
}

.dalembert-comparison {
    background: rgba(142, 68, 173, 0.02);
}

.dalembert-comparison .comparison-row:hover {
    background: rgba(142, 68, 173, 0.08);
}

.dalembert-risk-analysis {
    border-top: 1px solid rgba(142, 68, 173, 0.2);
    padding-top: 15px;
}

.strategy-philosophy {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

.philosophy-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    font-weight: bold;
}

.philosophy-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.param-item.adjusted {
    border: 1px solid rgba(241, 196, 15, 0.5);
    background: rgba(241, 196, 15, 0.05);
}