:root {
  --bg: #090b18;
  --panel: rgba(15, 20, 45, 0.78);
  --panel-strong: rgba(20, 27, 61, 0.94);
  --text: #eef5ff;
  --muted: #9da9ca;
  --cyan: #38f8ff;
  --pink: #ff4fd8;
  --orange: #ffb84d;
  --danger: #ff3f6e;
  --line: rgba(255, 255, 255, 0.14);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(56, 248, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 14%, rgba(255, 79, 216, 0.18), transparent 24rem),
    linear-gradient(160deg, #070813 0%, #111633 55%, #070813 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(9, 11, 24, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.logo,
.nav-links,
.hero-actions {
  display: flex;
  align-items: center;
}

.logo {
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #08111b;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  border-radius: 14px;
  box-shadow: 0 0 28px rgba(56, 248, 255, 0.38);
}

.nav-links {
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 14px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  min-height: 680px;
  padding: 72px clamp(18px, 5vw, 72px) 56px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 800px;
  margin-bottom: 24px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 58px);
}

.hero-text {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  color: var(--text);
  font-weight: 800;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #07111a;
  background: linear-gradient(135deg, var(--cyan), #9cff6d);
  box-shadow: 0 0 30px rgba(56, 248, 255, 0.28);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.btn.full {
  width: 100%;
}

.hero-card {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(56, 248, 255, 0.08), rgba(255, 79, 216, 0.08));
  border: 1px solid var(--line);
  border-radius: 42px;
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.04), 0 24px 90px rgba(0, 0, 0, 0.34);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(56, 248, 255, 0.34);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.orbit.one {
  inset: 70px;
}

.orbit.two {
  inset: 126px 54px 88px 128px;
  border-color: rgba(255, 79, 216, 0.34);
  animation-duration: 11s;
  animation-direction: reverse;
}

.ship-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 26px solid transparent;
  border-bottom: 26px solid transparent;
  border-left: 78px solid var(--cyan);
  filter: drop-shadow(0 0 28px rgba(56, 248, 255, 0.8));
  transform: translate(-50%, -50%) rotate(-8deg);
}

.spark {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 22px var(--pink);
}

.spark-a {
  top: 90px;
  right: 96px;
}

.spark-b {
  bottom: 100px;
  left: 88px;
  background: var(--orange);
}

.spark-c {
  right: 150px;
  bottom: 58px;
  background: var(--cyan);
}

.game-section,
.rules-grid {
  padding: 48px clamp(18px, 5vw, 72px);
}

.section-heading {
  margin-bottom: 26px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: stretch;
}

.game-panel {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  min-height: 320px;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 8, 18, 0.55);
  backdrop-filter: blur(6px);
}

.overlay.hidden {
  display: none;
}

.overlay-card,
.stats-card,
.rules-grid article {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
}

.overlay-card {
  max-width: 380px;
  padding: 30px;
  text-align: center;
  border-radius: 28px;
}

.overlay-card h3 {
  margin-bottom: 10px;
  font-size: 34px;
}

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

.stats-card {
  padding: 24px;
  border-radius: 30px;
}

.stats-card h3 {
  margin-bottom: 18px;
  font-size: 24px;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  color: var(--cyan);
  font-size: 26px;
  font-weight: 900;
}

.hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.rules-grid article {
  min-height: 220px;
  padding: 28px;
  border-radius: 28px;
}

.rules-grid span {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.rules-grid h3 {
  font-size: 26px;
}

.rules-grid p,
.site-footer {
  color: var(--muted);
}

.site-footer {
  padding: 30px clamp(18px, 5vw, 72px) 48px;
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .hero,
  .game-layout,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-card {
    min-height: 320px;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 42px;
  }

  .game-section,
  .rules-grid,
  .hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .overlay-card {
    padding: 22px;
  }
}
