 :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;
      --dark: #0f172a;
      --board: #bbada0;
      --empty: rgba(238, 228, 218, .35);
      --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(1200px, 100%);
      margin: 0 auto;
      padding: 18px;
    }

    .brand h1 {
      margin: 0 0 5px;
      font-size: clamp(34px, 5vw, 62px);
      letter-spacing: -0.07em;
      line-height: .95;
    }

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

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

    button {
      border: 0;
      border-radius: 999px;
      padding: 11px 15px;
      font-size: 14px;
      font-weight: 850;
      cursor: pointer;
      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: 28px;
      line-height: 1.1;
    }

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

    .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: #86efac; }
    .status.lose { color: #fecaca; }

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

    .board {
      position: relative;
      width: min(92vw, 520px);
      height: min(92vw, 520px);
      background: var(--board);
      border-radius: 24px;
      padding: 14px;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      grid-template-rows: repeat(4, 1fr);
      gap: 14px;
      touch-action: none;
      box-shadow: 0 18px 42px rgba(0,0,0,.28);
    }

    .empty-cell {
      background: var(--empty);
      border-radius: 16px;
    }

    .tile {
      position: absolute;
      display: grid;
      place-items: center;
      border-radius: 16px;
      font-weight: 950;
      color: #776e65;
      transition: transform .12s ease, opacity .12s ease;
      box-shadow: 0 7px 14px rgba(0,0,0,.12);
      user-select: none;
    }

    .tile.new {
      animation: pop .14s ease-out;
    }

    @keyframes pop {
      from { transform: scale(.45); opacity: .5; }
      to { transform: scale(1); opacity: 1; }
    }

    .v2 { background: #eee4da; }
    .v4 { background: #ede0c8; }
    .v8 { background: #f2b179; color: #fff; }
    .v16 { background: #f59563; color: #fff; }
    .v32 { background: #f67c5f; color: #fff; }
    .v64 { background: #f65e3b; color: #fff; }
    .v128 { background: #edcf72; color: #fff; }
    .v256 { background: #edcc61; color: #fff; }
    .v512 { background: #edc850; color: #fff; }
    .v1024 { background: #edc53f; color: #fff; }
    .v2048 { background: #edc22e; color: #fff; }
    .v4096, .v8192, .v16384 { background: #3c3a32; color: #fff; }

    .mobile-pad {
      display: none;
      grid-template-columns: repeat(3, 60px);
      justify-content: center;
      gap: 8px;
      margin-top: 4px;
    }

    .mobile-pad button {
      width: 60px;
      height: 60px;
      border-radius: 18px;
      padding: 0;
      background: rgba(255,255,255,.14);
      color: #fff;
      border: 1px solid rgba(255,255,255,.18);
      font-size: 22px;
    }

    .mobile-pad .empty { visibility: hidden; }

    .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(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: 44px; }
      .stats { grid-template-columns: 1fr; }
      .board { padding: 10px; gap: 10px; border-radius: 20px; }
      .empty-cell, .tile { border-radius: 12px; }
      .mobile-pad { display: grid; }

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

    }