/* /Layout/MainLayout.razor.rz.scp.css */
main[b-xghhxpbf94] {
    min-height: 100vh;
    padding: 0.5rem;
}
/* /Pages/Home.razor.rz.scp.css */
/* ── Layout ─────────────────────────────────────────────────────────────── */
.game-wrapper[b-0fln56ixs3] {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    user-select: none;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.game-header[b-0fln56ixs3] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.game-title[b-0fln56ixs3] {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #e6edf3;
    margin: 0;
    text-shadow: 0 0 20px rgba(248, 81, 73, 0.5);
}

.game-subtitle[b-0fln56ixs3] {
    font-size: 0.78rem;
    color: #8b949e;
    margin: 0.15rem 0 0;
}

.controls[b-0fln56ixs3] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.difficulty-group[b-0fln56ixs3] {
    display: flex;
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
}

.diff-btn[b-0fln56ixs3] {
    padding: 0.4rem 0.9rem;
    background: #21262d;
    color: #8b949e;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.diff-btn:hover[b-0fln56ixs3] { background: #30363d; color: #e6edf3; }

.diff-btn.active[b-0fln56ixs3] {
    background: #388bfd22;
    color: #58a6ff;
    box-shadow: inset 0 0 0 1px #388bfd55;
}

.new-game-btn[b-0fln56ixs3] {
    padding: 0.4rem 1rem;
    background: #21262d;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}

.new-game-btn:hover[b-0fln56ixs3] {
    background: #388bfd22;
    border-color: #388bfd88;
}

.new-game-btn.inline[b-0fln56ixs3] {
    margin-left: 1rem;
    padding: 0.3rem 0.8rem;
}

/* ── Stats bar ──────────────────────────────────────────────────────────── */
.stats-bar[b-0fln56ixs3] {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.6rem 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    flex-wrap: wrap;
}

.stat[b-0fln56ixs3] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-wide[b-0fln56ixs3] { flex: 1; min-width: 140px; }

.stat-label[b-0fln56ixs3] {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #8b949e;
    min-width: 2.5rem;
}

.stat-value[b-0fln56ixs3] {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c9d1d9;
    white-space: nowrap;
}

.time-value[b-0fln56ixs3] {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.stat-value.gold[b-0fln56ixs3] { color: #e3b341; }

.level-badge[b-0fln56ixs3] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 0 8px currentColor;
}

.progress-track[b-0fln56ixs3] {
    flex: 1;
    height: 8px;
    background: #21262d;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #30363d;
    min-width: 60px;
}

.progress-fill[b-0fln56ixs3] {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.hp-fill[b-0fln56ixs3] { background: linear-gradient(90deg, #f85149, #ff7b72); }
.xp-fill[b-0fln56ixs3] { background: linear-gradient(90deg, #388bfd, #58a6ff); }

/* ── Result banner ──────────────────────────────────────────────────────── */
.result-banner[b-0fln56ixs3] {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    gap: 0.5rem;
}

.score-pill[b-0fln56ixs3] {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(13, 17, 23, 0.35);
    border: 1px solid currentColor;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.result-banner.won[b-0fln56ixs3] {
    background: #1a3a1a;
    border: 1px solid #3fb950;
    color: #3fb950;
    text-shadow: 0 0 12px rgba(63, 185, 80, 0.6);
}

.result-banner.lost[b-0fln56ixs3] {
    background: #3a1a1a;
    border: 1px solid #f85149;
    color: #f85149;
    text-shadow: 0 0 12px rgba(248, 81, 73, 0.6);
    animation: shake-b-0fln56ixs3 0.4s ease;
}

@keyframes shake-b-0fln56ixs3 {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ── Board ──────────────────────────────────────────────────────────────── */
.board-scroll[b-0fln56ixs3] { overflow-x: auto; }

.board[b-0fln56ixs3] {
    display: inline-grid;
    grid-template-columns: repeat(var(--cols), var(--cell-size, 36px));
    gap: 2px;
    padding: 6px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    min-width: min-content;
}

/* ── Cells ──────────────────────────────────────────────────────────────── */
.cell[b-0fln56ixs3] {
    width: var(--cell-size, 36px);
    height: var(--cell-size, 36px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: filter 0.1s, transform 0.08s;
    position: relative;
    box-sizing: border-box;
    line-height: 1;
}

.cell:active[b-0fln56ixs3] { transform: scale(0.92); }

/* Hidden */
.cell.hidden[b-0fln56ixs3] {
    background: #21262d;
    border: 1px solid #30363d;
    box-shadow: inset 0 1px 0 #3d444d;
}

.cell.hidden:hover[b-0fln56ixs3] {
    background: #2d333b;
    border-color: #444c56;
    box-shadow: 0 0 6px rgba(88, 166, 255, 0.15);
}

/* Flagged */
.cell.flagged[b-0fln56ixs3] {
    background: #2d1f40;
    border: 1px solid #8957e5;
    color: #d2a8ff;
    font-size: 0.9rem;
}

/* Safe revealed */
.cell.safe[b-0fln56ixs3] {
    background: #161b22;
    border: 1px solid #21262d;
    cursor: default;
}

.cell.safe.empty[b-0fln56ixs3] { color: transparent; }

/* Adjacent sum number colours */
.cell.safe.s1[b-0fln56ixs3]  { color: #58a6ff; }
.cell.safe.s2[b-0fln56ixs3]  { color: #3fb950; }
.cell.safe.s3[b-0fln56ixs3]  { color: #ffa657; }
.cell.safe.s4[b-0fln56ixs3]  { color: #f85149; }
.cell.safe.s5[b-0fln56ixs3]  { color: #ff7b72; }
.cell.safe.s6[b-0fln56ixs3]  { color: #d2a8ff; }
.cell.safe.s7[b-0fln56ixs3]  { color: #e3b341; }
.cell.safe.s8[b-0fln56ixs3]  { color: #79c0ff; }
.cell.safe.low[b-0fln56ixs3]  { }
.cell.safe.mid[b-0fln56ixs3]  { }
.cell.safe.high[b-0fln56ixs3] { color: #f85149; }
.cell.safe.danger[b-0fln56ixs3] { color: #ff0000; font-size: 0.7rem; }

/* Monster cells – level colours */
.cell.monster[b-0fln56ixs3] { cursor: default; font-size: 0.85rem; font-weight: 900; }

.cell.monster.lv-1[b-0fln56ixs3] { background: #1c3a2a; border: 1px solid #2ea043; color: #56d364; }
.cell.monster.lv-2[b-0fln56ixs3] { background: #1a2f4a; border: 1px solid #1f6feb; color: #79c0ff; }
.cell.monster.lv-3[b-0fln56ixs3] { background: #3a2e0a; border: 1px solid #bb8009; color: #e3b341; }
.cell.monster.lv-4[b-0fln56ixs3] { background: #3a1f0a; border: 1px solid #bd561d; color: #ffa657; }
.cell.monster.lv-5[b-0fln56ixs3] { background: #3a0d0d; border: 1px solid #b91c1c; color: #f85149; }
.cell.monster.lv-6[b-0fln56ixs3] { background: #280d3a; border: 1px solid #7928ca; color: #d2a8ff; }
.cell.monster.lv-7[b-0fln56ixs3] { background: #1a0808; border: 1px solid #6e0000; color: #ff7b72; text-shadow: 0 0 8px #f85149; }
.cell.monster.lv-8[b-0fln56ixs3] { background: #0d0d0d; border: 1px solid #484f58; color: #e6edf3; text-shadow: 0 0 12px #ffffff; }

/* Defeated monster overlay */
.cell.monster.defeated[b-0fln56ixs3] {
    opacity: 0.65;
    font-size: 1rem;
}

.cell.monster.defeated[b-0fln56ixs3]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    border-radius: 3px;
}

/* Exposed (game-over) monster */
.cell.monster.exposed[b-0fln56ixs3] {
    animation: pulse-danger-b-0fln56ixs3 0.8s ease-in-out infinite alternate;
}

@keyframes pulse-danger-b-0fln56ixs3 {
    from { box-shadow: 0 0 4px rgba(248,81,73,0.5); }
    to   { box-shadow: 0 0 12px rgba(248,81,73,1); }
}

/* ── Level badge colours ────────────────────────────────────────────────── */
.level-badge.lv-1[b-0fln56ixs3] { background: #1c3a2a; color: #56d364; }
.level-badge.lv-2[b-0fln56ixs3] { background: #1a2f4a; color: #79c0ff; }
.level-badge.lv-3[b-0fln56ixs3] { background: #3a2e0a; color: #e3b341; }
.level-badge.lv-4[b-0fln56ixs3] { background: #3a1f0a; color: #ffa657; }
.level-badge.lv-5[b-0fln56ixs3] { background: #3a0d0d; color: #f85149; }
.level-badge.lv-6[b-0fln56ixs3] { background: #280d3a; color: #d2a8ff; }
.level-badge.lv-7[b-0fln56ixs3] { background: #1a0808; color: #ff7b72; }
.level-badge.lv-8[b-0fln56ixs3] { background: #2a2000; color: #e3b341; box-shadow: 0 0 12px #e3b341; }

/* ── Legend ─────────────────────────────────────────────────────────────── */
.legend[b-0fln56ixs3] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    padding: 0.6rem 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #8b949e;
    align-items: center;
}

.legend-section[b-0fln56ixs3] {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.legend-section strong[b-0fln56ixs3] { color: #c9d1d9; }
.legend-section.dim[b-0fln56ixs3] { font-style: italic; }

.legend-cell[b-0fln56ixs3] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: default;
}

/* Reuse monster cell styles from board */
.legend-cell.monster-cell.lv-1[b-0fln56ixs3] { background: #1c3a2a; color: #56d364; border: 1px solid #2ea043; }
.legend-cell.monster-cell.lv-2[b-0fln56ixs3] { background: #1a2f4a; color: #79c0ff; border: 1px solid #1f6feb; }
.legend-cell.monster-cell.lv-3[b-0fln56ixs3] { background: #3a2e0a; color: #e3b341; border: 1px solid #bb8009; }
.legend-cell.monster-cell.lv-4[b-0fln56ixs3] { background: #3a1f0a; color: #ffa657; border: 1px solid #bd561d; }
.legend-cell.monster-cell.lv-5[b-0fln56ixs3] { background: #3a0d0d; color: #f85149; border: 1px solid #b91c1c; }
.legend-cell.monster-cell.lv-6[b-0fln56ixs3] { background: #280d3a; color: #d2a8ff; border: 1px solid #7928ca; }

.legend-cell.hidden-cell[b-0fln56ixs3]  { background: #21262d; border: 1px solid #30363d; }
.legend-cell.flag-cell[b-0fln56ixs3]    { background: #2d1f40; border: 1px solid #8957e5; color: #d2a8ff; }
.legend-cell.dead-cell[b-0fln56ixs3]    { background: #161b22; border: 1px solid #30363d; color: #8b949e; opacity: 0.65; }

/* ── Leaderboard ────────────────────────────────────────────────────────── */
.leaderboard-panel[b-0fln56ixs3] {
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, #161b22, #11161d);
    border: 1px solid #30363d;
    border-radius: 8px;
}

.leaderboard-header[b-0fln56ixs3] {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.leaderboard-header h2[b-0fln56ixs3] {
    margin: 0.15rem 0 0;
    font-size: 1rem;
    color: #e6edf3;
}

.leaderboard-kicker[b-0fln56ixs3] {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b949e;
}

.leaderboard-difficulty[b-0fln56ixs3] {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #21262d;
    border: 1px solid #30363d;
    color: #79c0ff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.leaderboard-empty[b-0fln56ixs3] {
    margin: 0;
    color: #8b949e;
    font-size: 0.86rem;
}

.leaderboard-list[b-0fln56ixs3] {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.leaderboard-item[b-0fln56ixs3] {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.65rem 0.8rem;
    border-radius: 6px;
    background: #0d1117;
    border: 1px solid #21262d;
}

.leaderboard-rank[b-0fln56ixs3] {
    min-width: 2.5rem;
    color: #e3b341;
    font-weight: 800;
}

.leaderboard-time[b-0fln56ixs3] {
    color: #e6edf3;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.leaderboard-date[b-0fln56ixs3] {
    color: #8b949e;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .board[b-0fln56ixs3] { --cell-size: 28px; gap: 1px; }
    .cell[b-0fln56ixs3]  { font-size: 0.65rem; }
    .game-header[b-0fln56ixs3] { flex-direction: column; align-items: flex-start; }
    .stats-bar[b-0fln56ixs3] { gap: 0.75rem; }
    .leaderboard-header[b-0fln56ixs3] { flex-direction: column; }
    .leaderboard-item[b-0fln56ixs3] { grid-template-columns: auto 1fr; }
    .leaderboard-date[b-0fln56ixs3] { grid-column: 1 / -1; }
}
