/* ═══════════════════════════════════════════════════════════════
   GAME STYLES — landing page, Number Grove, Word Bloom.
   All selectors are scoped to their respective page so they
   coexist safely in one file.
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   LANDING PAGE  (body.landing)
   ──────────────────────────────────────────────────────────── */

/* ── Landing container is wider ── */
.landing .container {
    width: 600px;
    padding: 36px 32px 32px;
}

.landing h1 {
    font-size: clamp(1.3rem, 6vw, 2.8rem);
    line-height: 1.2;
}

.landing h1 .h1-emoji {
    font-variant-emoji: text;
}

.landing .subtitle {
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* ── Game cards grid ── */
.game-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 18px 22px;
    border: 3px solid var(--border);
    border-radius: 22px;
    background: #fdfaff;
    text-decoration: none;
    color: var(--text);
    transition: all 0.22s ease;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--border);
    position: relative;
    overflow: hidden;
    min-height: 260px;
}

.game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 19px;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.game-card:nth-child(1)::before {
    background: linear-gradient(135deg, #fff0e8 0%, #fdfaff 60%);
}

.game-card:nth-child(2)::before {
    background: linear-gradient(135deg, #ffe4ea 0%, #fdfaff 60%);
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 0 var(--border), 0 8px 24px rgba(100, 80, 120, 0.12);
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 var(--border);
}

/* ── Emoji box ── */
.game-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.emoji-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    height: 56px;
    padding: 0 10px;
    border: 3px solid;
    border-radius: 14px;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
}

.game-card:nth-child(1) .emoji-box {
    background: linear-gradient(135deg, #ff8c42, #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-color: #ff8c42;
}

.game-card:nth-child(2) .emoji-box {
    background: linear-gradient(135deg, #ff6b8a, #ff8fa8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-color: #ff6b8a;
}

.game-card h2 {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.3px;
    margin-bottom: 3px;
    position: relative;
    z-index: 1;
}

.game-card:nth-child(1) h2 {
    color: #ff8c42;
}

.game-card:nth-child(2) h2 {
    color: #ff6b8a;
}

.game-card p {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
}

/* ── Play button ── */
.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 32px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--radius-full);
    background: #b088d8;
    color: #fff;
    box-shadow: 0 4px 0 #8a6ab8, 0 6px 14px rgba(176, 136, 216, 0.3);
    transition: all 0.18s ease;
    position: relative;
    z-index: 1;
}

.game-card:hover .play-btn {
    background: #c09ce8;
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #8a6ab8, 0 8px 20px rgba(176, 136, 216, 0.35);
}

.game-card:active .play-btn {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #8a6ab8, 0 3px 8px rgba(176, 136, 216, 0.25);
}

/* ── Garden divider ── */
.garden-divider {
    margin: 24px auto 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 6px;
}


/* ─────────────────────────────────────────────────────────────
   NUMBER GROVE  (math/)
   ──────────────────────────────────────────────────────────── */

/* ── Game header ── */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.garden-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
}

.garden-plants {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1px;
    font-size: 1.15rem;
    line-height: 1;
    letter-spacing: 1px;
    max-width: 280px;
}

/* ── Mascot ── */
.mascot-area {
    margin: 0 auto 8px;
    font-size: 3.5rem;
    line-height: 1;
    animation: mascot-bounce-wave 1.2s ease-in-out infinite;
    display: inline-block;
}

@keyframes mascot-bounce-wave {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    25%      { transform: translateY(-12px) rotate(0deg); }
    50%      { transform: translateY(0) rotate(8deg); }
    75%      { transform: translateY(-6px) rotate(0deg); }
}

/* ── Equation ── */
.equation {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 24px;
    word-break: break-all;
}

/* ── Answer grid ── */
.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}


/* ─────────────────────────────────────────────────────────────
   WORD BLOOM  (word/)
   ──────────────────────────────────────────────────────────── */

/* ── Hangman / Flower area ── */
.hangman-area {
    margin: 0 auto 14px;
    width: 200px;
    height: 220px;
    position: relative;
}

.hangman-area svg {
    width: 100%;
    height: 100%;
}

.hangman-area svg circle,
.hangman-area svg ellipse,
.hangman-area svg rect,
.hangman-area svg path {
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.hangman-area svg circle.filled,
.hangman-area svg ellipse.filled {
    fill: #ffc4d4;
    stroke: var(--accent);
}

.hangman-area svg rect.filled {
    fill: var(--pot);
    stroke: var(--pot-dark);
}

.hangman-area svg circle.center {
    fill: var(--yellow);
    stroke: #e6c433;
    stroke-width: 2;
}

.hangman-area svg path.stem {
    stroke: var(--green);
    stroke-width: 3;
}

.hangman-area svg path.leaf {
    fill: #b8f0c8;
    stroke: var(--green);
    stroke-width: 2;
}

/* ── Word display ── */
.word-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-bottom: 22px;
}

.letter-slot {
    width: 38px;
    min-width: 0;
    height: 50px;
    border-bottom: 4px solid #e0d8f0;
    font-size: 2rem;
    font-weight: 800;
    line-height: 52px;
    text-transform: uppercase;
    color: var(--text);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.letter-slot.revealed {
    border-bottom-color: var(--green);
    color: var(--green);
}

/* ── Result word ── */
.result-word {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.result-word strong {
    color: var(--text);
    letter-spacing: 4px;
    font-size: 1.4rem;
    font-weight: 800;
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE  (shared across all game pages)
   ──────────────────────────────────────────────────────────── */

/* ── Landing ── */
@media (max-width: 520px) {
    .landing .container {
        padding: 24px 18px 20px;
    }
    .game-cards {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .game-card {
        padding: 22px 16px 18px;
    }
    .emoji-box {
        font-size: 1.4rem;
        min-width: 64px;
        height: 48px;
    }
    .game-card h2 {
        font-size: 1.2rem;
    }
}

/* ── Number Grove ── */
@media (max-width: 440px) {
    .equation {
        font-size: 1.7rem;
        letter-spacing: 2px;
    }
    .ans-btn {
        font-size: 1.2rem;
        padding: 14px 10px;
    }
    .chip {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}
