    :root {
      --bg-1: #0d0f1f;
      --bg-2: #192447;
      --board-blue: #1d4ed8;
      --board-blue-dark: #163ca3;
      --slot-dark: #0c1a4c;
      --slot-light: #0f2b7d;
      --yellow: #facc15;
      --yellow-shadow: #d4a900;
      --red: #ef4444;
      --red-shadow: #b91c1c;
      --panel: #0f172a;
      --text: #e2e8f0;
      --muted: #9ca3af;
      --ok: #22c55e;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      min-height: 100%;
      height: 100%;
      font-family: "Trebuchet MS", "Verdana", sans-serif;
      color: var(--text);
      background:
        radial-gradient(1200px 700px at 20% 15%, #2a3b7f33, transparent 70%),
        radial-gradient(900px 600px at 80% 85%, #1a7fd933, transparent 70%),
        linear-gradient(160deg, var(--bg-1), var(--bg-2));
    }

    .app {
      width: min(980px, 96vw);
      margin: 0 auto;
      min-height: 100dvh;
      height: 100dvh;
      padding: 14px 0 14px;
      display: grid;
      grid-template-rows: auto 1fr;
      gap: 16px;
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      padding: 14px 16px;
      border-radius: 12px;
      background: linear-gradient(160deg, #1e293bcc, #0b1220dd);
      box-shadow: 0 10px 30px #00000040;
    }

    .title {
      margin: 0;
      font-size: clamp(1.5rem, 2.8vw, 2rem);
      letter-spacing: 0.8px;
      color: #f8fafc;
      text-shadow: 0 2px 0 #00000044;
    }

    .status {
      font-size: 0.96rem;
      color: var(--muted);
    }

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

    .pill {
      border: 1px solid #334155;
      background: #0b1220;
      color: #dbeafe;
      border-radius: 10px;
      padding: 8px 10px;
      min-height: 40px;
      font-size: 0.95rem;
    }

    .pill:focus {
      outline: 2px solid #60a5fa;
      outline-offset: 1px;
    }

    button.pill {
      cursor: pointer;
      font-weight: 700;
      transition: transform 140ms ease, background 140ms ease;
    }

    button.pill:hover {
      transform: translateY(-1px);
      background: #101a31;
    }

    .game-wrap {
      width: 100%;
      display: grid;
      place-items: center;
      padding: 6px;
      min-height: 0;
    }

    .board-shell {
      width: min(760px, 95vw);
    }

    .col-buttons {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 6px;
      margin-bottom: 8px;
    }

    .col-btn {
      border: none;
      height: clamp(30px, 5.2vw, 40px);
      border-radius: 10px;
      background: linear-gradient(180deg, #f8fafc, #cbd5e1);
      color: #1e293b;
      font-size: clamp(0.8rem, 2vw, 0.95rem);
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 2px 0 #94a3b8;
      transition: transform 120ms ease, filter 120ms ease;
    }

    .col-btn:hover:not(:disabled) {
      transform: translateY(-1px);
      filter: brightness(1.03);
    }

    .col-btn:active:not(:disabled) {
      transform: translateY(1px);
    }

    .col-btn:disabled {
      opacity: 0.38;
      cursor: not-allowed;
    }

    .board {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: clamp(5px, 1.2vw, 10px);
      padding: clamp(10px, 1.8vw, 16px);
      border-radius: 14px;
      background: linear-gradient(180deg, var(--board-blue), var(--board-blue-dark));
      box-shadow:
        inset 0 -8px 12px #0000002d,
        inset 0 8px 12px #ffffff1f,
        0 20px 35px #00000055;
      border: 2px solid #2563eb;
    }

    .cell {
      position: relative;
      width: 100%;
      aspect-ratio: 1 / 1;
      border-radius: 50%;
      background:
        radial-gradient(circle at 30% 30%, var(--slot-light), var(--slot-dark) 65%);
      box-shadow:
        inset 0 8px 12px #00000040,
        inset 0 -5px 10px #ffffff14;
      overflow: hidden;
    }

    .disc {
      position: absolute;
      inset: 7%;
      border-radius: 50%;
      opacity: 0;
      transform: scale(0.82);
      transition: opacity 160ms ease, transform 160ms ease;
    }

    .disc.show {
      opacity: 1;
      transform: scale(1);
    }

    .disc.player {
      background: radial-gradient(circle at 32% 28%, #ffd4d4, var(--red) 55%, var(--red-shadow));
      box-shadow:
        inset 0 6px 10px #ffffff38,
        inset 0 -8px 10px #0000002f,
        0 0 0 2px #7f1d1d55;
    }

    .disc.ai {
      background: radial-gradient(circle at 32% 28%, #fffad8, var(--yellow) 56%, var(--yellow-shadow));
      box-shadow:
        inset 0 6px 10px #ffffff38,
        inset 0 -8px 10px #0000002f,
        0 0 0 2px #854d0e55;
    }

    .disc.win {
      animation: blink 650ms steps(2, start) infinite;
    }

    @keyframes blink {
      50% {
        filter: brightness(1.38);
      }
    }

    .overlay {
      position: fixed;
      inset: 0;
      background: #020617cc;
      display: grid;
      place-items: center;
      padding: 16px;
      z-index: 20;
    }

    .panel {
      width: min(500px, 100%);
      border-radius: 14px;
      background: linear-gradient(170deg, #0f172a, #111827);
      border: 1px solid #334155;
      box-shadow: 0 20px 40px #0000007a;
      padding: 18px;
      display: grid;
      gap: 12px;
    }

    .panel h2 {
      margin: 0;
      font-size: 1.45rem;
      color: #f8fafc;
    }

    .panel p {
      margin: 0;
      color: #cbd5e1;
      font-size: 0.95rem;
      line-height: 1.45;
    }

    label {
      font-size: 0.88rem;
      color: #94a3b8;
      margin-bottom: 4px;
      display: inline-block;
    }

    .field {
      display: grid;
      gap: 3px;
    }

    .field input,
    .field select {
      width: 100%;
      border: 1px solid #334155;
      background: #0b1220;
      color: #f8fafc;
      border-radius: 10px;
      padding: 10px 12px;
      min-height: 42px;
      font-size: 0.96rem;
    }

    .field input:focus,
    .field select:focus {
      outline: 2px solid #60a5fa;
      outline-offset: 1px;
    }

    .actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 4px;
    }

    .start {
      border: none;
      border-radius: 10px;
      min-height: 42px;
      padding: 0 14px;
      cursor: pointer;
      font-weight: 800;
      color: #052e16;
      background: linear-gradient(180deg, #86efac, #22c55e);
      box-shadow: 0 3px 0 #15803d;
    }

    .muted-note {
      color: #94a3b8;
      font-size: 0.82rem;
    }

    .hidden {
      display: none;
    }

    .version-tag {
      position: fixed;
      right: 10px;
      bottom: 8px;
      z-index: 5;
      padding: 6px 9px;
      border-radius: 8px;
      border: 1px solid #334155;
      background: #0b1220cc;
      color: #cbd5e1;
      font-size: 0.75rem;
      letter-spacing: 0.2px;
      backdrop-filter: blur(2px);
      box-shadow: 0 6px 14px #00000033;
    }

    @media (max-width: 700px) {
      .topbar {
        padding: 12px;
      }

      .status {
        width: 100%;
      }

      .controls {
        width: 100%;
      }

      .pill,
      button.pill {
        flex: 1;
      }
    }
