body {
    margin: 0;
    overflow: hidden;
    font-family: 'Luckiest Guy', cursive;
    background-color: #87CEEB; /* Fallback sky blue */
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to canvas if needed, but buttons usually need pointer-events: auto */
}

#hud {
    position: absolute;
    top: 20px;
    width: 100%;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 0 #000;
    pointer-events: none;
}

#score-display {
    font-size: 24px;
    margin-bottom: 10px;
}

#question-display {
    font-size: 48px;
    background-color: rgba(0, 0, 0, 0.3);
    display: inline-block;
    padding: 10px 30px;
    border-radius: 20px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 3px 3px 0 #333;
    pointer-events: auto;
    transition: opacity 0.3s;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.active {
    opacity: 1;
    pointer-events: auto;
}

h1 {
    font-size: 80px;
    margin: 0 0 20px 0;
    color: #FFD700;
    -webkit-text-stroke: 2px #d35400;
}

button {
    font-family: 'Luckiest Guy', cursive;
    font-size: 32px;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(#2ecc71, #27ae60);
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 0 #219150;
    transition: transform 0.1s, box-shadow 0.1s;
}

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

button:hover {
    background: linear-gradient(#40d47e, #2ecc71);
}
