: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;
      --blue: #2563eb;
      --dark: #0f172a;
      --line: #cbd5e1;
      --soft: #f8fafc;
      --selected: #dbeafe;
      --same: #e0f2fe;
      --fixed: #e2e8f0;
      --error: #fee2e2;
      --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;
    }


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

   .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;
    }

    .brand h1 {
      margin: 0 0 5px;
      font-size: clamp(28px, 4vw, 48px);
      letter-spacing: -0.055em;
    }

    .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: 850;
      cursor: pointer;
    }

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

    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);
    }

    button:disabled {
      opacity: .55;
      cursor: not-allowed;
    }

    .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 0 14px;
    }

    .side-actions {
      display: grid;
      gap: 8px;
    }

    .side-actions button {
      width: 100%;
      border-radius: 16px;
    }

    .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: 750;
    }

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

    .sudoku-wrap {
      display: grid;
      justify-content: center;
      gap: 14px;
    }

    .sudoku-board {
      display: grid;
      grid-template-columns: repeat(9, 1fr);
      grid-template-rows: repeat(9, 1fr);
      width: min(92vw, 606px);
      height: min(92vw, 660px);
      background: #0f172a;
      border: 4px solid #0f172a;
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 18px 42px rgba(0,0,0,.28);
    }

    .cell {
      position: relative;
      border: 1px solid var(--line);
      background: #fff;
      color: var(--dark);
      display: grid;
      place-items: center;
      font-size: clamp(18px, 4vw, 34px);
      font-weight: 850;
      user-select: none;
      cursor: pointer;
    }

    .cell:nth-child(3n) { border-right: 3px solid #0f172a; }
    .cell:nth-child(9n) { border-right: 1px solid var(--line); }
    .cell:nth-child(n+19):nth-child(-n+27),
    .cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 3px solid #0f172a; }

    .cell.fixed {
      background: var(--fixed);
      color: #111827;
      cursor: default;
    }

    .cell.selected { background: var(--selected); }
    .cell.same-number { background: var(--same); }
    .cell.related { background: #eff6ff; }
    .cell.invalid { background: var(--error); color: #b91c1c; }

    .cell .notes {
      position: absolute;
      inset: 3px;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(3, 1fr);
      gap: 1px;
      color: #64748b;
      font-size: clamp(8px, 1.8vw, 13px);
      font-weight: 800;
      line-height: 1;
      pointer-events: none;
    }

    .cell .notes span {
      display: grid;
      place-items: center;
    }

    .number-pad {
      display: grid;
      grid-template-columns: repeat(9, 1fr);
      gap: 8px;
      width: min(92vw, 560px);
      margin: 0 auto;
    }

    .number-pad button {
      border-radius: 14px;
      padding: 12px 0;
      background: #fff;
      color: #0f172a;
      box-shadow: 0 8px 16px rgba(0,0,0,.16);
      font-size: 18px;
    }

    .tool-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
    }

    .tool-row button.active {
      background: var(--success);
      color: #042f2e;
    }

    .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; }
      .stats { grid-template-columns: repeat(4, 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: 32px; }
      .stats { grid-template-columns: repeat(2, 1fr); }
      .number-pad { grid-template-columns: repeat(5, 1fr); }
      .number-pad button:last-child { grid-column: span 1; }
      .sudoku-board { border-radius: 14px; border-width: 3px; }

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