:root {
    --bg: #080d1f;
    --bg-secondary: #121933;
    --bg-tertiary: #1a2447;
    --panel: rgba(17, 24, 52, 0.72);
    --panel-strong: rgba(12, 18, 40, 0.88);
    --surface: rgba(255, 255, 255, 0.06);
    --surface-hover: rgba(255, 255, 255, 0.12);
    --surface-active: rgba(255, 255, 255, 0.16);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #f7fbff;
    --text-secondary: #c5d0f1;
    --text-muted: #93a2d6;
    --accent: #4facfe;
    --accent-alt: #c084fc;
    --accent-soft: #4ade80;
    --accent-warm: #fbbf24;
    --accent-danger: #f87171;
    --accent-glow: rgba(79, 172, 254, 0.28);
    --success: #4ade80;
    --success-glow: rgba(74, 222, 128, 0.25);
    --danger: #f87171;
    --danger-glow: rgba(248, 113, 113, 0.28);
    --warning: #fbbf24;
    --cell-bg: rgba(255, 255, 255, 0.1);
    --cell-border: rgba(255, 255, 255, 0.08);
    --cell-revealed: rgba(255, 255, 255, 0.18);
    --cell-hover: rgba(79, 172, 254, 0.28);
    --cell-mine: rgba(248, 113, 113, 0.26);
    --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.34);
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 30px;
    --transition: 0.25s ease;
    --num-1: #6bd2ff;
    --num-2: #54e2a1;
    --num-3: #ff8f7c;
    --num-4: #d19cff;
    --num-5: #ffd560;
    --num-6: #8df1f7;
    --num-7: #ffb0b0;
    --num-8: #ffffff;
}

[data-theme="light"] {
    --bg: #eef4ff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #dce7ff;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: rgba(255, 255, 255, 0.94);
    --surface: rgba(56, 88, 175, 0.08);
    --surface-hover: rgba(56, 88, 175, 0.14);
    --surface-active: rgba(56, 88, 175, 0.18);
    --glass-border: rgba(33, 58, 132, 0.12);
    --text: #1b2453;
    --text-secondary: #465588;
    --text-muted: #6977a7;
    --accent: #2f88ff;
    --accent-alt: #9b59ff;
    --accent-soft: #17b66d;
    --accent-warm: #e3a100;
    --accent-danger: #ef5e5e;
    --accent-glow: rgba(47, 136, 255, 0.22);
    --success: #17b66d;
    --success-glow: rgba(23, 182, 109, 0.22);
    --danger: #ef5e5e;
    --danger-glow: rgba(239, 94, 94, 0.24);
    --warning: #e3a100;
    --cell-bg: rgba(47, 136, 255, 0.08);
    --cell-border: rgba(33, 58, 132, 0.1);
    --cell-revealed: rgba(255, 255, 255, 0.92);
    --cell-hover: rgba(47, 136, 255, 0.18);
    --cell-mine: rgba(239, 94, 94, 0.2);
    --shadow-sm: 0 12px 30px rgba(52, 73, 125, 0.08);
    --shadow-md: 0 18px 48px rgba(52, 73, 125, 0.12);
    --shadow-lg: 0 28px 80px rgba(52, 73, 125, 0.18);
    --num-1: #2f88ff;
    --num-2: #17b66d;
    --num-3: #ef5e5e;
    --num-4: #7c56f7;
    --num-5: #d98d00;
    --num-6: #0d9caf;
    --num-7: #b14a4a;
    --num-8: #26335f;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Nunito', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(79, 172, 254, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(192, 132, 252, 0.18), transparent 24%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 55%, var(--bg) 100%);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.hidden {
    display: none !important;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-md);
}

