 :root {
      --bg: #0f5132;
      --bg-dark: #083b24;
      --panel: rgba(255,255,255,.11);
      --panel-border: rgba(255,255,255,.16);
      --text: #ffffff;
      --muted: rgba(255,255,255,.78);
      --accent: #ffd166;
      --danger: #e63946;
      --success: #2dd4bf;
      --cell: #e2e8f0;
      --cell-open: #f8fafc;
      --cell-border: #94a3b8;
      --dark: #0f172a;
      --shadow: 0 14px 34px rgba(0,0,0,.24);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--text);
      background: radial-gradient(circle at top, #177245, var(--bg-dark));
    }

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

    .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: rgba(255, 255, 255, .13);
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 999px;
        padding: 8px 12px;
        font-size: 13px;
        font-weight: 850;
        color: rgba(255, 255, 255, .9);
        margin-bottom: 16px;
    }

    .site-header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(6, 53, 31, .94);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid rgba(255,255,255,.12);
    }

    .nav {
      width: min(1180px, calc(100% - 32px));
      min-height: 70px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #fff;
      font-weight: 700;
      letter-spacing: -0.035em;
      font-size: 21px;
    }

    .logo-icon {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      background: linear-gradient(135deg, #ffffff, #dbeafe);
      display: grid;
      place-items: center;
      color: #0f172a;
      font-size: 24px;
      box-shadow: 0 10px 20px rgba(0,0,0,.18);
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .nav-links a {
      color: rgba(255,255,255,.86);
      font-size: 14px;
      font-weight: 800;
      padding: 10px 12px;
      border-radius: 999px;
    }

    .nav-links a:hover,
    .nav-links a.active {
      background: rgba(255,255,255,.13);
      color: #fff;
    }

    .hero {
      background:
        radial-gradient(circle at 18% 18%, rgba(255,209,102,.22), transparent 32%),
        radial-gradient(circle at 82% 12%, rgba(45,212,191,.18), transparent 28%),
        linear-gradient(145deg, var(--bg-dark), var(--bg));
      color: #fff;
      padding: 48px 0 28px;
    }

    .hero h1 {
      margin: 0;
      max-width: 900px;
      font-size: clamp(2em, 5.5vw, 3em);
      line-height: .96;
      letter-spacing: 0;
      font-weight: 700;
    }

    .hero p {
      margin: 18px 0 0;
      max-width: 90%;
      color: rgba(255,255,255,.82);
      font-size: clamp(17px, 2vw, 21px);
      line-height: 1.55;
    }

    .hero-wrap {
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
    }

    .app {
      width: min(1220px, 100%);
      margin: 0 auto;
      padding: 18px;
    }

    .brand h1 {
      margin: 0 0 5px;
      font-size: clamp(26px, 4vw, 44px);
      letter-spacing: -0.05em;
    }

    .brand p {
      margin: 0;
      color: var(--muted);
      font-size: 15px;
    }

    .controls {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 15px;
    }

    select,
    button {
      border: 0;
      border-radius: 999px;
      padding: 11px 15px;
      font-size: 14px;
      font-weight: 800;
      cursor: pointer;
    }

    select {
      background: rgba(255,255,255,.96);
      color: #111827;
      min-width: 185px;
    }

    button {
      background: var(--accent);
      color: #111827;
      box-shadow: 0 8px 20px rgba(0,0,0,.18);
    }

    button.secondary {
      background: rgba(255,255,255,.15);
      color: #fff;
      border: 1px solid rgba(255,255,255,.22);
    }

    .game-shell {
      display: grid;
      grid-template-columns: 280px 1fr;
      gap: 18px;
      align-items: start;
    }

    .side-panel,
    .board-panel {
      background: var(--panel);
      border: 1px solid var(--panel-border);
      border-radius: 24px;
      box-shadow: var(--shadow);
    }

    .side-panel {
      padding: 16px;
    }

    .board-panel {
      padding: 16px;
      overflow: auto;
    }

    .stats {
      display: grid;
      gap: 10px;
      margin-bottom: 16px;
    }

    .stat {
      background: rgba(0,0,0,.16);
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 18px;
      padding: 13px 14px;
    }

    .stat small {
      display: block;
      color: var(--muted);
      margin-bottom: 3px;
      font-size: 12px;
    }

    .stat strong {
      display: block;
      font-size: 24px;
      line-height: 1.1;
    }

    .instructions {
      color: var(--muted);
      line-height: 1.55;
      font-size: 14px;
      margin: 0;
    }

    .status {
      margin: 0 0 14px;
      padding: 13px 15px;
      background: rgba(0,0,0,.17);
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 18px;
      color: var(--muted);
      font-weight: 700;
    }

    .status.win { color: var(--success); }
    .status.lose { color: #fecaca; }

    .mine-board {
      display: grid;
      gap: 4px;
      width: max-content;
      margin: 0 auto;
      touch-action: manipulation;
    }

    .cell {
      width: 34px;
      height: 34px;
      border: 1px solid var(--cell-border);
      border-radius: 8px;
      background: linear-gradient(180deg, #f1f5f9, #cbd5e1);
      color: var(--dark);
      display: grid;
      place-items: center;
      font-weight: 950;
      font-size: 17px;
      user-select: none;
      cursor: pointer;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 3px 0 rgba(15,23,42,.25);
    }

    .cell:hover {
      filter: brightness(1.05);
    }

    .cell.open {
      background: var(--cell-open);
      box-shadow: inset 0 0 0 1px rgba(148,163,184,.22);
      cursor: default;
    }

    .cell.flagged {
      background: linear-gradient(180deg, #fef3c7, #fde68a);
    }

    .cell.mine {
      background: #fee2e2;
      color: #991b1b;
    }

    .cell.exploded {
      background: #ef4444;
      color: #fff;
    }

    .n1 { color: #2563eb; }
    .n2 { color: #16a34a; }
    .n3 { color: #dc2626; }
    .n4 { color: #4338ca; }
    .n5 { color: #b45309; }
    .n6 { color: #0891b2; }
    .n7 { color: #111827; }
    .n8 { color: #64748b; }

    .seo-content {
      margin-top: 30px;
      background: #f8fafc;
      color: #111827;
      border-radius: 28px;
      padding: clamp(22px, 4vw, 44px);
      box-shadow: 0 18px 45px rgba(0,0,0,.18);
    }

    .content-wrap {
      max-width: 980px;
      margin: 0 auto;
    }

    .seo-content article {
      line-height: 1.75;
      font-size: 17px;
    }

    .seo-content h2 {
      margin: 34px 0 12px;
      font-size: clamp(24px, 3vw, 34px);
      letter-spacing: -0.035em;
      color: #0f172a;
    }

    .seo-content h2:first-child { margin-top: 0; }

    .seo-content h3 {
      margin: 24px 0 8px;
      font-size: 21px;
      color: #123c69;
    }

    .seo-content p {
      margin: 0 0 14px;
      color: #334155;
    }

    .seo-content ul,
    .seo-content ol {
      color: #334155;
      padding-left: 23px;
    }

    .seo-content li { margin-bottom: 8px; }
    .seo-content strong { color: #0f172a; }

    .content-section,
    .other-games-section {
      background: #f8fafc;
      border-radius: 28px;
      margin-top:30px;
      color:#111827;
      padding:clamp(22px, 4vw, 44px);
      box-shadow: 0 18px 45px rgba(0,0,0,.18);
    }

    .content-wrap,
    .other-games-wrap {
      width: min(980px, calc(100% - 32px));
      margin: 0 auto;
      padding: 58px 0;
    }

    .content-wrap article {
      font-size: 17px;
      line-height: 1.75;
      color: #334155;
    }

    .content-wrap h2,
    .other-games-wrap h2 {
      margin: 36px 0 12px;
      font-size: clamp(26px, 3vw, 38px);
      color: #0f172a;
      letter-spacing: -0.045em;
      line-height: 1.1;
    }

    .content-wrap h2:first-child,
    .other-games-wrap h2:first-child { margin-top: 0; }

    .content-wrap h3 {
      margin: 24px 0 8px;
      font-size: 22px;
      color: #123c69;
      letter-spacing: -0.02em;
    }

    .content-wrap p { margin: 0 0 14px; }
    .content-wrap ul { padding-left: 22px; }
    .content-wrap li { margin-bottom: 8px; }
    .content-wrap strong { color: #0f172a; }

    .other-games-section {
      border-top: 1px solid var(--line);
      padding-bottom: 16px;
    }

    .other-games-intro {
      margin: 0 0 22px;
      color: var(--muted);
      line-height: 1.6;
      font-size: 17px;
      max-width: 780px;
    }

    .games-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }

    .game-card {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 24px;
      box-shadow: 0 12px 28px rgba(15,23,42,.08);
      padding: 20px;
      min-height: 170px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    }

    .game-card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow);
      border-color: #bbf7d0;
    }

    .game-icon {
      width: 58px;
      height: 58px;
      border-radius: 20px;
      background: #e8f7ef;
      display: grid;
      place-items: center;
      font-size: 30px;
      margin-bottom: 14px;
    }

    .game-card h3 {
      margin: 0 0 8px;
      font-size: 22px;
      letter-spacing: -0.035em;
    }

    .game-card p {
      margin: 0;
      color: #475569;
      line-height: 1.55;
      font-size: 15px;
    }

    .game-link {
      margin-top: 18px;
      display: inline-flex;
      color: #0f5132;
      font-weight: 950;
    }

    .site-footer {
      background: #062617;
      color: rgba(255,255,255,.74);
      padding: 28px 0;
    }

    .footer-wrap {
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      font-size: 14px;
    }

    .footer-wrap a { color: #fff; font-weight: 850; }

     @media (max-width: 900px) {
      .game-shell {
        grid-template-columns: 1fr;
      }

      .side-panel {
        display: grid;
        grid-template-columns: 1fr;
      }

      .stats {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    @media (max-width: 680px) {

      .nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
      }

      .nav-links {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
      }

      .app { padding: 12px; }

      .brand h1 { font-size: 30px; }

      .stats {
        grid-template-columns: 1fr;
      }

      .board-panel {
        padding: 12px;
      }

      .cell {
        width: 30px;
        height: 30px;
        border-radius: 7px;
        font-size: 15px;
      }

      .games-grid { grid-template-columns: 1fr; }

    }