/* ========================================
   KENO GAME - FULL STYLES
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(141, 141, 217, 0.3), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Game Container */
.game-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.game-header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                inset 0 0 60px rgba(255, 255, 255, 0.1);
}

.balance-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-label {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.balance-value {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@media (max-width: 600px) {
    .balance-value {
        font-size: 24px;
    }
}

/* Sound Toggle */
.sound-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sound-toggle.muted {
    opacity: 0.5;
}

.svg-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Turbo Toggle Button */
.turbo-toggle {
    background: linear-gradient(135deg, #9D4EDD 0%, #7B2CBF 100%);
    border: 2px solid rgba(157, 78, 221, 0.5);
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.turbo-toggle:hover {
    background: linear-gradient(135deg, #B36EE8 0%, #9D4EDD 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(157, 78, 221, 0.5);
}

.turbo-toggle.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FFD700;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.turbo-toggle.active:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8800 100%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

/* Wallet Button in Header */
.wallet-btn-header {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.wallet-btn-header:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(249, 200, 14, 0.5);
    border-color: rgba(249, 200, 14, 0.6);
}

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

/* Game Main */
.game-main {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px;
    margin-bottom: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                inset 0 0 60px rgba(255, 255, 255, 0.1);
}

/* Section Title */
.section-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Number Grid */
.number-grid-container {
    margin-bottom: 30px;
}

.selection-info {
    text-align: center;
    margin-top: 15px;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.number-btn {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-height: 50px;
}

@media (max-width: 600px) {
    .number-btn {
        font-size: 16px;
        min-height: 40px;
    }
}

.number-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.number-btn.selected {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FFD700;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    animation: selectedPulse 1.5s ease-in-out infinite;
    position: relative;
    z-index: 10;
}

@keyframes selectedPulse {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    }
    50% { 
        box-shadow: 0 0 35px rgba(255, 215, 0, 1);
        transform: scale(1.12);
    }
}

.number-btn.selected::before {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.5);
    animation: checkPop 0.3s ease-out;
}

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

.number-btn.win {
    background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
    border-color: #00ff00;
    animation: winPulse 0.5s ease infinite;
}

/* Bet Section */
.bet-section {
    margin-bottom: 30px;
}

.bet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.bet-btn {
    flex: 1;
    min-width: 100px;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.bet-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.bet-btn:hover::before {
    width: 300px;
    height: 300px;
}

.bet-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}



.bet-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    position: relative;
    transform: scale(1.05);
}

.bet-btn.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.5);
    animation: checkPop 0.3s ease-out;
}

.bet-input-container {
    display: flex;
    justify-content: center;
}

.custom-bet-input {
    width: 200px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    text-align: center;
}

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

/* Multiplier Section */
.multiplier-section {
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.multiplier-container {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 25px;
    padding: 24px 50px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.2),
                inset 0 0 30px rgba(255, 215, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.multiplier-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: multiplierShine 3s infinite;
}

@keyframes multiplierShine {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.multiplier-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.multiplier-value {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    position: relative;
    z-index: 1;
    animation: multiplierPulse 2s ease-in-out infinite;
}

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

@media (max-width: 600px) {
    .multiplier-section {
        margin-top: 15px;
    }
    .multiplier-container {
        padding: 20px 35px;
        border-radius: 20px;
    }
    .multiplier-label {
        font-size: 11px;
        letter-spacing: 1px;
    }
    .multiplier-value {
        font-size: 32px;
    }
}

/* Results Section */
.results-section {
    margin-bottom: 30px;
}

.results-history {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.result-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    flex: 1;
    min-width: 150px;
    padding: 22px 35px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .action-btn {
        font-size: 16px;
        padding: 18px 25px;
    }
}

.action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

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

.play-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FFD700;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    font-size: 24px !important;
    font-weight: 900 !important;
    padding: 26px 40px !important;
    min-width: 200px !important;
    animation: playGlow 2s ease-in-out infinite;
}

@keyframes playGlow {
    0%, 100% { box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 5px 30px rgba(255, 215, 0, 0.7); }
}

.play-btn:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 40px rgba(255, 215, 0, 0.8) !important;
}

/* Drawing Overlay */
.drawing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    animation: modalFadeIn 0.4s ease-out forwards;
}

