:root {
  --bg: #09111d;
  --surface: #101a2b;
  --surface-soft: #15213a;
  --line: rgba(125, 145, 180, 0.28);
  --text: #eaf2ff;
  --muted: #93a7c8;
  --accent: #8ef0a3;
  --accent-2: #65d88c;
  --danger: #ff7474;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(110, 239, 170, 0.12), transparent 25%),
    radial-gradient(circle at 90% 8%, rgba(112, 181, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #050910 0%, var(--bg) 100%);
}

button {
  font: inherit;
}

.shell {
  width: min(1100px, calc(100% - 20px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  box-shadow: var(--shadow);
}

.hero {
  padding: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

h1,
h2,
p,
ul {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.lede {
  max-width: 42rem;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  white-space: nowrap;
}

.game-card {
  margin-top: 16px;
  padding: 18px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.toolbar-group {
  display: grid;
  gap: 8px;
}

.toolbar-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-line {
  font-size: 1.04rem;
  font-weight: 700;
}

.support-line,
.info-panel li {
  color: var(--muted);
  line-height: 1.6;
}

.support-line {
  margin-top: 4px;
}

.primary-btn {
  border: 1px solid rgba(142, 240, 163, 0.28);
  border-radius: 14px;
  padding: 12px 16px;
  color: #04110a;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(74, 216, 124, 0.18);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.board-frame,
.info-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.board-frame {
  padding: 14px;
}

#gameCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(142, 240, 163, 0.05), transparent 28%),
    linear-gradient(180deg, #0a1220 0%, #07101b 100%);
  touch-action: none;
}

.info-panel {
  padding: 16px;
}

.info-panel h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.info-panel ul {
  margin: 0 0 14px 18px;
  padding: 0;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.pad-btn {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  min-height: 52px;
}

.pad-center {
  font-size: 1rem;
  color: var(--accent);
}

@media (max-width: 860px) {
  .hero-top {
    display: grid;
  }

  .hero-meta {
    justify-items: start;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

@media (max-width: 560px) {
  .shell {
    width: min(100% - 14px, 1100px);
    padding: 12px 0 24px;
  }

  .hero,
  .game-card {
    padding: 16px;
    border-radius: 20px;
  }

  .board-frame {
    padding: 12px;
  }

  .pad {
    gap: 8px;
  }

  .pad-btn {
    border-radius: 14px;
    min-height: 48px;
  }
}
