/* ===== GK Mania - Game Zone styles ===== */

/* --- Hub cards --- */
.gkg-hub-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--gk-card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gkg-hub-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--gk-card-hover-shadow);
}

.gkg-hub-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #fff;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.gkg-hub-card h3 { font-size: 1.2rem; font-weight: 800; color: var(--gk-navy); }
.gkg-hub-card p { color: #666; font-size: 0.92rem; flex-grow: 1; }

.gkg-hub-best {
    font-size: 0.8rem;
    color: var(--gk-primary);
    font-weight: 700;
    background: #f0ebff;
    border-radius: 8px;
    padding: 0.25rem 0.6rem;
    display: inline-block;
}

.gkg-subject-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    color: #fff;
}

/* --- Game shell --- */
.gkg-shell {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--gk-card-shadow);
    padding: 1.5rem;
    position: relative;
}

.gkg-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.gkg-stat-pill {
    background: var(--gk-navy);
    color: #fff;
    border-radius: 12px;
    padding: 0.45rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.gkg-stat-pill.gold { background: linear-gradient(135deg, #FFD23F, #f0a500); color: var(--gk-navy); }
.gkg-stat-pill.danger { background: linear-gradient(135deg, #e53935, #b71c1c); }
.gkg-stat-pill.accent { background: linear-gradient(135deg, var(--gk-accent), #00b894); }

.gkg-timerbar {
    height: 10px;
    border-radius: 5px;
    background: #eee;
    overflow: hidden;
    margin-bottom: 1rem;
}

.gkg-timerbar > div {
    height: 100%;
    background: var(--gk-gradient);
    border-radius: 5px;
    transition: width 1s linear;
}

.gkg-timerbar.low > div { background: linear-gradient(135deg, #e53935, #ff6b35); }

/* --- Mute button --- */
.gkg-mute {
    border: 2px solid #e8e8e8;
    background: #fff;
    color: var(--gk-primary);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}
.gkg-mute:hover { border-color: var(--gk-primary); }

/* --- Answer option buttons (MCQ games) --- */
.gkg-option {
    display: block;
    width: 100%;
    text-align: center;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: #333;
    transition: all 0.15s ease;
    cursor: pointer;
}

.gkg-option:hover:not(:disabled) {
    border-color: var(--gk-primary);
    background: #f0ebff;
    transform: translateY(-2px);
}

.gkg-option.correct { background: #d9f7ef !important; border-color: #00b894 !important; color: #00795f; }
.gkg-option.wrong { background: #fdecea !important; border-color: #e53935 !important; color: #b71c1c; }
.gkg-option:disabled { cursor: default; opacity: 0.9; }

/* --- Flag image --- */
.gkg-flag {
    max-width: 320px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.08);
}

/* --- Big type-in input --- */
.gkg-type-input {
    border: 3px solid var(--gk-primary);
    border-radius: 14px;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    width: 100%;
    outline: none;
    transition: all 0.15s ease;
}

.gkg-type-input:focus { box-shadow: 0 0 0 4px rgba(108, 60, 225, 0.2); }
.gkg-type-input.flash-ok { border-color: #00b894; box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.3); }

/* --- Lives (hearts) --- */
.gkg-lives { font-size: 1.3rem; letter-spacing: 2px; }
.gkg-lives .bi-heart-fill { color: #e53935; }
.gkg-lives .bi-heart { color: #ccc; }

/* --- Streak flame --- */
.gkg-streak {
    color: var(--gk-secondary);
    font-weight: 800;
    font-size: 1.05rem;
}

@keyframes gkgPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}
.gkg-streak.hot i { animation: gkgPulse 0.6s infinite; color: #ff3d00; }

/* --- Continent progress (Country Quest) --- */
.gkg-region {
    background: #f8f7fc;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.75rem;
}

.gkg-region-head {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gk-navy);
    margin-bottom: 0.4rem;
}

.gkg-region .progress { height: 8px; border-radius: 4px; background: #e6e2f5; }
.gkg-region .progress-bar { background: var(--gk-gradient); border-radius: 4px; }

.gkg-found-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.gkg-chip {
    background: #fff;
    border: 1px solid #e0daf5;
    color: #444;
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    animation: fadeInUp 0.3s ease-out;
}

.gkg-chip.missed { background: #fdecea; border-color: #f5c6c2; color: #b71c1c; }
.gkg-chip.hinted { background: #fff8e1; border-color: #ffe082; color: #9c6f00; }

/* --- Matching game cards (Capital Clash) --- */
.gkg-match-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) { .gkg-match-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .gkg-match-grid { grid-template-columns: repeat(2, 1fr); } }

.gkg-match-card {
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    background: #fff;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--gk-navy);
}

.gkg-match-card:hover:not(.matched):not(:disabled) { border-color: var(--gk-primary); transform: translateY(-2px); }
.gkg-match-card.selected { border-color: var(--gk-primary); background: #f0ebff; box-shadow: 0 0 0 3px rgba(108,60,225,0.15); }
.gkg-match-card.matched { border-color: #00b894; background: #d9f7ef; color: #00795f; cursor: default; opacity: 0.75; }
.gkg-match-card.shake { animation: gkgShake 0.35s; border-color: #e53935 !important; }
.gkg-match-card.capital { font-style: normal; background: #fffdf3; }

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

/* --- Big question text --- */
.gkg-question {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gk-navy);
    text-align: center;
    min-height: 3rem;
}

@media (max-width: 576px) { .gkg-question { font-size: 1.25rem; } }

/* --- Feedback banner --- */
.gkg-feedback {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    animation: fadeInUp 0.25s ease-out;
}

.gkg-feedback.ok { background: #d9f7ef; color: #00795f; }
.gkg-feedback.bad { background: #fdecea; color: #b71c1c; }
.gkg-feedback.info { background: #f0ebff; color: var(--gk-primary-dark); }

/* --- Results overlay --- */
.gkg-result {
    text-align: center;
    padding: 2rem 1rem;
}

.gkg-result-score {
    font-size: 3.2rem;
    font-weight: 900;
    background: var(--gk-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gkg-result .medal { font-size: 3rem; }

/* --- Confetti canvas --- */
.gkg-confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3000;
}

/* --- True/False buttons --- */
.gkg-tf-btn {
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    padding: 1rem 0;
    width: 100%;
    transition: all 0.15s ease;
}

.gkg-tf-true { background: linear-gradient(135deg, #11998e, #38ef7d); }
.gkg-tf-false { background: linear-gradient(135deg, #e53935, #ff6b35); }
.gkg-tf-btn:hover:not(:disabled) { transform: translateY(-3px); filter: brightness(1.05); color: #fff; }
.gkg-tf-btn:disabled { opacity: 0.6; }

/* --- Math keypad-friendly input --- */
.gkg-math-q {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--gk-navy);
    text-align: center;
    letter-spacing: 1px;
}

/* --- Word Hunt round pills --- */
.gkg-round-pill {
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: #eee;
    color: #777;
}

.gkg-round-pill.active { background: var(--gk-gradient); color: #fff; }
.gkg-round-pill.done { background: #d9f7ef; color: #00795f; }

/* --- Memory match grid --- */
.gkg-mem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    max-width: 520px;
    margin: 0 auto;
}

.gkg-mem-card {
    min-height: 84px;
    font-size: 1.5rem;
    flex-direction: column;
}

.gkg-mem-card .mem-face small { color: var(--gk-navy); font-weight: 700; }

@media (max-width: 480px) {
    .gkg-mem-grid { gap: 0.4rem; }
    .gkg-mem-card { min-height: 72px; }
}

/* --- Missing link clue cards --- */
.gkg-clue {
    background: var(--gk-navy);
    color: #fff;
    border-radius: 14px;
    font-size: 1.3rem;
    font-weight: 800;
    padding: 1rem 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gkg-plus { font-size: 1.5rem; font-weight: 900; color: var(--gk-primary); }
