/* ═══════════════════════════════════════════════════════════
   CIFRATURN — GAMES CSS v3.0
   Estilos exclusivos para jogos e minijogos musicais
═══════════════════════════════════════════════════════════ */

/* ── VARIÁVEIS ────────────────────────────────────────────── */
:root {
    --g-laranja: #ff6b35;
    --g-laranja2: #ff8e53;
    --g-azul: #13353d;
    --g-azul2: #0f172a;
    --g-verde: #10b981;
    --g-vermelho: #ef4444;
    --g-amarelo: #fbbf24;
    --g-roxo: #7c3aed;
    --g-azul-claro: #3b82f6;
    --g-surface: #ffffff;
    --g-bg: #f1f5f9;
    --g-border: #e2e8f0;
    --g-text: #1e293b;
    --g-text2: #64748b;
    --g-text3: #94a3b8;
    --g-shadow: 0 4px 24px rgba(0, 0, 0, .08);
    --g-shadow-lg: 0 8px 40px rgba(0, 0, 0, .14);
    --g-radius: 14px;
    --g-radius-sm: 8px;
    --g-t: all .2s ease;
    --g-t-bounce: all .3s cubic-bezier(.34, 1.56, .64, 1);
}

/* ── SEÇÃO PRINCIPAL ─────────────────────────────────────── */
.games-section {
    background: linear-gradient(160deg, #0f172a 0%, #13353d 60%, #1a4a55 100%);
    padding: 64px 0;
    position: relative;
    overflow: hidden;
}

.games-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 107, 53, .06) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.games-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.games-header {
    text-align: center;
    margin-bottom: 48px;
}

.games-header h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.games-header p {
    font-size: 16px;
    color: rgba(255, 255, 255, .6);
    max-width: 560px;
    margin: 0 auto 24px;
}

/* XP total banner */
.games-xp-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    padding: 8px 20px;
    border-radius: 50px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.games-xp-banner .xp-num {
    color: var(--g-amarelo);
    font-size: 18px;
}

.premium-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #d97706, #fbbf24);
    padding: 6px 16px;
    border-radius: 50px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    margin-left: 10px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, .4);
}

/* ── TABS DE JOGOS ───────────────────────────────────────── */
.games-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.games-tab {
    padding: 9px 20px;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--g-t);
}

.games-tab:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.games-tab.active {
    background: var(--g-laranja);
    border-color: var(--g-laranja);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 107, 53, .35);
}

/* ── GRID DE CARDS ───────────────────────────────────────── */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ── GAME CARD ───────────────────────────────────────────── */
.game-card {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--g-radius);
    overflow: hidden;
    transition: var(--g-t-bounce);
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 107, 53, .4);
    box-shadow: 0 20px 48px rgba(0, 0, 0, .3);
}

.game-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #d97706, #fbbf24);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.game-card-badge.new {
    background: linear-gradient(135deg, #059669, #10b981);
}

.game-card-header {
    padding: 24px 20px 16px;
}

.game-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 14px;
}

.game-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.2;
}

.game-card-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.5;
}

.game-card-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-card-stats {
    display: flex;
    gap: 14px;
}

.game-stat-item {
    text-align: center;
}

.game-stat-num {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    display: block;
    line-height: 1;
}

.game-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, .4);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-top: 2px;
}

.game-xp-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--g-amarelo);
    background: rgba(251, 191, 36, .12);
    padding: 4px 10px;
    border-radius: 50px;
}

.game-play-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--g-laranja), var(--g-laranja2));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin: 0 20px 20px;
    width: calc(100% - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--g-t-bounce);
    box-shadow: 0 4px 16px rgba(255, 107, 53, .3);
}

.game-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, .4);
}

/* Dificuldade */
.game-diff {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.game-diff-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
}

.game-diff-dot.active {
    background: var(--g-laranja);
}

.game-diff-dot.active.verde {
    background: var(--g-verde);
}

.game-diff-dot.active.amarelo {
    background: var(--g-amarelo);
}

.game-diff-dot.active.vermelho {
    background: var(--g-vermelho);
}

.game-diff-label {
    font-size: 11px;
    color: rgba(255, 255, 255, .5);
    font-weight: 600;
}