.drawing-overlay.show {
    display: flex;
    animation: modalFadeIn 0.4s ease-out forwards;
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.drawing-content {
    text-align: center;
    padding: 40px;
    position: relative;
    animation: contentSlideIn 0.5s ease-out 0.2s both;
}

@keyframes contentSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Drawing Close Button */
.drawing-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 10001;
}

.drawing-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

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

.drawing-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.drawn-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.drawn-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #000;
    animation: numberPop 0.3s ease;
}

.drawing-result {
    font-size: 32px;
    font-weight: 900;
    color: #00ff00;
}

.result-text {
    margin-bottom: 10px;
}

.result-amount {
    font-size: 48px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ripple Animation */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Number Appear Animation */
@keyframes numberAppear {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(90deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Win Animation */
@keyframes winAnimation {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3) rotate(5deg);
    }
    50% {
        transform: scale(1.2) rotate(-5deg);
    }
    75% {
        transform: scale(1.3) rotate(3deg);
    }
}

/* Win Pulse */
@keyframes winPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 0, 1);
    }
}

/* Number Pop */
@keyframes numberPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Selection Animation */
.selecting {
    animation: selectionPulse 0.3s ease;
}

@keyframes selectionPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 1);
    }
}

/* Loader Animation */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pulse Animation Enhancement */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================================
   MOBILE RESPONSIVE - COMPLETE REDESIGN
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    .game-container {
        padding: 12px;
        margin: 10px auto;
    }

    .game-header {
        padding: 20px;
        border-radius: 20px;
    }

    .game-main {
        padding: 20px;
        border-radius: 20px;
    }

    .number-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 8px;
    }

    .number-btn {
        min-height: 45px;
        font-size: 18px;
    }

    .section-title {
        font-size: 20px;
    }

    .action-btn {
        min-width: 120px;
        padding: 18px 24px;
        font-size: 18px;
    }

    .bet-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .game-container {
        padding: 8px;
    }

    .game-main {
        padding: 15px;
    }

    .number-grid {
        gap: 6px;
    }

    .number-btn {
        min-height: 40px;
        font-size: 16px;
    }
}

