.game-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    margin: 20px auto;
    max-width: 600px;
    width: 95%;
}
.nav-back { color: var(--text-secondary); text-decoration: none; font-weight: 600; transition: color 0.3s; }
.nav-back:hover { color: var(--text-primary); }
.nav-title { font-size: 1.25rem; font-weight: 800; }

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 40px;
    padding: 0 16px;
    width: 100%;
    max-width: 560px;
}

.screen {
    width: 100%;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}
.screen.hidden { display: none; }

.screen-emoji { font-size: 3rem; }
.screen-title { font-size: 1.6rem; font-weight: 800; margin: 0; }
.screen-desc { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin: 0; }

/* Setup screen */
.category-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}
.cat-btn {
    background: var(--surface-color);
    border: 1.5px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}
.cat-btn:hover { border-color: rgba(56,189,248,0.5); background: rgba(56,189,248,0.08); }
.cat-btn.selected { border-color: #38bdf8; background: rgba(56,189,248,0.15); color: #38bdf8; }

.or-divider { color: var(--text-secondary); font-size: 0.85rem; }

.custom-row { width: 100%; }
.word-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-color);
    border: 1.5px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}
.word-input:focus { outline: none; border-color: rgba(56,189,248,0.6); }
.word-input::placeholder { color: var(--text-secondary); opacity: 0.6; }

.timer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.timer-select {
    background: var(--surface-color);
    border: 1.5px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
}

.score-display {
    display: flex;
    gap: 32px;
    padding: 12px 24px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.score-item strong { color: var(--text-primary); font-size: 1.2rem; }

.start-btn { padding: 14px 40px; font-size: 1.1rem; width: 100%; margin-top: 4px; }

/* Play screen */
.word-box {
    width: 100%;
    padding: 32px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.target-word {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.1;
    color: var(--text-primary);
}

/* Timer bar */
.timer-row-play {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}
#timer-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
#timer-bar {
    height: 100%;
    width: 100%;
    background: #38bdf8;
    border-radius: 4px;
    transition: width 1s linear, background 0.5s;
}
#timer-bar.warning { background: #f59e0b; }
#timer-bar.danger  { background: #ef4444; }
.timer-num { font-size: 1.1rem; font-weight: 700; min-width: 32px; text-align: right; }

/* Answer history */
.answer-history {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    min-height: 36px;
    width: 100%;
}
.ans-chip {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.ans-chip.yes { background: rgba(34,197,94,0.25); color: #86efac; border: 1px solid rgba(34,197,94,0.4); }
.ans-chip.no  { background: rgba(239,68,68,0.25);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }

/* Hint buttons */
.hint-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}
.hint-btn {
    padding: 20px 0;
    font-size: 1.3rem;
    font-weight: 800;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, filter 0.1s;
    font-family: inherit;
}
.hint-btn:active { transform: scale(0.96); }
.no-btn  { background: #dc2626; color: white; }
.yes-btn { background: #16a34a; color: white; }
.no-btn:hover  { filter: brightness(1.1); }
.yes-btn:hover { filter: brightness(1.1); }

/* Control buttons */
.control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}
.ctrl-btn {
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    border: 2px solid;
    cursor: pointer;
    transition: transform 0.1s;
    font-family: inherit;
}
.ctrl-btn:active { transform: scale(0.97); }
.correct-btn { background: rgba(56,189,248,0.15); border-color: #38bdf8; color: #38bdf8; }
.skip-btn    { background: rgba(255,255,255,0.05); border-color: var(--glass-border); color: var(--text-secondary); }

/* Result screen */
.result-word {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}
.result-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }
.result-btns .btn-primary, .result-btns .btn-secondary { padding: 12px 24px; font-size: 1rem; }

@media (max-width: 400px) {
    .category-row { grid-template-columns: 1fr 1fr; }
    .target-word { font-size: 2.5rem; }
    .hint-btn { padding: 16px 0; font-size: 1.1rem; }
}