.loading-screen,
.game-over-overlay,
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-screen {
    z-index: 9999;
    background:
        radial-gradient(circle at center, rgba(79, 172, 254, 0.18), transparent 30%),
        linear-gradient(180deg, #070b19, #101733);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-shell {
    width: min(92vw, 440px);
    padding: 36px 32px;
    text-align: center;
    background: rgba(10, 15, 32, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
}

.loader-badge,
.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: var(--accent-soft);
}

.loader-mark {
    margin: 20px auto 12px;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    font-size: 2.2rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.24), rgba(192, 132, 252, 0.26));
    box-shadow: 0 0 42px rgba(79, 172, 254, 0.22);
    animation: floaty 2.4s ease-in-out infinite;
}

.loader-title,
.hero-copy h1,
.game-intro h1,
.section-heading h2,
.content-card h2,
.faq-item h3,
.step-card h3,
.logo-text,
.brand-text {
    font-family: 'Fredoka', cursive;
}

.loader-title {
    font-size: clamp(2rem, 5vw, 2.7rem);
}

.loader-subtitle {
    margin-top: 10px;
    color: var(--text-secondary);
}

.loader-bar-track {
    margin-top: 22px;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.loader-bar-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt), var(--accent-warm));
}

#confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
}

.landing-page,
.app {
    position: relative;
    min-height: 100vh;
}

.landing-page.page-exit,
.app.page-exit {
    animation: fadeSlideOut 0.45s ease forwards;
}

.app.page-enter {
    animation: fadeSlideIn 0.45s ease forwards;
}

.orb,
.app-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.orb-a,
.app-orb-a {
    top: 110px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(79, 172, 254, 0.16);
}

.orb-b,
.app-orb-b {
    top: 260px;
    right: -70px;
    width: 280px;
    height: 280px;
    background: rgba(192, 132, 252, 0.18);
}

.orb-c {
    top: 720px;
    left: 28%;
    width: 220px;
    height: 220px;
    background: rgba(251, 191, 36, 0.14);
}

.landing-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.landing-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: particleFloat linear infinite;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 18px 18px 0;
}

.nav-inner,
.landing-shell,
.header,
.game-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    background: rgba(8, 13, 31, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    backdrop-filter: blur(18px);
}

.brand,
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark,
.logo-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    box-shadow: 0 10px 28px var(--accent-glow);
}

.brand-text,
.logo-text {
    font-size: 1.45rem;
    font-weight: 700;
}

.brand-text span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--text-secondary);
    font-weight: 800;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta,
.hero-primary,
.play-btn,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 18px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    box-shadow: 0 16px 34px var(--accent-glow);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.nav-cta:hover,
.hero-primary:hover,
.play-btn:hover,
.btn-primary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 44px var(--accent-glow);
}

.hero-secondary,
.btn-secondary,
.lb-tab,
.diff-btn,
.icon-btn {
    border: 1px solid var(--glass-border);
    background: var(--surface);
    color: var(--text);
}

.landing-shell {
    padding: 38px 0 70px;
    position: relative;
    z-index: 1;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 34px;
    align-items: center;
    min-height: calc(100vh - 150px);
}

.hero-copy h1 {
    margin-top: 16px;
    font-size: clamp(3rem, 7vw, 5.4rem);
    line-height: 0.95;
}

.hero-copy h2 {
    margin-top: 16px;
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    color: var(--text-secondary);
    font-weight: 900;
}