/* Mobile Portrait - Main Fix */
@media (max-width: 600px) {
    body {
        background: linear-gradient(180deg, #0B0A15 0%, #1A103D 100%);
    }

    .game-container {
        padding: 10px 8px;
        margin: 0;
        max-width: 100%;
        min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }

    .game-header {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .balance-section {
        gap: 12px;
    }

    .balance-label {
        font-size: 14px;
    }

    .balance-value {
        font-size: 24px;
        font-weight: 900;
    }

    .game-main {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    /* Number Grid - 8 columns on mobile */
    .number-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 6px;
        margin-bottom: 16px;
    }

    .number-btn {
        aspect-ratio: 1;
        /* Responsive sizes handled in mobile_responsive.css */
        /* min-height and max-height removed for mobile responsive design */
        font-size: 16px;
        font-weight: 700;
        border-radius: 12px;
        border-width: 1.5px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .number-btn:hover {
        transform: translateY(-2px);
    }

    .number-btn.selected {
        transform: scale(1.05);
    }

    /* Selection info */
    .selection-info {
        font-size: 14px;
        margin-top: 12px;
    }

    /* Bet Buttons */
    .bet-buttons {
        gap: 8px;
        justify-content: center;
    }

    .bet-btn {
        flex: 1;
        max-width: 120px;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 700;
        border-radius: 12px;
        /* Responsive sizes handled in mobile_responsive.css */
    }

    .bet-btn.active::after {
        width: 20px;
        height: 20px;
        font-size: 12px;
        top: -6px;
        right: -6px;
    }

    /* Custom bet input */
    .custom-bet-input {
        width: 100%;
        max-width: 200px;
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 12px;
    }



    /* Results */
    .results-history {
        gap: 6px;
    }

    .result-item {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 10px;
    }

    /* Action buttons */
    .action-buttons {
        gap: 10px;
    }

    .action-btn {
        min-width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 800;
        border-radius: 14px;
        min-height: 52px; /* Large touch target */
    }

    .play-btn {
        font-size: 18px !important;
        padding: 18px 30px !important;
    }

    /* Drawing overlay */
    .drawing-overlay {
        padding: 20px;
    }

    .drawing-content {
        max-width: 100%;
        padding: 24px 20px;
    }

    .drawing-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .drawn-numbers {
        gap: 8px;
    }

    .drawn-number {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .drawing-result {
        margin-top: 20px;
    }

    .result-text {
        font-size: 16px;
    }

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

    /* Drawing close button */
    .drawing-close-btn {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
    }

    .drawing-close-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Sound toggle */
    .sound-toggle {
        width: 44px;
        height: 44px;
    }

    .svg-icon {
        width: 20px;
        height: 20px;
    }
}

/* Small phones (iPhone SE, etc.) */
@media (max-width: 375px) {
    .number-grid {
        gap: 5px;
    }

    .number-btn {
        min-height: 40px;
        max-height: 40px;
        font-size: 14px;
    }

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

    .action-btn {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 48px;
    }

    .play-btn {
        font-size: 16px !important;
        padding: 16px 24px !important;
    }

    .balance-value {
        font-size: 20px;
    }

    .section-title {
        font-size: 16px;
    }
}

/* Landscape on small screens */
@media (max-width: 600px) and (orientation: landscape) {
    .game-header {
        padding: 12px;
    }

    .game-main {
        padding: 12px;
    }

    .number-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 4px;
    }

    .number-btn {
        min-height: 36px;
        max-height: 36px;
        font-size: 13px;
    }

    .action-btn {
        padding: 12px 18px;
        font-size: 14px;
        /* Responsive sizes handled in mobile_responsive.css */
    }
}

/* Safe area for iPhone with notch */
@supports (padding: max(0px)) {
    @media (max-width: 600px) {
        .game-container {
            padding-top: max(10px, env(safe-area-inset-top));
            padding-bottom: max(10px, env(safe-area-inset-bottom));
            padding-left: max(8px, env(safe-area-inset-left));
            padding-right: max(8px, env(safe-area-inset-right));
        }
    }
}

/* ========================================
   FINAL ENHANCEMENTS
   ======================================== */

/* Success Confetti Effect */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
}

/* Gold Rain Effect */
.gold-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99998;
}

/* Big Win Celebration */
.big-win-celebration {
    animation: bigWinBurst 1s ease-in-out;
}

@keyframes bigWinBurst {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Glow Ring Effect */
.glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border: 3px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    animation: glowRing 2s ease-in-out infinite;
}

@keyframes glowRing {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* Floating Animation */
.float {
    animation: float 3s ease-in-out infinite;
}

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

/* Bounce Animation */
.bounce {
    animation: bounce 1s ease-in-out infinite;
}

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

/* Rainbow Text */
.rainbow-text {
    background: linear-gradient(
        90deg,
        #ff0000 0%,
        #ff7f00 14.28%,
        #ffff00 28.56%,
        #00ff00 42.85%,
        #0000ff 57.14%,
        #4b0082 71.42%,
        #9400d3 85.71%,
        #ff0000 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 3s linear infinite;
}

@keyframes rainbowShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Enhanced Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Neon Glow */
.neon-glow {
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor;
}

/* Improved Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFA500, #FFD700);
}

/* Button Press Effect */
.button-press:active {
    transform: scale(0.95) translateY(2px);
}

/* Number Hover Enhancement */
.number-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.2));
    border-color: rgba(255, 215, 0, 0.5);
    cursor: pointer;
}

