:root {
  --bg: #0a0a0a;
  --fg: #e0e0e0;
  --muted: #666;
  --accent: #4ecdc4;
  --accent2: #ff6b6b;
  --card-bg: #151515;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--fg);
  font-family: monospace;
  min-height: 100vh;
  isolation: isolate; /* Creates stacking context so ants canvas at z-index:-1 stays visible */
}

body {
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  text-align: center;
  padding: 40px 20px 30px;
  border-bottom: 1px dotted #333;
}

header h1 {
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 4px;
  margin: 0;
}

header h1 a {
  color: var(--fg);
}

header .tagline {
  font-size: 10px;
  color: var(--muted);
  margin: 8px 0 0;
  letter-spacing: 2px;
}

/* Games Container */
.games-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 60px 20px;
}

.tracker-row {
  display: flex;
  justify-content: center;
}

.games-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px 50px;
  flex-wrap: wrap;
  max-width: 480px;
}

/* Mobile: vertical scrollable list */
@media (max-width: 480px) {
  .games-row {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 100%;
  }
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s;
  width: 70px;
  min-height: 70px;
}

a.game-card:hover {
  transform: scale(1.05);
  text-decoration: none;
}

.game-card h2 {
  font-size: 7px;
  font-weight: normal;
  color: var(--muted);
  letter-spacing: 1px;
  margin: 0;
  text-align: center;
}

.game-card .hint {
  font-size: 6px;
  color: #444;
  margin: 0;
  text-align: center;
}

.ant-game {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ant-game canvas {
  border: 1px solid #333;
}

/* Win tracker / Scoreboard */
.tracker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tracker-card h2 {
  font-size: 6px !important;
  margin-bottom: 6px;
}

.tracker-card #win-tracker canvas {
  border: 1px solid #333;
}

/* Single game page */
.game-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 24px;
}


.game-description {
  max-width: 300px;
  text-align: center;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
}

.win-condition {
  margin-top: 12px;
  color: var(--accent);
  font-size: 8px;
}

.game-nav {
  display: flex;
  gap: 20px;
  font-size: 8px;
}

.game-nav a {
  color: var(--muted);
}

.game-nav a:hover {
  color: var(--accent);
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px dotted #333;
  font-size: 10px;
}

footer > a {
  display: block;
  margin-bottom: 12px;
}

.legal-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.legal-links a {
  color: var(--muted);
  font-size: 8px;
}

/* Legal pages */
.legal {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
  font-size: 12px;
  line-height: 1.6;
}

.legal h1 {
  font-size: 14px;
  margin-bottom: 20px;
}

.legal p {
  margin-bottom: 12px;
}

/* FAQ page */
.faq-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  gap: 20px;
}

.faq-list {
  max-width: 300px;
}

.faq-item {
  margin-bottom: 12px;
}

.faq-item h3 {
  font-size: 7px;
  font-weight: normal;
  color: var(--accent);
  margin: 0 0 2px;
  letter-spacing: 1px;
}

.faq-item p {
  font-size: 6px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}