/* ── MODAL DE JOGO ───────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(6px);
    z-index: 99990;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.open {
    display: flex;
    animation: gFadeIn .25s ease;
}

@keyframes gFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.game-modal {
    background: var(--g-surface);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--g-shadow-lg);
    animation: gSlideUp .3s cubic-bezier(.34, 1.56, .64, 1);
    scrollbar-width: thin;
}

@keyframes gSlideUp {
    from {
        transform: translateY(40px) scale(.96);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.game-modal-header {
    background: linear-gradient(135deg, var(--g-azul2), var(--g-azul));
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.game-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    border: none;
    color: rgba(255, 255, 255, .7);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--g-t);
}

.game-modal-close:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.game-modal-body {
    padding: 24px;
}

/* ── HUD DENTRO DO MODAL ─────────────────────────────────── */
.game-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--g-azul2), #1e293b);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    gap: 8px;
}

.hud-item {
    text-align: center;
    min-width: 52px;
}

.hud-val {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    display: block;
    line-height: 1;
}

.hud-label {
    font-size: 10px;
    color: rgba(255, 255, 255, .45);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-top: 3px;
    display: block;
}

.hud-timer {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: var(--g-amarelo) !important;
    transition: color .3s;
}

.hud-timer.urgente {
    color: var(--g-vermelho) !important;
    animation: gPulse .5s ease infinite;
}

@keyframes gPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* ── BARRA DE PROGRESSO ──────────────────────────────────── */
.g-progress-wrap {
    background: #e2e8f0;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.g-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--g-laranja), var(--g-laranja2));
    border-radius: 8px;
    transition: width .4s ease;
}

.g-progress-label {
    font-size: 11px;
    color: var(--g-text3);
    text-align: right;
    margin-bottom: 14px;
}

/* ── CARD DA PERGUNTA ────────────────────────────────────── */
.g-question-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 16px;
}

.g-question-label {
    font-size: 11px;
    color: var(--g-text3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.g-question-main {
    font-size: 52px;
    font-weight: 900;
    color: var(--g-azul);
    line-height: 1;
    margin-bottom: 8px;
}

.g-question-sub {
    font-size: 13px;
    color: var(--g-text2);
}

.g-question-tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    margin-top: 8px;
}

/* ── GRID DE OPÇÕES ──────────────────────────────────────── */
.g-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.g-options-grid.cols-1 {
    grid-template-columns: 1fr;
}

.g-options-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.g-options-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.g-opt-btn {
    padding: 14px 10px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    color: var(--g-text);
    transition: var(--g-t);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 58px;
}

.g-opt-btn:hover:not(:disabled) {
    border-color: var(--g-laranja);
    background: #fff7f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, .12);
}

.g-opt-btn:disabled {
    cursor: default;
}

.g-opt-btn.correct {
    background: #dcfce7;
    border-color: #16a34a;
    color: #15803d;
}

.g-opt-btn.wrong {
    background: #fef2f2;
    border-color: var(--g-vermelho);
    color: var(--g-vermelho);
}

.g-opt-btn.highlight {
    background: #dcfce7;
    border-color: #16a34a;
}

.g-opt-sub {
    font-size: 11px;
    font-weight: 400;
    color: var(--g-text3);
    margin-top: 2px;
}

.g-opt-btn.correct .g-opt-sub {
    color: #15803d;
}

/* ── BOTÃO PRIMÁRIO ──────────────────────────────────────── */
.g-btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--g-laranja), var(--g-laranja2));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--g-t-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(255, 107, 53, .3);
}

.g-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, .4);
}

.g-btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.g-btn-secondary {
    width: 100%;
    padding: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: var(--g-text2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--g-t);
    margin-top: 8px;
}

.g-btn-secondary:hover {
    background: #e2e8f0;
    color: var(--g-text);
}

/* ── TELA DE RESULTADO ───────────────────────────────────── */
.g-result {
    text-align: center;
    padding: 8px 0;
}

.g-result-emoji {
    font-size: 60px;
    margin-bottom: 12px;
    display: block;
    animation: gBounce .6s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes gBounce {
    from {
        transform: scale(0) rotate(-10deg);
    }

    to {
        transform: scale(1) rotate(0);
    }
}

.g-result-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--g-text);
    margin-bottom: 4px;
}

.g-result-sub {
    font-size: 14px;
    color: var(--g-text2);
    margin-bottom: 20px;
}

.g-result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
}

.g-result-stat-val {
    font-size: 26px;
    font-weight: 900;
    display: block;
}

.g-result-stat-label {
    font-size: 11px;
    color: var(--g-text3);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
    display: block;
}

.g-premium-info {
    background: linear-gradient(135deg, rgba(217, 119, 6, .08), rgba(251, 191, 36, .08));
    border: 1px solid rgba(217, 119, 6, .2);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #b45309;
    font-weight: 600;
    margin-bottom: 14px;
}

.g-result-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.g-result-btns button {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--g-t-bounce);
}