/* Success Flash */
.success-flash {
    animation: successFlash 0.5s ease;
}

@keyframes successFlash {
    0%, 100% { background: inherit; }
    50% { background: rgba(0, 255, 0, 0.3); }
}

/* ========================================
   TUTORIAL OVERLAY
   ======================================== */

.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tutorial-overlay.active {
    opacity: 1;
    pointer-events: none; /* Allow scrolling through overlay */
}

.tutorial-overlay.active .tutorial-step,
.tutorial-overlay.active .tutorial-highlight {
    pointer-events: all; /* Only interactive elements capture events */
}

/* Allow scrolling when tutorial is active */
body.tutorial-active {
    /* Don't block scrolling - allow content to scroll */
}

.tutorial-step {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.tutorial-overlay.active .tutorial-step {
    transform: scale(1);
}

.tutorial-step h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tutorial-step p {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

.tutorial-highlight {
    position: absolute;
    border: 3px solid #FFD700;
    border-radius: 15px;
    /* Enhanced premium glow */
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.8),
        0 0 80px rgba(255, 215, 0, 0.4),
        inset 0 0 20px rgba(255, 215, 0, 0.2);
    pointer-events: none;
    animation: tutorialPulse 1.5s ease-in-out infinite;
}

@keyframes tutorialPulse {
    0%, 100% {
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 0.8),
            0 0 80px rgba(255, 215, 0, 0.4),
            inset 0 0 20px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 60px rgba(255, 215, 0, 1),
            0 0 120px rgba(255, 215, 0, 0.6),
            inset 0 0 30px rgba(255, 215, 0, 0.3);
    }
}

.tutorial-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.tutorial-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tutorial-btn-primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
}

.tutorial-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.tutorial-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.tutorial-progress {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.tutorial-dot.active {
    background: #FFD700;
    width: 24px;
    border-radius: 4px;
}

/* Mobile tutorial */
@media (max-width: 600px) {
    .tutorial-step {
        padding: 24px 20px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .tutorial-step h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .tutorial-step p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .tutorial-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .tutorial-buttons {
        flex-direction: column;
        width: 100%;
    }

    .tutorial-btn {
        width: 100%;
    }
}

/* ========================================
   JACKPOT DISPLAY
   ======================================== */
.jackpot-display {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.jackpot-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.jackpot-icon {
    font-size: 48px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.jackpot-info {
    flex: 1;
}

.jackpot-label {
    font-size: 14px;
    font-weight: 800;
    color: rgba(255, 215, 0, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.jackpot-amount {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: jackpotPulse 2s ease-in-out infinite;
}

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

.jackpot-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.jackpot-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.jackpot-pulse {
    animation: jackpotFlash 0.5s ease;
}

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

/* ========================================
   DAILY JACKPOT
   ======================================== */
.daily-jackpot-display {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.daily-jackpot-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.daily-jackpot-icon {
    font-size: 32px;
    opacity: 0.8;
}

.daily-jackpot-info {
    flex: 1;
}

.daily-jackpot-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.daily-jackpot-amount {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.daily-pot-pulse {
    animation: dailyPotPulse 0.5s ease;
}

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



/* ========================================
   PLAYER STATS
   ======================================== */
#playerStats {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

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

.stat-item {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   HOTKEYS HINT
   ======================================== */
.hotkeys-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(11, 10, 21, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 20px;
    max-width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.hotkeys-hint.show {
    display: block;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.hotkeys-hint-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 15px;
    text-align: center;
}

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

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

.hotkey {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #FFD700;
    font-family: 'Courier New', monospace;
}

/* Mobile */
@media (max-width: 600px) {
    .hotkeys-hint {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .jackpot-amount {
        font-size: 24px;
    }
    
    #playerStats {
        grid-template-columns: repeat(2, 1fr);
    }
}
