:root {
  --bg: #07060b;
  --bg-surface: #0e0c14;
  --bg-card: #13111b;
  --border: #1e1a2a;
  --text: #c8c4d4;
  --text-dim: #6e6880;
  --text-bright: #eae8f0;
  --accent: #8b5cf6;
  --accent-dim: #6d3fd9;
  --accent-glow: rgba(139, 92, 246, 0.15);
  --teal: #2dd4bf;
  --teal-dim: rgba(45, 212, 191, 0.1);
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Fira Code", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  color: var(--teal);
}

/* --- Layout --- */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 1.1rem;
  font-family: var(--font-mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}

/* --- Hero --- */

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, var(--teal-dim) 0%, transparent 50%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  line-height: 1.1;
  position: relative;
}

.hero-title .shimmer {
  background: linear-gradient(
    120deg,
    var(--text-bright) 0%,
    var(--accent) 25%,
    var(--teal) 50%,
    var(--accent) 75%,
    var(--text-bright) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-tagline {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  color: var(--text-dim);
  font-style: italic;
  position: relative;
}

.hero-nav {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.hero-nav a {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-dim);
  color: var(--bg);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text-bright);
}

/* --- Game Embed --- */

.game-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.game-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.game-wrapper .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.game-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.btn-fullscreen {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-fullscreen:hover {
  border-color: var(--accent);
  color: var(--text-bright);
}

/* --- Downloads --- */

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.download-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.download-card .platform {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}

.download-card .arch {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.download-card .dl-link {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  transition: all 0.2s;
}

.download-card .dl-link:hover {
  background: var(--accent);
  color: var(--bg);
}

.download-note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
}

/* --- Controls --- */

.controls-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.controls-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.controls-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.controls-table tr:last-child td {
  border-bottom: none;
}

.controls-table td:first-child {
  color: var(--text-bright);
  font-weight: 600;
  white-space: nowrap;
}

kbd {
  display: inline-block;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-bright);
  line-height: 1.5;
}

/* --- Footer --- */

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* --- Responsive --- */

@media (max-width: 600px) {
  section {
    padding: 2.5rem 0;
  }

  .hero {
    padding: 4rem 0 2.5rem;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .controls-table {
    font-size: 0.82rem;
  }

  .controls-table th,
  .controls-table td {
    padding: 0.5rem 0.6rem;
  }
}
