:root {
  color-scheme: dark;
  --bg: #0d1117;
  --bg-elevated: #141b23;
  --bg-panel: rgba(18, 24, 33, 0.84);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #a8b3c4;
  --accent: #ff904a;
  --accent-2: #ffd364;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 144, 74, 0.16), transparent 34%),
    linear-gradient(180deg, #0e141b 0%, var(--bg) 48%, #091017 100%);
  color: var(--text);
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
}

.nav a:hover,
.brand:hover {
  color: var(--text);
}

.landing,
.game-page {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 32px;
}

.hero {
  padding: 56px 0 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.game-sidebar h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.7rem, 8vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-copy,
.game-sidebar p,
.panel p,
.controls dd,
.feature-list {
  color: var(--muted);
}

.hero-copy {
  max-width: 58ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #ffb55c);
  color: #111;
  border-color: transparent;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel,
.game-stage {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel {
  padding: 24px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.panel-wide {
  grid-column: 1 / -1;
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.controls {
  display: grid;
  gap: 12px;
  margin: 0;
}

.controls dt {
  color: var(--text);
  font-weight: 600;
}

.controls dd {
  margin: 4px 0 0;
}

.site-shell-game {
  overflow: hidden;
}

.game-page {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 84px);
  padding-bottom: 20px;
}

.game-sidebar {
  align-self: start;
}

.game-sidebar h1 {
  max-width: none;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.game-stage {
  min-height: 0;
  overflow: hidden;
}

#bevy {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

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

  .hero {
    padding-top: 28px;
  }

  .game-page {
    min-height: auto;
  }

  .game-stage {
    min-height: 68vh;
  }
}