.hero-text {
    max-width: 680px;
    margin-top: 18px;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.hero-secondary,
.btn-secondary {
    padding: 14px 20px;
    border-radius: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.hero-secondary:hover,
.btn-secondary:hover,
.lb-tab:hover,
.diff-btn:hover,
.icon-btn:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.hero-note {
    margin-top: 16px;
    color: var(--text-muted);
    font-weight: 700;
}

.chip-row,
.preview-tags,
.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-row {
    margin-top: 22px;
}

.chip-row span,
.preview-tags span,
.category-links a {
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-weight: 800;
}

.hero-preview {
    position: relative;
}

.preview-window {
    border-radius: 30px;
    overflow: hidden;
    background: rgba(10, 15, 32, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-lg);
}

.preview-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 800;
}

.preview-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.preview-bar span:nth-child(1) { background: var(--accent-danger); }
.preview-bar span:nth-child(2) { background: var(--accent-warm); }
.preview-bar span:nth-child(3) { background: var(--accent-soft); }

.preview-content {
    padding: 24px;
}

.preview-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.preview-stat {
    padding: 16px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
}

.preview-stat label {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.preview-stat strong {
    display: block;
    margin-top: 4px;
    font-size: 1.7rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.preview-grid span {
    aspect-ratio: 1;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.12);
}

.preview-grid span.r { background: rgba(255, 255, 255, 0.04); }
.preview-grid span.f { background: rgba(251, 191, 36, 0.18); }
.preview-grid span.m { background: rgba(248, 113, 113, 0.22); }

.preview-tags {
    margin-top: 18px;
}

.launch-panel,
.content-card,
.faq-panel,
.list-panel,
.link-panel,
.board-section {
    padding: 28px;
}
#how-to-play{padding: 28px;}
.faq-panel{
    margin: 30px 0px;
}
.launch-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
    gap: 30px;
    align-items: center;
    margin: 30px 0px;
}

.section-heading {
    text-align: center;
}

.section-heading.left {
    text-align: left;
}

.section-heading h2 {
    margin-top: 12px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-heading p {
    margin-top: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.launch-card {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.launch-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    color: var(--text-secondary);
}

.play-input {
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.play-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.16);
}

.play-btn {
    width: 100%;
    margin-top: 14px;
}

.play-btn.shake {
    animation: shake 0.4s ease;
}

.launch-help {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.step-grid,
.feature-layout,
.faq-list {
    display: grid;
    gap: 18px;
}

.step-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
}

.step-card {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.step-number {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 0.84rem;
    font-weight: 900;
    color: var(--accent-soft);
}

.step-card h3 {
    font-size: 1.4rem;
}

.step-card p,
.content-card p,
.faq-item p,
.tip-item p,
.feature-list li {
    margin-top: 12px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.content-stack {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.content-card h2,
.list-panel h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.feature-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.feature-list {
    list-style: none;
    margin-top: 18px;
}

.feature-list li,
.tip-item {
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-list li:first-child,
.tip-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.tip-item strong {
    font-size: 1.08rem;
    color: var(--text);
}

.faq-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
}

.faq-item {
    padding: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-item h3 {
    font-size: 1.26rem;
}

.link-panel {
    margin-top: 18px;
}

.category-links {
    margin-top: 20px;
    justify-content: center;
}

.category-links a:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.site-footer {
    padding: 34px 0 10px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
}

.app {
    padding: 24px 0 60px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0 20px;
    position: relative;
    z-index: 1;
}

.logo-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-greeting {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 800;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform var(--transition), background var(--transition);
}

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
    display: none;
}

.game-shell {
    position: relative;
    z-index: 1;
}

.game-intro {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 24px;
}

.hero-badge.small {
    padding: 7px 12px;
    font-size: 0.78rem;
}

.game-intro h1 {
    margin-top: 12px;
    font-size: clamp(2.4rem, 5vw, 4rem);
}

.game-intro p {
    margin-top: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.controls-bar,
.status-bar,
.board-wrapper {
    width: min(100%, 980px);
    margin: 0 auto;
}

.difficulty-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.diff-btn {
    min-width: 160px;
    padding: 14px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.diff-btn.active,
.lb-tab.active {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.18), rgba(192, 132, 252, 0.18));
    border-color: rgba(79, 172, 254, 0.45);
    box-shadow: 0 12px 30px rgba(79, 172, 254, 0.14);
}

.diff-icon,
.stat-icon {
    display: inline-block;
    font-size: 1.2rem;
}

.diff-label,
.stat-value {
    display: block;
    font-weight: 900;
}

.diff-info,
.stat-label {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 170px;
    padding: 16px 18px;
    border-radius: 20px;
    background: var(--panel);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 1.5rem;
}

.restart-btn {
    width: 68px;
    height: 68px;
    border: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    color: #fff;
    cursor: pointer;
    position: relative;
    box-shadow: 0 16px 34px var(--accent-glow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.restart-btn:hover {
    transform: translateY(-2px) scale(1.03);
}

.restart-icon,
.face-emoji {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
}

.face-emoji {
    opacity: 0;
    transition: opacity var(--transition);
}

.restart-btn.show-face .restart-icon {
    opacity: 0;
}

.restart-btn.show-face .face-emoji {
    opacity: 1;
}

.board-section {
    margin-top: 24px;
}

.board-frame {
    padding: 6px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.18), rgba(192, 132, 252, 0.12));
}

.board-wrapper {
    overflow: auto;
    padding: 18px;
}

.board {
    display: grid;
    gap: 2px;
    width: fit-content;
    margin: 0 auto;
    padding: 10px;
    border-radius: 22px;
    background: var(--panel-strong);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-lg);
}

.board.shake {
    animation: boardShake 0.38s ease;
}

.cell {
    width: var(--cell-size, 36px);
    height: var(--cell-size, 36px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: var(--cell-bg);
    color: transparent;
    cursor: pointer;
    font-weight: 900;
    font-size: calc(var(--cell-size, 36px) * 0.42);
    transition: transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.cell:hover:not(.revealed):not(.flagged) {
    background: var(--cell-hover);
    transform: scale(1.04);
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.12);
}

.cell.revealed {
    background: var(--cell-revealed);
    cursor: default;
    animation: popIn 0.22s ease;
}

.cell[data-num="1"] { color: var(--num-1); }
.cell[data-num="2"] { color: var(--num-2); }
.cell[data-num="3"] { color: var(--num-3); }
.cell[data-num="4"] { color: var(--num-4); }
.cell[data-num="5"] { color: var(--num-5); }
.cell[data-num="6"] { color: var(--num-6); }
.cell[data-num="7"] { color: var(--num-7); }
.cell[data-num="8"] { color: var(--num-8); }

.cell.flagged {
    background: rgba(251, 191, 36, 0.24);
    color: var(--text);
    animation: flagPop 0.3s cubic-bezier(0.34,1.56,0.64,1);

}

.cell.flagged::after {
    content: '🚩';
    font-size: calc(var(--cell-size, 36px) * 0.46);
    color: initial;
    animation: flagWave 2s ease-in-out infinite;
}

.cell.mine-hit {
    background: var(--cell-mine) !important;
    animation: mineExplode 0.4s ease;
}

.cell.mine-hit::after,
.cell.mine-revealed::after {
    content: '💣';
    font-size: calc(var(--cell-size, 36px) * 0.44);
    color: initial; 
}
@keyframes mineExplode {
    0% { transform: scale(0.3); } 50% { transform: scale(1.3); } 100% { transform: scale(1); }
}

.cell.mine-revealed {
    background: rgba(255, 255, 255, 0.12);
}

.cell.wrong-flag {
    background: rgba(248, 113, 113, 0.2);
}

.cell.wrong-flag::after {
    content: '❌';
    font-size: calc(var(--cell-size, 36px) * 0.42);
    color: initial; 
}

.cell.win-cell {
    animation: winPulse 0.6s ease;
}

.game-over-overlay,
.modal-overlay {
    z-index: 6000;
    background: rgba(6, 11, 24, 0.62);
    backdrop-filter: blur(10px);
}

.game-over-card,
.modal-card {
    width: min(92vw, 460px);
    padding: 30px;
    text-align: center;
}

.game-over-icon {
    font-size: 3rem;
}

.game-over-title,
.modal-title {
    margin-top: 10px;
    font-size: 2rem;
    font-family: 'Fredoka', cursive;
}

.game-over-msg {
    margin-top: 8px;
    color: var(--text-secondary);
}

.game-over-stats {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin: 22px 0;
}

.go-stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.go-stat-value {
    display: block;
    margin-top: 6px;
    font-size: 1.4rem;
    font-weight: 900;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.modal-close {
    flex-shrink: 0;
}

.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0 16px;
}

.lb-tab {
    flex: 1;
    min-height: 46px;
    border-radius: 16px;
    font-weight: 900;
    cursor: pointer;
}

.leaderboard-list {
    max-height: 320px;
    overflow-y: auto;
    text-align: left;
}

.lb-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.lb-entry + .lb-entry {
    margin-top: 10px;
}

.lb-rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.08);
}

.lb-time {
    font-weight: 900;
}

.lb-date {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.lb-empty {
    padding: 24px;
    color: var(--text-muted);
    text-align: center;
}

.btn-secondary {
    width: 100%;
    margin-top: 16px;
    min-height: 48px;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes particleFloat {
    0% { transform: translateY(105vh) scale(0); opacity: 0; }
    15% { opacity: 0.35; }
    85% { opacity: 0.08; }
    100% { transform: translateY(-15vh) scale(1); opacity: 0; }
}

@keyframes fadeSlideOut {
    to {
        opacity: 0;
        transform: translateY(-16px);
    }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% { transform: scale(0.82); opacity: 0.45; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes boardShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-3px); }
}

@keyframes winPulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 2px var(--success-glow); }
}

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

@media (max-width: 1080px) {
    .hero-section,
    .launch-panel,
    .feature-layout,
    .faq-list,
    .step-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        min-height: auto;
        padding-top: 20px;
    }
}

@media (max-width: 760px) {
    .site-nav {
        padding: 14px 14px 0;
    }

    .nav-inner,
    .landing-shell,
    .header,
    .game-shell {
        width: min(100% - 20px, 1180px);
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .landing-shell {
        padding-top: 26px;
    }

    .launch-panel,
    .content-card,
    .faq-panel,
    .list-panel,
    .link-panel,
    .board-section {
        padding: 22px;
    }

    .hero-copy h1 {
        font-size: 2.8rem;
    }

    .hero-text,
    .section-heading p,
    .content-card p,
    .faq-item p,
    .step-card p {
        font-size: 0.98rem;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-right {
        justify-content: center;
    }

    .status-bar {
        flex-wrap: wrap;
    }

    .stat-card {
        min-width: 140px;
    }

    .diff-btn {
        min-width: 140px;
    }
}

@media (max-width: 520px) {
    .hero-actions,
    .chip-row,
    .preview-tags,
    .category-links {
        flex-direction: column;
    }

    .hero-primary,
    .hero-secondary,
    .category-links a {
        width: 100%;
        justify-content: center;
    }

    .preview-content {
        padding: 18px;
    }

    .preview-grid {
        gap: 6px;
    }

    .game-over-stats {
        gap: 18px;
    }

    .diff-info,
    .player-greeting {
        font-size: 0.8rem;
    }
}

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x: ;
  --tw-pan-y: ;
  --tw-pinch-zoom: ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position: ;
  --tw-gradient-via-position: ;
  --tw-gradient-to-position: ;
  --tw-ordinal: ;
  --tw-slashed-zero: ;
  --tw-numeric-figure: ;
  --tw-numeric-spacing: ;
  --tw-numeric-fraction: ;
  --tw-ring-inset: ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur: ;
  --tw-brightness: ;
  --tw-contrast: ;
  --tw-grayscale: ;
  --tw-hue-rotate: ;
  --tw-invert: ;
  --tw-saturate: ;
  --tw-sepia: ;
  --tw-drop-shadow: ;
  --tw-backdrop-blur: ;
  --tw-backdrop-brightness: ;
  --tw-backdrop-contrast: ;
  --tw-backdrop-grayscale: ;
  --tw-backdrop-hue-rotate: ;
  --tw-backdrop-invert: ;
  --tw-backdrop-opacity: ;
  --tw-backdrop-saturate: ;
  --tw-backdrop-sepia: ;
  --tw-contain-size: ;
  --tw-contain-layout: ;
  --tw-contain-paint: ;
  --tw-contain-style: ;
}
::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x: ;
  --tw-pan-y: ;
  --tw-pinch-zoom: ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position: ;
  --tw-gradient-via-position: ;
  --tw-gradient-to-position: ;
  --tw-ordinal: ;
  --tw-slashed-zero: ;
  --tw-numeric-figure: ;
  --tw-numeric-spacing: ;
  --tw-numeric-fraction: ;
  --tw-ring-inset: ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur: ;
  --tw-brightness: ;
  --tw-contrast: ;
  --tw-grayscale: ;
  --tw-hue-rotate: ;
  --tw-invert: ;
  --tw-saturate: ;
  --tw-sepia: ;
  --tw-drop-shadow: ;
  --tw-backdrop-blur: ;
  --tw-backdrop-brightness: ;
  --tw-backdrop-contrast: ;
  --tw-backdrop-grayscale: ;
  --tw-backdrop-hue-rotate: ;
  --tw-backdrop-invert: ;
  --tw-backdrop-opacity: ;
  --tw-backdrop-saturate: ;
  --tw-backdrop-sepia: ;
  --tw-contain-size: ;
  --tw-contain-layout: ;
  --tw-contain-paint: ;
  --tw-contain-style: ;
}
/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}
::before,
::after {
  --tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
  text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
  color: inherit;
  text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
  font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
  font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
  text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
  outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
  box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
  vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
  -webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
  display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}
