/* ============================================================
   Kids Kingdom - Sudoku Stylesheet
   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; }
}

/* ================= SUDOKU SECTION ================= */
.sk-section { padding: 40px 0 60px; }

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

/* ---- controls ---- */
.sk-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.sk-theme-select {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 999px;
    border: 2px solid #F7B32B;
    background: #fff;
    color: #2b2b2b;
    cursor: pointer;
}

.sk-levels { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.sk-level-btn {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    border: 2px solid #ddd;
    background: #fff;
    color: #888;
    border-radius: 999px;
    padding: 9px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sk-level-btn:hover { border-color: #F7B32B; color: #F7B32B; }
.sk-level-btn.active { color: #fff; box-shadow: 3px 3px 0 rgba(0,0,0,0.1); }
.sk-level-btn[data-level="kids"].active   { background: #6BCB77; border-color: #6BCB77; }
.sk-level-btn[data-level="easy"].active   { background: #4D96FF; border-color: #4D96FF; }
.sk-level-btn[data-level="medium"].active { background: #F7B32B; border-color: #F7B32B; }
.sk-level-btn[data-level="hard"].active   { background: #FF6B6B; border-color: #FF6B6B; }

/* ---- stats ---- */
.sk-stats {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 20px;
}
.sk-stats span { background: #F5F5F5; padding: 6px 14px; border-radius: 999px; }

/* ---- board ---- */
.sk-board-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.sk-board {
    display: grid;
    background: #FFF3D6;
    padding: 8px;
    border-radius: 14px;
    border: 3px solid #F7B32B;
    width: fit-content;
}
.sk-board.sk-size-9 { grid-template-columns: repeat(9, 40px); grid-template-rows: repeat(9, 40px); }
.sk-board.sk-size-4 { grid-template-columns: repeat(4, 62px); grid-template-rows: repeat(4, 62px); }

.sk-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2b2b2b;
    border: 1px solid #F0E0B8;
    user-select: none;
}
.sk-size-4 .sk-cell { font-size: 1.8rem; }

.sk-cell.sk-border-r { border-right: 3px solid #F7B32B; }
.sk-cell.sk-border-b { border-bottom: 3px solid #F7B32B; }

.sk-cell.sk-given {
    background: #FFF3D6;
    color: #A76B00;
    font-weight: 800;
}

.sk-input {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.sk-input:hover, .sk-input:focus { background: #FFE9A8; }

.sk-input.sk-correct { color: #16A34A; background: #DCFCE7; }
.sk-input.sk-incorrect { color: #DC2626; background: #FEE2E2; }
.sk-input.sk-conflict { background: #FFD7D7; }

/* ---- number/icon picker popup ---- */
.sk-picker {
    position: absolute;
    display: grid;
    gap: 4px;
    background: #fff;
    border: 3px solid #F7B32B;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 4px 6px 0 rgba(0,0,0,0.15);
    z-index: 999;
}

.sk-picker-btn {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: #FFF3D6;
    color: #2b2b2b;
    cursor: pointer;
}
.sk-picker-btn:hover { background: #FFE082; }
.sk-picker-clear { background: #FEE2E2; color: #DC2626; }
.sk-picker-clear:hover { background: #FECACA; }

/* ---- status + buttons ---- */
.sk-status {
    min-height: 28px;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.sk-status.sk-success { color: #2EC4B6; }
.sk-status.sk-error   { color: #FF6B6B; }
.sk-status.sk-warn     { color: #F7B32B; }

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

.sk-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;
}
.sk-btn:active { transform: translateY(2px); box-shadow: 1px 1px 0 rgba(0,0,0,0.12); }
.sk-btn.check     { background: #6BCB77; }
.sk-btn.reveal    { background: #A78BFA; }
.sk-btn.reset     { background: #4D96FF; }
.sk-btn.newpuzzle { background: #FF6B6B; }

@media (max-width: 480px) {
    .sk-board.sk-size-9 { grid-template-columns: repeat(9, 32px); grid-template-rows: repeat(9, 32px); }
    .sk-board.sk-size-4 { grid-template-columns: repeat(4, 52px); grid-template-rows: repeat(4, 52px); }
    .sk-cell { font-size: 1rem; }
    .sk-size-4 .sk-cell { font-size: 1.5rem; }
    .sk-card { padding: 20px 12px 26px; }
    .sk-btn { padding: 10px 18px; font-size: 0.92rem; }
}
