:root {
  /* Paleta: verde olivo como color principal */
  --olive-950: #232c17;
  --olive-900: #2e3a1e;
  --olive-800: #3b4a27;
  --olive-700: #4a5c31;
  --olive-600: #617540;
  --olive-500: #7b9052;
  --olive-300: #aebd84;
  --olive-200: #d8e0bd;
  --cream: #f7f5e8;
  --nectar: #e9bd5f;

  --surface: rgba(35, 44, 23, 0.58);
  --border: rgba(216, 224, 189, 0.2);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--olive-900);
  color: var(--cream);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}

#game-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% 8%, rgba(123, 144, 82, 0.22), transparent 70%),
    radial-gradient(45rem 35rem at 88% 92%, rgba(35, 44, 23, 0.5), transparent 75%);
}

.topbar,
.stage,
.footer {
  position: relative;
  z-index: 2;
}

.topbar {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--olive-200);
}

.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--olive-300);
}

.brand-name {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.scoreboard {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.score-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive-200);
}

.score-icon {
  width: 1rem;
  height: 1rem;
  color: var(--nectar);
}

.score-value {
  min-width: 1.5ch;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--nectar);
}

.stage {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--space-12) var(--space-6);
  text-align: center;
}

.hero {
  max-width: 44rem;
}

.eyebrow {
  margin: 0 0 var(--space-6);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive-300);
}

h1 {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--cream);
}

.lede {
  max-width: 32rem;
  margin: var(--space-6) auto 0;
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  line-height: 1.65;
  color: var(--olive-200);
  text-wrap: balance;
}

.lede strong {
  font-weight: 650;
  color: var(--cream);
}

.hint {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  margin: var(--space-12) 0 0;
  padding: var(--space-2) var(--space-4);
  border: 1px dashed rgba(216, 224, 189, 0.32);
  border-radius: 999px;
  background: rgba(35, 44, 23, 0.35);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--olive-200);
}

.hint svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  color: var(--olive-300);
}

.footer {
  position: absolute;
  inset: auto 0 0;
  padding: var(--space-6) var(--space-8);
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(216, 224, 189, 0.7);
}

@media (max-width: 640px) {
  .topbar {
    padding: var(--space-4);
  }

  .score-label {
    display: none;
  }

  .stage {
    padding: var(--space-12) var(--space-4);
  }

  .hint {
    border-radius: 1rem;
  }

  .footer {
    padding: var(--space-4);
  }
}

@media (max-height: 560px) {
  .eyebrow,
  .footer {
    display: none;
  }

  .hint {
    margin-top: var(--space-6);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
