:root {
  --bg: #09111f;
  --panel: rgba(10, 18, 33, 0.72);
  --panel-strong: rgba(12, 22, 39, 0.9);
  --line: rgba(145, 188, 255, 0.18);
  --text: #f5f7fb;
  --muted: #98a8c7;
  --lime: #d7ff63;
  --cyan: #61e5ff;
  --rose: #ff7ab6;
  --orange: #ff9e57;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(97, 229, 255, 0.18), transparent 26%),
    radial-gradient(circle at 85% 15%, rgba(255, 122, 182, 0.16), transparent 22%),
    linear-gradient(145deg, #050a14, #0e1830 48%, #08111d);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.65), transparent);
  pointer-events: none;
}

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

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 28px 0 60px;
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(8, 14, 27, 0.55);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  color: #04111f;
  font-weight: 700;
}

.brand strong,
.hero-copy h1,
.section-heading h2 {
  font-family: "Black Ops One", system-ui;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.topnav a,
.cta,
.mini-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  transition: 180ms ease;
}

.topnav a:hover,
.cta:hover,
.mini-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.category-card,
.game-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 28px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 255, 99, 0.3), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
  font-size: 0.92rem;
}

.hero-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.96;
}

.hero-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta.primary {
  background: linear-gradient(135deg, var(--lime), #ffe17c);
  color: #10141e;
  font-weight: 700;
}

.hero-stats {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.stat strong {
  display: block;
  font-size: 1.45rem;
}

.hero-panel {
  padding: 22px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel-screen {
  min-height: 240px;
  border-radius: 24px;
  overflow: hidden;
  padding: 18px;
  position: relative;
  background:
    linear-gradient(150deg, rgba(11, 31, 55, 0.95), rgba(33, 8, 31, 0.88)),
    radial-gradient(circle at 20% 30%, rgba(97, 229, 255, 0.3), transparent 30%);
}

.panel-screen::before,
.panel-screen::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 50%;
  filter: blur(4px);
}

.panel-screen::before {
  width: 130px;
  height: 130px;
  top: 24px;
  right: 18px;
  background: radial-gradient(circle, rgba(97, 229, 255, 0.65), transparent 68%);
}

.panel-screen::after {
  width: 180px;
  height: 180px;
  left: -26px;
  bottom: -40px;
  background: radial-gradient(circle, rgba(255, 122, 182, 0.45), transparent 72%);
}

.scanner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  align-content: space-between;
}

.panel-title {
  margin: 14px 0 6px;
}

.panel-copy {
  margin: 0;
  color: #d8e1f7;
  max-width: 280px;
}

.scanner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.scanner-grid span {
  aspect-ratio: 1;
  border-radius: 16px;
  transform: rotate(45deg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(215, 255, 99, 0.9), rgba(97, 229, 255, 0.42));
  animation: pulse 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * 120ms);
}

@keyframes pulse {
  0%, 100% {
    transform: rotate(45deg) translateY(0);
    opacity: 0.45;
  }

  50% {
    transform: rotate(45deg) translateY(-10px);
    opacity: 1;
  }
}

main {
  padding-bottom: 70px;
}

section {
  margin-top: 38px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading p {
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
}

.category-grid,
.game-grid {
  display: grid;
  gap: 18px;
}

.category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-card {
  padding: 22px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
}

.tag {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
}

.category-card h3,
.game-card h3 {
  margin: 14px 0 8px;
  font-size: 1.45rem;
}

.category-card p,
.game-card p,
.hud span,
.controls {
  color: var(--muted);
  line-height: 1.6;
}

.category-card.puzzle {
  background: linear-gradient(135deg, rgba(17, 29, 44, 0.88), rgba(15, 46, 67, 0.82));
}

.category-card.shooter {
  background: linear-gradient(135deg, rgba(32, 14, 22, 0.92), rgba(63, 29, 17, 0.82));
}

.category-card.zombie {
  background: linear-gradient(135deg, rgba(18, 22, 17, 0.92), rgba(43, 55, 24, 0.82));
}

.game-grid {
  grid-template-columns: 0.94fr 1.06fr;
  align-items: start;
}

.game-card {
  padding: 22px;
}

.hud {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.hud strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.puzzle-board-wrap {
  position: relative;
  padding: 24px 16px 16px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(97, 229, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.puzzle-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 410px;
  margin: 0 auto;
}

.prism-tile {
  aspect-ratio: 1;
  border: none;
  cursor: pointer;
  transform: rotate(45deg);
  border-radius: 18px;
  position: relative;
  transition: transform 180ms ease, filter 180ms ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 18px 26px rgba(0, 0, 0, 0.2);
}

.prism-tile:hover {
  transform: rotate(45deg) scale(1.04);
  filter: brightness(1.08);
}

.prism-tile::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.02));
}

.tile-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotate(-45deg);
  font-size: 0.82rem;
  color: rgba(5, 10, 19, 0.75);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.puzzle-message,
.zombie-message {
  margin-top: 14px;
  min-height: 28px;
  font-size: 0.98rem;
  color: var(--cyan);
}

.puzzle-actions,
.zombie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.mini-btn {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

#zombieStage {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(7, 13, 11, 0.95), rgba(22, 27, 18, 0.95));
  position: relative;
}

#zombieStage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.stage-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(4, 6, 4, 0.32), transparent 35%),
    radial-gradient(circle at center, transparent 56%, rgba(0, 0, 0, 0.38) 100%);
}

.stage-corners {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: polygon(0 16px, 16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px));
}

.footer-note {
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: 22px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  animation: reveal 700ms ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 110ms;
}

.reveal:nth-child(3) {
  animation-delay: 220ms;
}

.reveal:nth-child(4) {
  animation-delay: 330ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 18px, 1220px);
  }

  .topbar,
  .hero-copy,
  .hero-panel,
  .category-card,
  .game-card {
    border-radius: 22px;
  }

  .hero-copy,
  .hero-panel,
  .game-card {
    padding: 18px;
  }

  .puzzle-board {
    gap: 12px;
  }

  .prism-tile {
    border-radius: 14px;
  }
}
