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

:root {
  --bg-deep: #0a0f0a;
  --bg-dark: #0f1a0f;
  --bg-mid: #1a2e1a;
  --green-muted: #2d5a27;
  --green-light: #4a7c42;
  --amber: #d4a754;
  --amber-dim: #a07830;
  --text: #d0d0c0;
  --text-dim: #707060;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(ellipse at 50% 80%, var(--bg-mid) 0%, var(--bg-deep) 70%);
}

.hero-content {
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--amber-dim);
  margin: 1.5rem auto 0;
}

.scroll-hint {
  position: absolute;
  bottom: 3rem;
  animation: pulse 2s ease-in-out infinite;
}

.scroll-hint .arrow {
  font-size: 1.2rem;
  color: var(--text-dim);
  letter-spacing: 0.3em;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}

.contact {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email {
  color: var(--text-dim);
  text-decoration: none;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.email:hover {
  color: var(--amber);
  border-bottom-color: var(--amber-dim);
}

.game-section {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}

.game-prompt {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}

.game-prompt:hover {
  color: var(--green-light);
}

.game-container {
  position: relative;
  margin-top: 1.5rem;
  border: 1px solid var(--bg-mid);
  width: 90vw;
  max-width: 600px;
}

.game-container.hidden {
  display: none;
}

#gameCanvas {
  display: block;
  width: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: var(--bg-deep);
}

.game-ui {
  position: absolute;
  top: 8px;
  right: 10px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 12px;
}

#restartBtn {
  background: none;
  border: 1px solid var(--amber-dim);
  color: var(--amber);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 8px;
  transition: border-color 0.2s;
}

#restartBtn:hover {
  border-color: var(--amber);
}

#restartBtn.hidden {
  display: none;
}

.controls {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.1em;
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
