:root {
  --void: #04050a;
  --surface: #0b0e17;
  --surface-raised: #111625;
  --border: rgba(198, 216, 255, 0.14);
  --border-strong: rgba(198, 216, 255, 0.28);
  --ink: #f2efe9;
  --muted: #9aa3ba;
  --starlight: #c6d8ff;
  --accent-nulight: #66d9ff;
  --accent-frostline: #ff66b2;
  --accent-pirates: #e8b84b;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

#sky-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1240px, 100% - 48px);
  margin: 0 auto;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(4, 5, 10, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  width: min(1240px, 100% - 48px);
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  mix-blend-mode: screen;
}

.brand-word {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.nav a {
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--starlight);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  color: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  border-color: var(--starlight);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: #05070d;
  border-color: var(--ink);
}

.btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}

/* Home Hero */
.hero {
  padding: 64px 0 56px;
}

.hero-lead {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 44px;
  align-items: center;
}

.hero-title {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 28px;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.frame-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 16 / 9;
}

.frame-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Catalog Section */
.section {
  padding: 36px 0 80px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-head h2 {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.game-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.game-cover {
  position: relative;
  aspect-ratio: 630 / 500;
  background: #060810;
  overflow: hidden;
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(4, 5, 10, 0.88);
  border: 1px solid rgba(255, 102, 178, 0.55);
  color: #ffd3ea;
}

.game-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-genre {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--starlight);
  margin-bottom: 6px;
}

.game-card[data-game='nulight'] .game-genre { color: var(--accent-nulight); }
.game-card[data-game='frostline'] .game-genre { color: var(--accent-frostline); }
.game-card[data-game='pirates-glory'] .game-genre { color: var(--accent-pirates); }

.game-body h3 {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.game-body p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.94rem;
  flex: 1;
}

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

.card-actions .btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.88rem;
}

/* Subpage Player */
.subhero {
  padding: 36px 0 28px;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.crumb:hover {
  color: var(--ink);
}

.subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.subhead h1 {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.08;
}

.subhead p {
  margin: 0;
  color: var(--muted);
  max-width: 64ch;
}

.stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  max-height: 78vh;
  background: #020307;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.stage-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.stage-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  background: radial-gradient(circle at center, rgba(11, 14, 23, 0.84), rgba(4, 5, 10, 0.96));
  z-index: 5;
}

.stage-overlay h2 {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.75rem;
  margin: 0 0 10px;
}

.stage-overlay p {
  max-width: 48ch;
  color: var(--muted);
  margin: 0 0 22px;
}

.stage-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.details-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  padding: 34px 0 40px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.panel h2 {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 14px;
}

.panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.panel li + li {
  margin-top: 8px;
}

.shots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-bottom: 64px;
}

.shots-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  width: min(1240px, 100% - 48px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 960px) {
  .hero-lead {
    grid-template-columns: 1fr;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
  .details-grid,
  .shots-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.84rem;
  }
  .nav a {
    white-space: nowrap;
  }
  .brand-word {
    font-size: 1.1rem;
  }
}
