:root {
  --hulk-green-900: #10280f;
  --hulk-green-700: #226223;
  --hulk-green-500: #45b53f;
  --hulk-green-300: #9cff7a;
  --hulk-purple-900: #221036;
  --hulk-purple-700: #5c2f84;
  --hulk-purple-500: #8a54c7;
  --ink-900: #0c0c10;
  --ink-700: #24242d;
  --paper: #f1f7d9;
  --panel: #11151d;
  --panel-2: #191f2b;
  --line: rgba(255, 255, 255, 0.15);
  --warning: #ffd84d;
  --danger: #ff576a;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --font-head: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --font-body: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: #ecf2db;
  background:
    radial-gradient(circle at 15% 10%, rgba(153, 255, 107, 0.14), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(174, 96, 255, 0.16), transparent 38%),
    linear-gradient(160deg, #090b10, #0f1514 45%, #0a0d13);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    radial-gradient(circle, #fff 1px, transparent 1px),
    radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 12px 12px, 18px 18px;
  background-position: 0 0, 6px 6px;
}

a {
  color: inherit;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(67, 181, 63, 0.18), rgba(92, 47, 132, 0.2));
  border: 2px solid rgba(156, 255, 122, 0.25);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0.75rem;
  backdrop-filter: blur(8px);
  z-index: 20;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}

.brand__title {
  font-family: var(--font-head);
  font-size: 1.9rem;
  letter-spacing: 0.08em;
  color: var(--hulk-green-300);
  text-shadow: 2px 2px 0 #000;
}

.brand__sub {
  font-size: 0.75rem;
  color: #d6c6ef;
  letter-spacing: 0.08em;
}

.nav-toggle {
  display: none;
  background: var(--panel);
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 21, 29, 0.9);
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-weight: 700;
}

.site-nav a[aria-current="page"] {
  background: linear-gradient(180deg, var(--hulk-green-500), var(--hulk-green-700));
  color: #041104;
  border-color: rgba(156, 255, 122, 0.6);
}

.page-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-panel,
.panel {
  background:
    linear-gradient(145deg, rgba(69, 181, 63, 0.12), rgba(138, 84, 199, 0.1)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel {
  padding: 1.1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.2fr 0.8fr;
}

.hero-panel h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  color: #d7ffc5;
  text-shadow: 3px 3px 0 #000;
}

.hero-panel p {
  margin: 0.4rem 0 0;
  color: #e5efcf;
  max-width: 52ch;
}

.hero-callouts {
  display: grid;
  gap: 0.75rem;
}

.hero-callout {
  background: rgba(7, 10, 15, 0.82);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
}

.hero-callout strong {
  display: block;
  font-family: var(--font-head);
  letter-spacing: 0.06em;
  color: #f4e3ff;
  margin-bottom: 0.35rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  padding: 0.7rem 0.95rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn--green {
  background: linear-gradient(180deg, #8fff5f, #3ea73a);
  color: #071307;
  box-shadow: 0 8px 18px rgba(78, 209, 70, 0.28);
}

.btn--purple {
  background: linear-gradient(180deg, #c38aff, #6d3ca5);
  color: #100718;
  box-shadow: 0 8px 18px rgba(162, 94, 238, 0.28);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #f3f3f7;
  border-color: rgba(255, 255, 255, 0.18);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1rem;
}

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

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

.panel__body {
  padding: 1rem;
}

.panel__title {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: 0.05em;
  font-size: 1.45rem;
  color: #d0ffbc;
  text-shadow: 2px 2px 0 #000;
}

.panel__subtitle {
  margin: 0.4rem 0 0;
  color: #d7e7cb;
}

.list {
  margin: 0.7rem 0 0;
  padding-left: 1rem;
}

.list li + li {
  margin-top: 0.35rem;
}

.comic-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  margin: 0.2rem 0.25rem 0 0;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.stat-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.7rem;
}

.stat-card__value {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: #fff59c;
}

.stat-card__label {
  font-size: 0.78rem;
  color: #d0d6df;
}

.smash-meter {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.smash-meter__bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.smash-meter__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 84%;
  background: linear-gradient(90deg, #8fff5f, #5ce74f, #f8ff55);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 1rem;
}

.game-shell {
  padding: 1rem;
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.game-head h1 {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: 0.05em;
  line-height: 0.95;
  color: #d7ffc5;
  text-shadow: 2px 2px 0 #000;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.hud__item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.6rem;
}

.hud__label {
  display: block;
  color: #ccd3de;
  font-size: 0.75rem;
}

.hud__value {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: #fff8aa;
}

.game-canvas-wrap {
  position: relative;
  border-radius: 14px;
  border: 2px solid rgba(156, 255, 122, 0.25);
  background: linear-gradient(180deg, #10213c 0%, #18345f 38%, #5c321e 38%, #2a180f 100%);
  padding: 0.5rem;
}

canvas#flyoff-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: linear-gradient(180deg, #132243 0%, #1f4f8f 38%, #5d371f 38%, #2f1e14 100%);
  border-radius: 10px;
}

.game-overlay {
  position: absolute;
  inset: 0.5rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(7, 11, 16, 0.65);
  padding: 1rem;
  text-align: center;
}

.game-overlay[hidden] {
  display: none;
}

.game-overlay__panel {
  width: min(420px, 100%);
  background: rgba(10, 14, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 1rem;
}

.game-overlay h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-head);
  letter-spacing: 0.05em;
}

.field {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  margin: 0.8rem 0;
}

.field label {
  font-size: 0.8rem;
  color: #d1dce8;
}

.field input {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #f5f8ff;
  padding: 0.65rem 0.7rem;
  font: inherit;
}

.field__hint {
  font-size: 0.75rem;
  color: #cfd6ca;
  min-height: 1em;
}

.field__hint.is-error {
  color: #ffadb6;
}

.touch-pad {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 0.75rem;
  user-select: none;
}

.touch-pad .btn {
  min-height: 46px;
  padding: 0.65rem;
}

.touch-pad .spacer {
  visibility: hidden;
}

.side-stack {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.leaderboard-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.leaderboard-tabs button {
  background: rgba(255, 255, 255, 0.05);
  color: #ebedf2;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.leaderboard-tabs button[aria-pressed="true"] {
  background: linear-gradient(180deg, #b584ff, #6b3ea1);
  color: #12071b;
  border-color: rgba(255, 255, 255, 0.25);
}

.leaderboard-status {
  color: #cfd7e2;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.leaderboard-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-row__rank {
  font-family: var(--font-head);
  color: #fff7a4;
  font-size: 1.1rem;
}

.leaderboard-row__name {
  font-weight: 700;
}

.leaderboard-row__meta {
  font-size: 0.75rem;
  color: #c6d1dd;
}

.leaderboard-row__score {
  text-align: right;
  font-weight: 800;
}

.leaderboard-row--empty {
  grid-template-columns: 1fr;
  text-align: center;
  color: #d3dae4;
}

.site-footer {
  margin-top: 1.25rem;
  text-align: center;
  color: #b5bfcc;
  font-size: 0.85rem;
}

.site-footer a {
  color: #d2ffb9;
}

.hidden {
  display: none !important;
}

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

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

  .game-layout {
    grid-template-columns: 1fr;
  }
}

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

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

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

  .touch-pad {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

