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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent;
    backdrop-filter: blur(10px);
    min-height: calc(100dvh - 3.5rem);
    color: white;
    overflow: hidden;
}

/* Screens */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #001201;
    z-index: 100;
}

.hidden {
    display: none !important;
}

/* Loader */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fad900;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Login */
.login-box {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

/* Game Container */
#game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 420px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.game-header {
    display: flex;
    justify-content: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 10px;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    font-weight: 600;
}

.balance-label {
    color: #888;
}

#balance-value {
    color: #22c55e;
    transition: all 0.3s ease;
}

.currency {
    color: #fbbf24;
    font-weight: 700;
}

/* Game Area */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: linear-gradient(180deg, #00420c 0%, #001201 100%);
    border-radius: 16px;
    overflow: hidden;
}

/* Card Title */
.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.title-icon {
    font-size: 24px;
}

.title-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* Prize Info */
.prize-info {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 15px;
}

/* Scratch Container */
#scratch-container {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #003a0a 0%, #001201 100%);
    border: 4px solid #fad900;
}

#scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: crosshair;
    touch-action: none;
}

/* Symbols Grid */
.symbols-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    padding: 15px;
    width: 100%;
    height: 100%;
}

.symbol-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 40px;
    transition: all 0.3s ease;
}

.symbol-cell.revealed {
    background: rgba(255, 255, 255, 0.2);
}

.symbol-cell.winning {
    background: rgba(255, 215, 0, 0.3);
    animation: winPulse 0.5s ease infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

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

/* Scratch Instruction */
.scratch-instruction {
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #ffd700;
    animation: instructionPulse 1.5s ease infinite;
}

@keyframes instructionPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Result Display */
.result-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 30;
    background: rgba(0, 0, 0, 0.9);
    padding: 30px 40px;
    border-radius: 16px;
    animation: resultIn 0.3s ease;
}

@keyframes resultIn {
    from {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.result-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-title.win {
    color: #22c55e;
}

.result-title.lose {
    color: #ef4444;
}

.result-multiplier {
    font-size: 32px;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 5px;
}

.result-amount {
    font-size: 20px;
    font-weight: 600;
    color: #4ade80;
}

/* Controls */
.controls {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    margin-top: 10px;
}

.bet-controls {
    margin-bottom: 15px;
}

.bet-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.amount-buttons {
    display: flex;
    gap: 8px;
}

.amount-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.amount-btn.active {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

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

/* Action Button */
.action-button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #000;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.action-button:active {
    transform: translateY(0);
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Message Display */
.message-display {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-display.visible {
    opacity: 1;
}
