/* ============================================================
   Vogais em Libras V2 — game.css
   Padrão visual: gradiente roxo (#7B1FA2) → rosa (#E91E63)
   ============================================================ */

:root {
    --primary:    #7B1FA2;
    --secondary:  #E91E63;
    --success:    #2E7D32;
    --danger:     #C62828;
    --bg-light:   #F3E5F5;
    --text-dark:  #1a1a2e;
    --radius:     16px;
    --shadow:     0 8px 32px rgba(123,31,162,.18);
    --transition: .25s ease;
}

/* ── Container ─────────────────────────────────────────── */
.game-container {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 24px;
    padding: 28px 20px 32px;
    margin: 0 0 28px;
    box-shadow: var(--shadow);
    position: relative;
    min-height: 460px;
}

/* ── Fullscreen ─────────────────────────────────────────── */
.fullscreen-btn {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(255,255,255,.2);
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    color: #fff;
    z-index: 10;
    transition: background var(--transition);
}
.fullscreen-btn:hover { background: rgba(255,255,255,.35); }

/* ── Seleção de nível ───────────────────────────────────── */
.level-selection {
    text-align: center;
    padding: 20px 0 10px;
}
.level-title {
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.level-subtitle {
    color: rgba(255,255,255,.85);
    font-size: 15px;
    margin-bottom: 28px;
}
.level-cards {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.level-card {
    background: rgba(255,255,255,.18);
    border: 2px solid rgba(255,255,255,.3);
    border-radius: var(--radius);
    padding: 20px 22px;
    cursor: pointer;
    min-width: 110px;
    transition: transform var(--transition), background var(--transition);
    color: #fff;
}
.level-card:hover {
    background: rgba(255,255,255,.3);
    transform: translateY(-4px) scale(1.04);
}
.level-icon  { font-size: 32px; margin-bottom: 8px; }
.level-name  { font-size: 17px; font-weight: 700; }
.level-info  { font-size: 12px; opacity: .8; margin-top: 4px; }

/* ── Cabeçalho do jogo ──────────────────────────────────── */
.game-header { margin-bottom: 18px; }

.game-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(255,255,255,.15);
    border-radius: 12px;
    padding: 10px 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 6px;
}
.stat-item   { text-align: center; min-width: 54px; }
.stat-value  { font-size: 22px; font-weight: 800; color: #fff; }
.stat-label  { font-size: 10px; color: rgba(255,255,255,.8); text-transform: uppercase; letter-spacing: .5px; }

/* bolinhas de progresso */
.progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.progress-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    transition: background var(--transition), transform .2s;
}
.progress-dot.done    { background: #fff; }
.progress-dot.current { background: #FFD54F; transform: scale(1.3); }

/* ── Área de pergunta ───────────────────────────────────── */
.question-area { text-align: center; }

.question-label {
    color: rgba(255,255,255,.95);
    font-size: clamp(14px, 3.5vw, 17px);
    font-weight: 600;
    margin-bottom: 20px;
}

/* Photo card */
.libras-card {
    position: relative;
    display: inline-block;
    margin: 0 auto 24px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,.35);
    background: rgba(255,255,255,.12);
    border: 3px solid rgba(255,255,255,.35);
    transition: transform var(--transition);
}
.libras-card:hover { transform: scale(1.02); }

.libras-card img {
    display: block;
    width: clamp(160px, 42vw, 280px);
    height: clamp(160px, 42vw, 280px);
    object-fit: contain;
    background: #fff;
    padding: 8px;
}

.libras-badge {
    position: absolute;
    bottom: 10px; left: 50%;
    transform: translateX(-50%);
    background: rgba(123,31,162,.85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Grade de opções ────────────────────────────────────── */
.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 18px;
}

.vowel-btn {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    border: 3px solid rgba(255,255,255,.6);
    font-size: 30px;
    font-weight: 900;
    color: var(--primary);
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition), border-color var(--transition);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vowel-btn:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
    background: #fff;
}
.vowel-btn:active:not(:disabled) {
    transform: scale(.95);
}
.vowel-btn.correct {
    background: #43A047;
    color: #fff;
    border-color: #1B5E20;
    animation: correctPop .4s ease;
}
.vowel-btn.wrong {
    background: #E53935;
    color: #fff;
    border-color: #B71C1C;
    animation: shake .4s ease;
}
.vowel-btn:disabled { cursor: default; }

/* ── Feedback ───────────────────────────────────────────── */
.feedback-msg {
    min-height: 28px;
    font-size: 17px;
    font-weight: 700;
    color: #FFD54F;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,.3);
    transition: opacity .2s;
}

/* ── Botões de ação ─────────────────────────────────────── */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 18px;
}
.btn-action {
    padding: 11px 22px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.btn-action:hover  { background: rgba(255,255,255,.3); transform: translateY(-2px); }
.btn-restart { border-color: #FFD54F; }
.btn-quit    { border-color: rgba(255,255,255,.4); }

/* ── Tela de resultado ──────────────────────────────────── */
.result-screen {
    text-align: center;
    padding: 16px 0;
    position: relative;
}
.result-title {
    font-size: clamp(24px, 6vw, 36px);
    font-weight: 900;
    color: #FFD54F;
    margin-bottom: 16px;
    text-shadow: 0 3px 12px rgba(0,0,0,.3);
}
.result-stars {
    font-size: clamp(36px, 9vw, 54px);
    margin-bottom: 12px;
    animation: starsIn .6s ease;
}
.result-message {
    color: rgba(255,255,255,.93);
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
}
.result-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.result-stat-card {
    background: rgba(255,255,255,.18);
    border-radius: 14px;
    padding: 14px 22px;
    min-width: 90px;
}
.result-stat-value { font-size: 26px; font-weight: 900; color: #fff; }
.result-stat-label { font-size: 11px; color: rgba(255,255,255,.8); text-transform: uppercase; letter-spacing: .5px; }
.result-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Confetti ───────────────────────────────────────────── */
#confettiContainer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 24px;
    z-index: 0;
}
.confetti-piece {
    position: absolute;
    width: 10px; height: 10px;
    opacity: 0;
    animation: confettiFall 2.4s ease-in forwards;
    border-radius: 2px;
}
.result-screen > *:not(#confettiContainer) { position: relative; z-index: 1; }

/* ── Animações ──────────────────────────────────────────── */
@keyframes correctPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.28) rotate(-4deg); }
    70%  { transform: scale(.92) rotate(2deg); }
    100% { transform: scale(1); }
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-8px) rotate(-3deg); }
    40%     { transform: translateX(8px)  rotate(3deg); }
    60%     { transform: translateX(-6px); }
    80%     { transform: translateX(6px); }
}
@keyframes starsIn {
    from { opacity: 0; transform: scale(.5) rotate(-15deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes confettiFall {
    0%   { opacity: 1; transform: translateY(-20px) rotate(0deg); }
    100% { opacity: 0; transform: translateY(340px) rotate(720deg); }
}

/* ── Tela cheia ─────────────────────────────────────────── */
:fullscreen .game-container,
:-webkit-full-screen .game-container {
    border-radius: 0;
    min-height: 100vh;
    padding: 32px 24px;
}

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .game-container { padding: 18px 12px 22px; }
    .vowel-btn      { width: 60px; height: 60px; font-size: 26px; border-radius: 14px; }
    .level-cards    { gap: 10px; }
    .level-card     { min-width: 90px; padding: 14px 14px; }
}