.g-result-btns .btn-replay {
    background: linear-gradient(135deg, var(--g-laranja), var(--g-laranja2));
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 53, .3);
}

.g-result-btns .btn-replay:hover {
    transform: translateY(-2px);
}

.g-result-btns .btn-close {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--g-text2);
}

.g-result-btns .btn-close:hover {
    background: #e2e8f0;
}

/* ── XP POPUP ────────────────────────────────────────────── */
.xp-popup {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    font-weight: 900;
    font-size: 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--g-laranja), var(--g-laranja2));
    padding: 10px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(255, 107, 53, .5);
    animation: xpFly .9s ease forwards;
    white-space: nowrap;
}

@keyframes xpFly {
    0% {
        transform: translate(-50%, -50%) scale(.4);
        opacity: 0;
    }

    30% {
        transform: translate(-50%, -80%) scale(1.1);
        opacity: 1;
    }

    70% {
        transform: translate(-50%, -100%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -140%) scale(.8);
        opacity: 0;
    }
}

.xp-popup.combo {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 8px 32px rgba(124, 58, 237, .5);
}

/* ── PIANO VIRTUAL ───────────────────────────────────────── */
.piano-wrap {
    background: #0f172a;
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 14px;
}

.piano-keys {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: 400px;
    height: 120px;
    position: relative;
}

.piano-key {
    position: relative;
    cursor: pointer;
    border-radius: 0 0 6px 6px;
    transition: var(--g-t);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.piano-key.white {
    width: 40px;
    height: 120px;
    background: #fff;
    border: 1.5px solid #cbd5e1;
    z-index: 1;
    flex-shrink: 0;
}

.piano-key.white:hover {
    background: #f0f9ff;
}

.piano-key.white.selected {
    background: var(--g-laranja);
    box-shadow: 0 0 12px rgba(255, 107, 53, .5);
}

.piano-key.white.correct {
    background: #bbf7d0;
    border-color: #16a34a;
}

.piano-key.white.wrong {
    background: #fecaca;
    border-color: var(--g-vermelho);
}

.piano-key.black {
    width: 26px;
    height: 72px;
    background: #1e293b;
    margin: 0 -13px;
    z-index: 2;
    border: 1.5px solid #0f172a;
    flex-shrink: 0;
}

.piano-key.black:hover {
    background: #334155;
}

.piano-key.black.selected {
    background: var(--g-laranja);
}

.piano-key.black.correct {
    background: #16a34a;
}

.piano-key.black.wrong {
    background: var(--g-vermelho);
}

.piano-key-label {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #94a3b8;
    font-weight: 700;
    pointer-events: none;
}

.piano-key.black .piano-key-label {
    display: none;
}

/* ── CHIPS DE NOTAS ──────────────────────────────────────── */
.notes-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 36px;
    margin-bottom: 12px;
}

.note-chip {
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    background: var(--g-laranja);
    color: #fff;
    animation: gFadeIn .2s ease;
}

.note-chip.empty {
    background: transparent;
    color: var(--g-text3);
    font-weight: 400;
    font-size: 13px;
}

/* ── JOGO SIMON ──────────────────────────────────────────── */
.simon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 400px) {
    .simon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.simon-btn {
    aspect-ratio: 1;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: all .15s;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 72px;
    position: relative;
    overflow: hidden;
}

.simon-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background .1s;
    border-radius: 12px;
}

.simon-btn.flash::after {
    background: rgba(255, 255, 255, .5);
}

.simon-btn:hover:not(:disabled):not(.flash) {
    transform: scale(1.04);
    filter: brightness(1.1);
}

.simon-btn:disabled {
    cursor: default;
    opacity: .7;
}

.simon-btn .btn-notes {
    font-size: 10px;
    font-weight: 500;
    opacity: .8;
}

.simon-status {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--g-text2);
    margin-bottom: 14px;
    min-height: 24px;
}

.simon-status.watching {
    color: var(--g-azul-claro);
}

.simon-status.your-turn {
    color: var(--g-verde);
}

.simon-status.wrong {
    color: var(--g-vermelho);
}

.simon-level-display {
    text-align: center;
    margin-bottom: 12px;
}

.simon-seq-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.simon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .12);
    transition: var(--g-t);
}

.simon-dot.done {
    background: var(--g-verde);
}

.simon-dot.current {
    background: var(--g-laranja);
    transform: scale(1.3);
}

/* ── ACORDE NA HORA CERTA ────────────────────────────────── */
.ahc-container {
    text-align: center;
}

