body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #fcfcfc;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- HUD --- */
#score-container {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
    pointer-events: none;
}

#score-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
}

.coin-icon {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #f39c12);
    border-radius: 50%;
    border: 3px solid #000;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
    position: relative;
}

.coin-icon::after {
    content: '$';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #b76e00;
}

/* --- Overlays --- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 20;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #f1c40f;
    text-shadow: 2px 2px #d35400;
    text-transform: uppercase;
}

p {
    font-size: 18px;
    margin-bottom: 25px;
    color: #ecf0f1;
    line-height: 1.5;
}

/* --- Buttons --- */
button {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 0 #27ae60;
    transition: all 0.1s ease;
    text-transform: uppercase;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #27ae60;
}

button:disabled {
    background-color: #95a5a6;
    box-shadow: 0 4px 0 #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

/* --- Specific UI Elements --- */
#timer {
    margin: 15px 0;
    font-size: 24px;
    color: #e74c3c;
    font-weight: bold;
}

#claim-btn {
    background-color: #f39c12;
    box-shadow: 0 4px 0 #d35400;
}

#claim-btn:active {
    box-shadow: 0 0 0 #d35400;
}

/* --- Redemption Screen --- */
#redemption-screen {
    background: #2c3e50;
}

#qr-container {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    color: #333;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.qr-box {
    width: 200px;
    height: 200px;
    background: #ecf0f1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed #bdc3c7;
    margin: 10px auto;
}

#redemption-timer {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 15px;
    font-family: monospace;
}

.warning-text {
    color: #f39c12;
    font-size: 14px;
    max-width: 300px;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 5px;
}

/* Mobile Responsiveness improvements */
@media (max-width: 600px) {
    h1 {
        font-size: 28px;
    }

    p {
        font-size: 16px;
    }

    button {
        padding: 12px 30px;
        font-size: 16px;
    }

    .coin-icon {
        width: 25px;
        height: 25px;
    }

    #score-text {
        font-size: 20px;
    }
}