/* ============================================================
   Kids Kingdom - रास्ता ढूंढो (Maze Game) Stylesheet v2
   Self-contained (base hero/how-to-learn styles included)
   ============================================================ */

/* ================= BASE: hero ================= */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    padding: 40px 0;
}
.hero-image { flex: 1 1 320px; }
.hero-image img { width: 100%; height: auto; display: block; border-radius: 20px; }
.hero-content { flex: 1 1 380px; }
.hero-content h1 { font-size: 2.6rem; margin-bottom: 12px; }
.hero-content .subheading { font-size: 1.15rem; color: #555; margin-bottom: 14px; }
.hero-content .intro-paragraph { font-size: 1rem; color: #666; line-height: 1.7; }

/* ================= BASE: how-to-learn steps ================= */
.how-to-learn { padding: 50px 0; }
.how-to-learn h2 { text-align: center; font-size: 2rem; margin-bottom: 40px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.step-card { text-align: center; }
.step-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--color-primary, #FF6B6B); color: #fff;
    font-weight: 700; font-size: 1.2rem; margin-bottom: 14px;
}
.step-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step-card p { font-size: 1rem; color: #666; }

@media (max-width: 767px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 420px) {
    .steps-grid { grid-template-columns: 1fr; }
}

/* ================= MAZE GAME SECTION ================= */
.maze-section {
    padding: 40px 0 60px;
}

.maze-card {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border: 4px solid #2EC4B6;
    border-radius: 28px;
    padding: 28px 26px 34px;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.08);
    text-align: center;
}

/* ---- level selector ---- */
.maze-levels {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.maze-level-btn {
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    border: 2px solid #ddd;
    background: #fff;
    color: #888;
    border-radius: 999px;
    padding: 9px 22px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.maze-level-btn:hover { border-color: #2EC4B6; color: #2EC4B6; }

.maze-level-btn.active {
    background: #2EC4B6;
    border-color: #2EC4B6;
    color: #fff;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.maze-level-btn[data-level="easy"].active   { background: #6BCB77; border-color: #6BCB77; }
.maze-level-btn[data-level="medium"].active { background: #F7B32B; border-color: #F7B32B; }
.maze-level-btn[data-level="hard"].active   { background: #FF6B6B; border-color: #FF6B6B; }

.maze-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2b2b2b;
    margin-bottom: 6px;
}

.maze-instruction {
    font-size: 1.02rem;
    color: #666;
    margin-bottom: 14px;
}

.maze-hindi-line {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.85em;
    color: #999;
    font-weight: 500;
}

.maze-title .maze-hindi-line {
    font-size: 0.55em;
    color: #999;
    font-weight: 700;
}

/* ---- live stats bar ---- */
.maze-stats {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 16px;
}

.maze-stats span {
    background: #F5F5F5;
    padding: 6px 14px;
    border-radius: 999px;
}

#mazeBest { color: #A76B00; background: #FFF3D6; }

#mazeCanvasWrap {
    --maze-bg: #FFF3C4;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--maze-bg);
    border-radius: 20px;
    padding: 14px;
    margin: 0 auto 20px;
    width: fit-content;
    max-width: 100%;
    overflow: auto;
    touch-action: none;
    transition: background 0.3s ease;
}

#mazeCanvas {
    display: block;
    border-radius: 12px;
    touch-action: none;
    cursor: pointer;
    background: transparent;
}

.maze-status {
    min-height: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.5;
}

.maze-status.maze-success { color: #2EC4B6; }
.maze-status.maze-error   { color: #FF6B6B; }
.maze-status.maze-warn    { color: #F7B32B; }

.maze-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.maze-btn {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    padding: 12px 26px;
    cursor: pointer;
    color: #fff;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.12);
    transition: transform 0.15s ease;
}

.maze-btn:active { transform: translateY(2px); box-shadow: 1px 1px 0 rgba(0,0,0,0.12); }

.maze-btn.check { background: #6BCB77; }
.maze-btn.retry { background: #4D96FF; }
.maze-btn.newmaze { background: #FF6B6B; }

@media (max-width: 480px) {
    .maze-card { padding: 20px 12px 26px; }
    .maze-title { font-size: 1.3rem; }
    .maze-instruction { font-size: 0.92rem; }
    .maze-btn { padding: 10px 18px; font-size: 0.92rem; }
    .maze-level-btn { padding: 8px 16px; font-size: 0.88rem; }
    .maze-stats { font-size: 0.85rem; gap: 10px; }
}