fieldset {
  margin: 0;
  padding: 0;
}
legend {
  padding: 0;
}
ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
  resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
  cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
  max-width: 100%;
  height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
@layer __play_components__;
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.mb-10 {
  margin-bottom: 2.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.block {
  display: block;
}
.flex {
  display: flex;
}
.grid {
  display: grid;
}
.h-4 {
  height: 1rem;
}
.h-8 {
  height: 2rem;
}
.w-4 {
  width: 1rem;
}
.w-8 {
  width: 2rem;
}
.max-w-7xl {
  max-width: 80rem;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-8 {
  gap: 2rem;
}
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}
.rounded-lg {
  border-radius: 0.5rem;
}
.border-t {
  border-top-width: 1px;
}
.border-white\/5 {
  border-color: rgb(255 255 255 / 0.05);
}
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}
.from-g1 {
  --tw-gradient-from: #4facfe var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(79 172 254 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.to-g5 {
  --tw-gradient-to: #c084fc var(--tw-gradient-to-position);
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.pt-8 {
  padding-top: 2rem;
}
.font-display {
  font-family: Fredoka, cursive;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.font-bold {
  font-weight: 700;
}
.uppercase {
  text-transform: uppercase;
}
.tracking-wider {
  letter-spacing: 0.05em;
}
.text-gray-500 {
  --tw-text-opacity: 1;
  color: rgb(107 114 128 / var(--tw-text-opacity, 1));
}
.text-gray-600 {
  --tw-text-opacity: 1;
  color: rgb(75 85 99 / var(--tw-text-opacity, 1));
}
.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
@theme {
  /* ... */
}
.hover\:text-g1:hover {
  --tw-text-opacity: 1;
  color: rgb(79 172 254 / var(--tw-text-opacity, 1));
}
.hover\:text-g2:hover {
  --tw-text-opacity: 1;
  color: rgb(74 222 128 / var(--tw-text-opacity, 1));
}
.hover\:text-g3:hover {
  --tw-text-opacity: 1;
  color: rgb(251 191 36 / var(--tw-text-opacity, 1));
}
.hover\:text-g4:hover {
  --tw-text-opacity: 1;
  color: rgb(248 113 113 / var(--tw-text-opacity, 1));
}
.hover\:text-g5:hover {
  --tw-text-opacity: 1;
  color: rgb(192 132 252 / var(--tw-text-opacity, 1));
}
.hover\:text-white:hover {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sm\:flex-row {
    flex-direction: row;
  }
  .sm\:px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .lg\:px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
