/* ──────────────────────────────────────────
   Odd One Out — Styles
   ────────────────────────────────────────── */

body {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 0;
    margin: 0;
    background: radial-gradient(circle at top, #312e81 0%, #1e1b4b 60%, #0f172a 100%);
    overflow: hidden;
}

.game-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(0,0,0,0.1);
}

/* ── Header ── */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    position: absolute;
    top: 0.75rem; left: 0.75rem; right: 0.75rem;
    z-index: 10;
    border-radius: var(--radius-full);
}

.btn-back {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.1);
    border: none;
}

.stats {
    display: flex;
    gap: 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.lives { color: white; }
.score-display { color: var(--accent); }

/* ── Prompt bar ── */
.prompt-bar {
    position: absolute;
    top: 4.5rem;
    left: 1.5rem; right: 1.5rem;
    z-index: 10;
    padding: 0.8rem 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255,255,255,0.15);
}

.prompt-label {
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

/* ── Play area ── */
.play-area {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 6rem;
    padding-bottom: 4rem;
}

/* ── Grid Container ── */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 90%;
    max-width: 400px;
    padding: 1rem;
    transition: opacity 0.3s;
}

.grid-container.disabled {
    pointer-events: none;
}

/* ── Word Card ── */
.word-card {
    background: rgba(30, 41, 59, 0.9);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 4 / 3;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.word-card:hover {
    border-color: #a855f7; /* Purple */
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
}

.word-card:active {
    transform: scale(0.95);
}

.en-translation {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.85;
    margin-top: 0.4rem;
    font-family: var(--font-ui);
    color: rgba(255,255,255,0.9);
}

/* State Classes */
.word-card.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    z-index: 2;
}

.word-card.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    animation: shake 0.4s ease;
}

.word-card.dimmed {
    opacity: 0.4;
    transform: scale(0.95);
}

/* ── Explanation Box ── */
.explanation-box {
    position: absolute;
    bottom: 4.5rem;
    left: 1rem; right: 1rem;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 20;
    animation: slideUp 0.3s ease forwards;
}

.explanation-box.hidden {
    display: none;
}

.explain-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.explain-title.correct-text { color: #10b981; }
.explain-title.wrong-text { color: #ef4444; }

.explain-text {
    color: white;
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.explain-text strong {
    color: var(--accent);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Status bar ── */
.status-bar {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-full);
    padding: 0.4rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fbbf24;
}

.streak-icon { font-size: 1.1rem; }

/* ── Game Over ── */
.game-over {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    text-align: center;
    padding: 2.5rem 2rem;
    z-index: 100;
}

.game-over.hidden { display: none; }
.game-over h2 { color: var(--error); font-size: 2.25rem; margin-bottom: 0.75rem; }
.game-over p { font-size: 1.3rem; margin-bottom: 0.25rem; }
.final-streak { color: #fbbf24; font-size: 1rem !important; }

.mt-4 { margin-top: 1.5rem; }

/* ── Mobile tweaks ── */
@media (max-width: 500px) {
    .word-card { font-size: 1.5rem; aspect-ratio: 1.2 / 1; }
    .game-over { width: 92%; padding: 2rem 1.25rem; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
