:root {
    --bg-waiting: #2b87d1;
    --bg-ready: #ce2636;
    --bg-go: #4bdb6a;
    --text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    user-select: none;
}

#game-area {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.1s;
}

/* States */
.state-waiting {
    background-color: var(--bg-waiting);
}

.state-ready {
    background-color: var(--bg-ready);
}

.state-go {
    background-color: var(--bg-go);
}

.content {
    max-width: 600px;
    padding: 2rem;
    pointer-events: none;
    /* Let clicks pass through to container */
}

.icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

p {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.instruction {
    font-size: 1rem;
    opacity: 0.7;
    margin-top: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hidden {
    display: none !important;
}

#result-display {
    pointer-events: auto;
    /* Enable buttons */
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 1rem;
    backdrop-filter: blur(5px);
}

#time-text {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.stats-summary {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.action-btn {
    background: white;
    color: #333;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.1s;
    margin: 0.5rem;
}

.action-btn:hover,
.action-btn:focus {
    transform: scale(1.05);
    outline: none;
}

.secondary-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 0.9rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0.5rem;
}

.secondary-btn:hover,
.secondary-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}