/* ─────────────────────────────────────────────────────────
   VoxiLearn Games — styles
   ───────────────────────────────────────────────────────── */

/* ── Root ────────────────────────────────────────────── */
.vox-games-root {
    font-family: inherit;
}

/* ── Lobby ───────────────────────────────────────────── */
.vox-games-intro {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.5rem;
    text-align: center;
}

.vox-games-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.vox-game-card {
    background: #fff;
    border: 1.5px solid rgba(13, 202, 240, 0.35);
    border-radius: 0.875rem;
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    cursor: default;
}
.vox-game-card:hover {
    border-color: #0dcaf0;
    box-shadow: 0 6px 24px rgba(13, 202, 240, 0.18);
    transform: translateY(-3px);
}
.vox-game-card-icon {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}
.vox-game-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #0a7aad;
}
.vox-game-card p {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 0.75rem;
}
.vox-game-meta {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.vox-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 2rem;
    background: #e0f7fc;
    color: #0a7aad;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.vox-badge--time {
    background: #fff3cd;
    color: #856404;
}

/* ── Arena shared ────────────────────────────────────── */
.vox-games-arena {
    animation: voxArenaIn 0.2s ease;
}
@keyframes voxArenaIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.vox-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.vox-game-header {
    margin-bottom: 1.25rem;
}
.vox-game-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0a7aad;
    margin-bottom: 0.3rem;
}

/* ── Leaderboard ─────────────────────────────────────── */
.vox-leaderboard-box {
    background: #f4fdff;
    border: 1px solid rgba(13, 202, 240, 0.25);
    border-radius: 0.625rem;
    padding: 1rem 1.25rem;
}
.vox-lb-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0a7aad;
    margin-bottom: 0.6rem;
}
.vox-leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.vox-leaderboard-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.vox-lb-rank  { width: 2rem; text-align: center; font-size: 1rem; }
.vox-lb-name  { flex: 1; color: #333; }
.vox-lb-score { font-weight: 700; color: #0dcaf0; }

/* ═══════════════════════════════════════════════════════
   GAME 1 — MEMORY MATCH
   ═══════════════════════════════════════════════════════ */
.vox-mm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.vox-mm-card {
    height: 90px;
    perspective: 600px;
    cursor: pointer;
    outline-offset: 3px;
}
.vox-mm-card:focus-visible { outline: 2px solid #0dcaf0; }

.vox-mm-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.45s ease;
    border-radius: 0.5rem;
}
.vox-mm-card.is-flipped .vox-mm-inner { transform: rotateY(180deg); }
.vox-mm-card.is-matched .vox-mm-inner { transform: rotateY(180deg); }
.vox-mm-card.is-matched .vox-mm-back  { background: #d1fae5; border-color: #10b981; color: #065f46; }

.vox-mm-front,
.vox-mm-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    padding: 0.5rem;
    text-align: center;
    line-height: 1.3;
}
.vox-mm-front {
    background: linear-gradient(135deg, #0dcaf0, #0a7aad);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}
.vox-mm-back {
    background: #fff;
    border: 1.5px solid #0dcaf0;
    color: #333;
    transform: rotateY(180deg);
}

/* ═══════════════════════════════════════════════════════
   GAME 2 — WORD SCRAMBLE
   ═══════════════════════════════════════════════════════ */
.vox-ws-progress {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.vox-streak {
    color: #f97316;
    font-weight: 700;
    animation: voxPulse 0.6s ease;
}
@keyframes voxPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.vox-ws-card {
    background: #fff;
    border: 1.5px solid rgba(13, 202, 240, 0.3);
    border-radius: 0.875rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.vox-ws-hint {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.vox-ws-scrambled {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: #0dcaf0;
    text-align: center;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}
.vox-ws-input-row {
    display: flex;
    gap: 0.5rem;
}
.vox-ws-input {
    flex: 1;
    font-size: 1rem;
    text-transform: capitalize;
}
.vox-ws-feedback {
    min-height: 1.5rem;
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.vox-ws-correct { color: #059669; }
.vox-ws-wrong   { color: #dc2626; }

.vox-ws-dots {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.75rem;
}
.vox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: background 0.2s;
}
.vox-dot.done   { background: #10b981; }
.vox-dot.active { background: #0dcaf0; transform: scale(1.3); }

/* ═══════════════════════════════════════════════════════
   GAME 3 — SPEED QUIZ
   ═══════════════════════════════════════════════════════ */
.vox-sq-meta {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.vox-sq-timer-wrap {
    font-size: 0.9rem;
    color: #555;
}
.vox-sq-timer {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0dcaf0;
    transition: color 0.3s;
    display: inline-block;
    min-width: 1.8rem;
    text-align: right;
}
.vox-sq-timer--urgent { color: #dc2626; animation: voxPulse 0.5s infinite; }

.vox-sq-progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.vox-sq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0dcaf0, #0a7aad);
    transition: width 1s linear;
    border-radius: 3px;
}

.vox-sq-question-box {
    background: #fff;
    border: 1.5px solid rgba(13, 202, 240, 0.3);
    border-radius: 0.875rem;
    padding: 1.5rem;
}
.vox-sq-question {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.vox-sq-opts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.vox-sq-opt {
    text-align: left;
    font-size: 0.92rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.5rem;
    transition: background 0.15s, border-color 0.15s;
}
.vox-sq-opt:hover:not(:disabled) {
    background: #e0f7fc;
    border-color: #0dcaf0;
}
.vox-sq-opt.vox-sq-correct  { background: #d1fae5 !important; border-color: #10b981 !important; color: #065f46 !important; }
.vox-sq-opt.vox-sq-wrong    { background: #fee2e2 !important; border-color: #dc2626 !important; color: #7f1d1d !important; }

.vox-sq-feedback {
    min-height: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.vox-sq-correct-msg { color: #059669; }
.vox-sq-wrong-msg   { color: #dc2626; }

/* ═══════════════════════════════════════════════════════
   GAME OVER
   ═══════════════════════════════════════════════════════ */
.vox-game-over {
    text-align: center;
    padding: 2rem 1rem;
    animation: voxArenaIn 0.3s ease;
}
.vox-go-icon   { font-size: 3.5rem; line-height: 1; margin-bottom: 0.5rem; }
.vox-go-title  { font-size: 1.75rem; font-weight: 800; color: #0a7aad; margin-bottom: 0.25rem; }
.vox-go-game   { font-size: 1rem; color: #888; margin-bottom: 1rem; }
.vox-go-score  {
    font-size: 3.5rem;
    font-weight: 900;
    color: #0dcaf0;
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(13, 202, 240, 0.3);
}
.vox-go-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.vox-go-login-note {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
}
.vox-go-login-note a { color: #0a7aad; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 540px) {
    .vox-mm-grid { grid-template-columns: repeat(3, 1fr); }
    .vox-mm-card { height: 76px; }
    .vox-mm-front { font-size: 1.1rem; }
    .vox-mm-back  { font-size: 0.68rem; }
    .vox-ws-scrambled { font-size: 1.4rem; }
    .vox-go-score { font-size: 2.5rem; }
}
