
body {
    background: #181c25;
    color: #f8f8f2;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

.game-container {
    box-sizing: border-box;
    width: min(100%, 33rem);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    background: #232946;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    padding: clamp(1rem, 4vw, 2rem) clamp(.75rem, 4vw, 1.5rem);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

h1 {
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.hud {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    margin-bottom: 12px;
    font-size: 1.1em;
}

#game-area {
    position: relative;
    width: min(100%, 420px);
    height: clamp(12rem, 57dvh, 30rem);
    background: #121629;
    border-radius: 8px;
    margin-bottom: 18px;
    overflow: hidden;
    border: 2px solid #393e6e;
    box-sizing: border-box;
}

.falling-word {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    background: #eebbc3;
    color: #232946;
    padding: 6px 18px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    white-space: nowrap;
    user-select: none;
    transition: background 0.2s;
    top: 0;
}

#input-box {
    width: 100%;
    max-width: 420px;
    padding: 10px;
    font-size: 18px;
    font-family: inherit;
    border-radius: 6px;
    border: 1px solid #393e6e;
    background: #232946;
    color: #f8f8f2;
    margin-bottom: 10px;
    box-sizing: border-box;
}

#input-box:disabled {
    background: #393e6e;
    color: #aaa;
}

#input-box:focus-visible {
    outline: 2px solid #eebbc3;
    outline-offset: 2px;
}

#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(24,28,37,0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 10;
}

.hidden {
    display: none;
}

#final-score, #typing-stats {
    margin: 10px 0;
    font-size: 1.1em;
    text-align: center;
}

button {
    background: #eebbc3;
    color: #232946;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}
button:hover {
    background: #f6c7d1;
}
