@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Fredoka:wght@400;500;700&display=swap');

:root {
  --bg: #0a0a14;
  --bg-soft: #0f0f1e;
  --border: #1a1a2e;
  --accent: #f5a623;
  --orange: #ffaa00;
  --yellow: #ffdd44;
  --cyan: #44aaff;
  --green: #44ff88;
  --blue: #4488ff;
  --purple: #aa44cc;
  --red: #ff4444;
  --light: #cccccc;
  --dim: #555555;
  --ink: #d9e6ff;
  --card: #111126;
  --container: 1140px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Fredoka', sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #0a0a14 0%, #0f0f1e 50%, #0a0a14 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.sky-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(68, 170, 255, 0.06) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(0deg, rgba(245, 166, 35, 0.045) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, rgba(68, 170, 255, 0.08), rgba(245, 166, 35, 0.05));
}

.container {
  width: min(var(--container), 94vw);
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 10px;
}

.topbar-inner {
  background: var(--bg-soft);
  border: 3px solid var(--border);
  border-radius: 0;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.38);
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  gap: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 28px;
  height: 28px;
  display: block;
  flex: 0 0 auto;
}

.logo-dot {
  width: 18px;
  height: 18px;
  border-radius: 0;
  border: 3px solid var(--border);
  background: var(--accent);
}

.logo-text {
  font-family: 'Bangers', system-ui;
  letter-spacing: 1px;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  color: var(--accent);
  text-shadow: 1px 1px 0 #000;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu a {
  text-decoration: none;
  color: var(--light);
  font-weight: 700;
  background: #141428;
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 8px 12px;
}

.menu a:hover {
  background: #1b1b34;
  border-color: var(--cyan);
  color: #ffffff;
}

.lang-switch {
  display: inline-flex;
  border: 2px solid var(--border);
  background: #141428;
}

.lang-btn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--light);
  font: inherit;
  font-weight: 700;
  padding: 8px 10px;
  min-width: 42px;
  cursor: pointer;
}

.lang-btn + .lang-btn {
  border-left: 2px solid var(--border);
}

.lang-btn:hover {
  background: #1b1b34;
}

.lang-btn.active {
  background: var(--accent);
  color: #1e1608;
}

.hero {
  padding: 20px 0 10px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.3fr 0.9fr;
}

.card {
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: 0;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.34);
}

.hero-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  right: -56px;
  bottom: -58px;
  width: 190px;
  height: 190px;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(245,166,35,0.45), rgba(68,170,255,0.28));
}

.hero-logo {
  width: 92px;
  height: 92px;
  position: absolute;
  right: 14px;
  top: 14px;
  opacity: 0.86;
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--cyan);
}

h1, h2, h3 {
  margin: 0 0 12px;
  line-height: 1.18;
}

h1 { font-size: clamp(1.65rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.1vw, 1.85rem); }
h3 { font-size: clamp(1.08rem, 1.7vw, 1.35rem); margin-top: 24px; }

p { margin: 0 0 12px; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  border: 2px solid var(--border);
  border-radius: 0;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .1s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #1e1608;
  background: var(--accent);
}

.btn-ghost {
  color: var(--light);
  background: #141428;
}

.hero-stats {
  padding: 22px;
  background: linear-gradient(165deg, #111126 0%, #171736 100%);
}

.hero-stats ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.55;
}

.section-gap { margin-top: 18px; }

.play-card {
  padding: 18px;
}

.play-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.play-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.note {
  font-size: 0.94rem;
  color: var(--cyan);
}

.game-shell {
  border: 3px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  background: #020208;
  position: relative;
}

.game-frame {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 520px;
  border: 0;
}

.quick-commands {
  margin-top: 14px;
  border: 2px solid var(--border);
  background: #0f0f1e;
  border-radius: 0;
  padding: 12px;
}

.quick-commands h3 {
  margin: 0 0 10px;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--accent);
}

.command-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 2px solid var(--border);
  background: #111126;
  padding: 8px 10px;
  font-weight: 600;
  color: var(--light);
}

.command-item kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 2px solid var(--border);
  background: #191936;
  color: var(--yellow);
  padding: 3px 7px;
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.82rem;
}

.text-card {
  padding: 22px;
}

ol, ul {
  margin: 0 0 12px;
  padding-left: 20px;
  line-height: 1.6;
}

pre {
  margin: 0;
  padding: 14px;
  background: #0f0f1e;
  color: #f4f8ff;
  border-radius: 0;
  overflow: auto;
  border: 2px solid var(--border);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

.footer {
  padding: 28px 0 36px;
  color: var(--light);
  font-weight: 600;
  text-align: center;
}

.with-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-logo {
  width: 28px;
  height: 28px;
  display: block;
  flex: 0 0 auto;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
}

.game-shell:fullscreen,
.game-shell:-webkit-full-screen {
  border-radius: 0;
  border-width: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  height: var(--game-fs-vh, 100dvh);
}

.game-shell:fullscreen .game-frame,
.game-shell:-webkit-full-screen .game-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.game-shell.is-fs {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  height: var(--game-fs-vh, 100dvh);
  border-width: 0;
  z-index: 2147483647;
}

.game-shell.is-fs .game-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .game-frame {
    min-height: 440px;
    height: 62vh;
  }
}

@media (max-width: 640px) {
.topbar-inner {
    border-radius: 0;
    padding: 10px;
  }
  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .menu a {
    padding: 7px 10px;
    font-size: 0.9rem;
  }
  .lang-btn {
    padding: 7px 9px;
    font-size: 0.9rem;
  }
  .hero-card,
  .hero-stats,
  .play-card,
  .text-card {
    padding: 14px;
  }
  .play-actions {
    width: 100%;
  }
  .play-actions .btn {
    flex: 1 1 100%;
  }
  .command-grid {
    grid-template-columns: 1fr;
  }
  .game-frame {
    height: 56vh;
    min-height: 340px;
  }
}
