@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, sans-serif;
  --bg: #0b0f14;
  --card: #141b25;
  --text: #f5f7fb;
  --muted: #b7c0ce;
  --accent: #5dd17f;
  --accent-strong: #3ac165;
  --border: #273246;
}

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

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem clamp(1.5rem, 4vw, 4rem);
  background: radial-gradient(circle at top left, #1d2b3f, transparent 55%),
    radial-gradient(circle at 40% 20%, #203a2f, transparent 50%), var(--bg);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-weight: 600;
  color: var(--muted);
}

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

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-content {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1.1;
}

.hero p {
  color: var(--muted);
}

.cta {
  align-self: flex-start;
  background: var(--accent);
  color: #0b0f14;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  background: var(--accent-strong);
}

.section {
  padding: 4rem clamp(1.5rem, 4vw, 4rem);
}

.section-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section.intro {
  background: #0f141d;
}

.game-section {
  background: linear-gradient(180deg, #0f141d 0%, #0b0f14 100%);
}

.game-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.game-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}

.game-controls button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.game-controls button:hover {
  border-color: var(--accent);
  background: rgba(93, 209, 127, 0.1);
}

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.expand {
  background: rgba(93, 209, 127, 0.15);
  border: 1px solid rgba(93, 209, 127, 0.5);
  color: var(--text);
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  justify-self: start;
  transition: transform 0.2s ease, background 0.2s ease;
}

.expand:hover {
  transform: translateY(-1px);
  background: rgba(93, 209, 127, 0.25);
}

.game-stage {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  opacity: 0.6;
  filter: grayscale(0.3);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.game-stage.active {
  opacity: 1;
  filter: none;
  pointer-events: auto;
  transform: translateY(-2px);
}

.game-stage::after {
  content: "Click Play to activate";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  background: rgba(8, 12, 18, 0.4);
  opacity: 1;
  transition: opacity 0.25s ease;
}

.game-stage.active::after {
  opacity: 0;
}

canvas {
  width: 100%;
  border-radius: 1rem;
  background: #1f2a20;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hud {
  display: flex;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.placeholder {
  background: #0f141d;
}

.placeholder-card {
  height: 160px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border);
  border-radius: 1rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
}

.game-preview {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.preview-image {
  width: 100%;
  max-width: 400px;
  height: 250px;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #4a7c3a 0%, #2d5a22 100%);
  border: 1px solid var(--border);
}

.preview-image svg {
  width: 100%;
  height: 100%;
}

.cta-block {
  justify-self: start;
  display: inline-block;
}

.footer {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
  }

  .game-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .hud {
    flex-direction: column;
    gap: 0.5rem;
  }
}
