:root {
  color-scheme: dark;
}

body[data-game-key="tic-tac-toe"] {
  background:
    radial-gradient(circle at 16% 14%, rgba(244, 239, 221, 0.08), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(160, 214, 202, 0.08), transparent 24%),
    linear-gradient(180deg, #0b100d 0%, #111813 42%, #18211a 100%);
}

body[data-game-key="tic-tac-toe"] .game-template-panel {
  background:
    linear-gradient(180deg, rgba(12, 16, 14, 0.9), rgba(9, 13, 11, 0.86)),
    radial-gradient(circle at top left, rgba(244, 239, 221, 0.05), transparent 30%);
}

body[data-game-key="tic-tac-toe"] .game-template-panel::before {
  background:
    radial-gradient(circle at top left, rgba(244, 239, 221, 0.05), transparent 24%),
    radial-gradient(circle at bottom right, rgba(160, 214, 202, 0.05), transparent 26%);
}

body[data-game-key="tic-tac-toe"] .game-template-nav,
body[data-game-key="tic-tac-toe"] .game-template-hero,
body[data-game-key="tic-tac-toe"] .game-template-support,
body[data-game-key="tic-tac-toe"] .seo-copy__section {
  border-color: rgba(244, 239, 221, 0.12);
}

body[data-game-key="tic-tac-toe"] .tic-shell-stage {
  min-height: clamp(560px, 78dvh, 920px);
}

body[data-game-key="tic-tac-toe"] .tic-shell-stage.is-stage-primed {
  box-shadow:
    0 0 0 1px rgba(244, 239, 221, 0.16),
    0 0 0 6px rgba(244, 239, 221, 0.04),
    0 0 40px rgba(244, 239, 221, 0.08);
}

body[data-game-key="tic-tac-toe"] .tic-shell-stage__actions {
  top: 16px;
  right: 16px;
  z-index: 18;
}

body[data-game-key="tic-tac-toe"] .tic-shell-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

body[data-game-key="tic-tac-toe"] .tic-shell-hero__pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 221, 0.18);
  background:
    linear-gradient(180deg, rgba(24, 30, 27, 0.86), rgba(15, 21, 18, 0.76)),
    radial-gradient(circle at top, rgba(160, 214, 202, 0.08), transparent 68%);
  color: rgba(244, 239, 221, 0.88);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body[data-game-key="tic-tac-toe"] .tic-shell-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

body[data-game-key="tic-tac-toe"] .tic-shell-hero__button {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 221, 0.18);
  background: rgba(14, 18, 16, 0.72);
  color: rgba(244, 239, 221, 0.94);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

body[data-game-key="tic-tac-toe"] .tic-shell-hero__button--primary {
  background: linear-gradient(180deg, rgba(244, 239, 221, 0.14), rgba(244, 239, 221, 0.05));
}

body[data-game-key="tic-tac-toe"] .tic-shell-hero__button--secondary {
  background: rgba(14, 18, 16, 0.58);
}

body[data-game-key="tic-tac-toe"] .tic-shell-canvas {
  display: block;
  height: 100%;
  min-height: 100%;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 10%, rgba(244, 239, 221, 0.06), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(0, 0, 0, 0.08)),
    #080c0a;
}

body[data-game-key="tic-tac-toe"] .tic-runtime-frame {
  width: 100%;
  height: min(100%, 700px);
  min-height: 560px;
  border: 0;
  border-radius: 24px;
  display: block;
  background: #000;
}

@media (max-width: 640px) {
  body[data-game-key="tic-tac-toe"] .tic-shell-canvas {
    padding: 10px;
  }

  body[data-game-key="tic-tac-toe"] .tic-runtime-frame {
    min-height: 72dvh;
    border-radius: 18px;
  }

  body[data-game-key="tic-tac-toe"] .tic-shell-hero__actions {
    display: none;
  }
}
