:root {
  color-scheme: light;
  --ink: #1b1b1f;
  --muted: #6b6b75;
  --accent: #2f8f5b;
  --accent-2: #f79e52;
  --bg: #f4f1ea;
  --panel: #ffffff;
  --shadow: 0 20px 60px rgba(18, 21, 35, 0.15);
  --stroke: rgba(27, 27, 31, 0.12);
  --font-title: "DM Serif Display", "Playfair Display", "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at top left, #fff8e1 0%, #f4f1ea 45%, #e4efe6 100%);
  color: var(--ink);
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

h1 {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 48px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--stroke);
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-width: 90px;
}

.stat .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.stat .value {
  display: block;
  font-size: 20px;
  font-weight: 600;
  margin-top: 6px;
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(240px, 0.9fr);
  gap: 28px;
  align-items: start;
}

canvas {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: linear-gradient(145deg, #1d2b20 0%, #2b3f31 45%, #2a3530 100%);
  box-shadow: 0 24px 70px rgba(14, 32, 20, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel {
  background: var(--panel);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-section h2 {
  font-family: var(--font-title);
  font-size: 20px;
  margin-bottom: 12px;
}

.panel-section ul {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.panel-section ul li {
  padding-left: 18px;
  position: relative;
}

.panel-section ul li::before {
  content: "■";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 10px;
  top: 4px;
}

.controls {
  display: flex;
  gap: 10px;
}

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 20px rgba(47, 143, 91, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

.difficulty {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  border-radius: 999px;
  border: 1px solid var(--stroke);
  padding: 8px 14px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}

.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.footer {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .game-shell {
    grid-template-columns: 1fr;
  }

  canvas {
    max-width: 100%;
  }

  .stats {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }
}