.ahc-chord-display {
    font-size: 72px;
    font-weight: 900;
    color: var(--g-azul);
    line-height: 1;
    margin: 16px 0 8px;
    transition: all .15s;
}

.ahc-chord-display.correct {
    color: var(--g-verde);
    animation: gPulse .3s ease;
}

.ahc-chord-display.wrong {
    color: var(--g-vermelho);
    animation: gShake .3s ease;
}

@keyframes gShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

.ahc-timer-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    position: relative;
}

.ahc-timer-ring svg {
    transform: rotate(-90deg);
}

.ahc-timer-ring circle {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}

.ahc-timer-ring .bg {
    stroke: #e2e8f0;
}

.ahc-timer-ring .fill {
    stroke: var(--g-laranja);
    transition: stroke-dashoffset .5s linear, stroke .5s;
}

.ahc-timer-ring .fill.urgente {
    stroke: var(--g-vermelho);
}

.ahc-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 900;
    color: var(--g-azul);
}

.ahc-diagrams {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.chord-diagram-btn {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 10px;
    cursor: pointer;
    transition: var(--g-t);
    text-align: center;
}

.chord-diagram-btn:hover:not(:disabled) {
    border-color: var(--g-laranja);
    background: #fff7f5;
    transform: translateY(-2px);
}

.chord-diagram-btn:disabled {
    cursor: default;
}

.chord-diagram-btn.correct {
    background: #dcfce7;
    border-color: #16a34a;
}

.chord-diagram-btn.wrong {
    background: #fef2f2;
    border-color: var(--g-vermelho);
}

.chord-name-large {
    font-size: 28px;
    font-weight: 900;
    color: var(--g-azul);
    display: block;
    margin-bottom: 4px;
}

.chord-type-small {
    font-size: 11px;
    color: var(--g-text3);
}

/* ── QUIZ PROGRESSÃO ─────────────────────────────────────── */
.progression-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.prog-chord {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 18px;
    background: #e2e8f0;
    color: var(--g-azul);
    position: relative;
}

.prog-chord.tonic {
    background: linear-gradient(135deg, var(--g-laranja), var(--g-laranja2));
    color: #fff;
}

.prog-chord.unknown {
    background: #1e293b;
    color: rgba(255, 255, 255, .3);
    font-size: 22px;
}

.prog-arrow {
    color: var(--g-text3);
    font-size: 16px;
    font-weight: 400;
}

.prog-context {
    font-size: 12px;
    color: var(--g-text3);
    text-align: center;
    margin-bottom: 14px;
    font-style: italic;
}

/* ── MEMÓRIA ─────────────────────────────────────────────── */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 360px) {
    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.memory-card-btn {
    aspect-ratio: 1;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
    color: #fff;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.memory-card-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e293b, #334155);
    transition: opacity .25s;
}

.memory-card-btn.hidden::before {
    opacity: 1;
}

.memory-card-btn.revealed::before {
    opacity: 0;
}

.memory-card-btn.found::before {
    opacity: 0;
}

.memory-card-btn .card-face {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.memory-card-btn.hidden .card-face {
    opacity: 0;
}

.memory-card-btn.revealed .card-face,
.memory-card-btn.found .card-face {
    opacity: 1;
}

.memory-card-btn.hidden {
    cursor: pointer;
}

.memory-card-btn:disabled {
    cursor: default;
}

.memory-card-btn.found {
    box-shadow: 0 4px 12px rgba(16, 185, 129, .3);
    transform: scale(.97);
}

.memory-qmark {
    font-size: 24px;
    position: absolute;
    z-index: 1;
    color: rgba(255, 255, 255, .2);
    transition: opacity .25s;
}

.memory-card-btn.hidden .memory-qmark {
    opacity: 1;
}

.memory-card-btn.revealed .memory-qmark,
.memory-card-btn.found .memory-qmark {
    opacity: 0;
}

.card-sub-notes {
    font-size: 9px;
    opacity: .8;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* ── ANIMAÇÕES DIVERSAS ──────────────────────────────────── */
@keyframes gFlash {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.5);
    }
}

.flash-anim {
    animation: gFlash .3s ease;
}

/* ── RESPONSIVO ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .game-modal {
        border-radius: 16px;
    }

    .game-modal-body {
        padding: 16px;
    }

    .g-question-main {
        font-size: 40px;
    }

    .g-options-grid {
        grid-template-columns: 1fr 1fr;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .g-result-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .g-result-stat-val {
        font-size: 20px;
    }

    .ahc-chord-display {
        font-size: 56px;
    }
}

@media (max-width: 400px) {
    .g-options-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}