/* ===== Base ===== */
:root {
  --bg: #0c0c18;
  --panel: #11111f;
  --panel-2: #181830;
  --gold: #ffd23a;
  --gold-2: #f0a020;
  --text: #e8e8f0;
  --muted: #9ea0bd;
  --accent: #4d7cff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #050510;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* ===== Space background ===== */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #050510;
}

.star {
  position: fixed;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.35;
  animation: starTwinkle ease-in-out infinite;
}

.star-blue {
  background: #a8c4ff;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.4); }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 12, 24, 0.85) 100%);
  overflow: hidden;
  padding: 60px 24px 120px;
}

.space-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.space-nebula {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 35%, rgba(77, 124, 255, 0.12), transparent 55%),
    radial-gradient(ellipse at 20% 70%, rgba(120, 60, 180, 0.08), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(12, 12, 24, 0.9), transparent 70%);
}

.space-rebecca {
  position: absolute;
  right: -4%;
  bottom: -8%;
  width: min(480px, 52vw);
  height: auto;
  opacity: 0.95;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -webkit-mask-image:
    linear-gradient(to left, #000 25%, rgba(0, 0, 0, 0.5) 55%, transparent 90%),
    linear-gradient(to top, transparent 5%, rgba(0, 0, 0, 0.85) 100%);
  mask-image:
    linear-gradient(to left, #000 25%, rgba(0, 0, 0, 0.5) 55%, transparent 90%),
    linear-gradient(to top, transparent 5%, rgba(0, 0, 0, 0.85) 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  filter: drop-shadow(0 0 48px rgba(77, 124, 255, 0.12));
}

.space-asteroid {
  position: fixed;
  height: auto;
  opacity: var(--opacity, 0.95);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: asteroidFly var(--dur, 28s) linear infinite;
  will-change: transform;
}

@keyframes asteroidFly {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}

@media (prefers-reduced-motion: reduce) {
  .space-asteroid { animation: none; }
}

.hero-inner { position: relative; z-index: 2; max-width: 800px; }

.title-img {
  max-width: 100%;
  width: min(720px, 90vw);
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.4));
}

.tagline {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(12px, 1.4vw, 16px);
  color: var(--gold);
  letter-spacing: 2px;
  margin: 20px 0 16px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}

.launch-date {
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1px;
  margin: 0 0 36px;
}

.hero-ship-deco {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: min(260px, 22vw);
  opacity: 0.70;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
  z-index: 1;
  animation: shipFloat 5s ease-in-out infinite;
}

@keyframes shipFloat {
  0%, 100% { transform: translateY(-50%) translateY(0px); }
  50%       { transform: translateY(-50%) translateY(-18px); }
}

.hero-spike {
  position: absolute;
  left: -40px;
  bottom: 40px;
  width: min(220px, 22vw);
  opacity: 0.85;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 1;
  animation: spikeBob 4s ease-in-out infinite;
}

@keyframes spikeBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(8deg); }
}

/* ===== Store badges ===== */
.store-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 24px;
  background: #000;
  border: 1px solid #2a2a45;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  transition: transform 0.15s ease, border-color 0.15s ease;
  min-width: 200px;
}

.badge:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  text-decoration: none;
}

.badge.coming-soon {
  opacity: 0.55;
  cursor: default;
  border-style: dashed;
}

.badge.coming-soon:hover {
  transform: none;
  border-color: #2a2a45;
}

/* ===== Tooltip ===== */
.has-tooltip { position: relative; }

.has-tooltip::before,
.has-tooltip::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.has-tooltip::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  background: var(--gold);
  color: #1a1a2e;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.has-tooltip::after {
  content: '';
  bottom: calc(100% + 4px);
  border: 6px solid transparent;
  border-top-color: var(--gold);
}

.has-tooltip:hover::before,
.has-tooltip:hover::after,
.has-tooltip:focus::before,
.has-tooltip:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.badge-prefix {
  font-size: 11px;
  color: #cccccc;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-name {
  font-size: 22px;
  font-weight: 700;
  margin-top: 2px;
}

.badge.steam {
  background: linear-gradient(135deg, #1b2838 0%, #171a21 100%);
  border-color: #2a475e;
}

.badge.steam .badge-name {
  letter-spacing: 0.5px;
}

/* ===== Trailer ===== */
.trailer {
  padding: 64px 0 48px;
  background: rgba(12, 12, 24, 0.92);
}

.trailer-placeholder,
.trailer-embed {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
}

.trailer-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  cursor: pointer;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(77, 124, 255, 0.12), transparent 70%),
    var(--panel);
  border: 1px dashed #2a2a45;
}

.trailer-placeholder--ready {
  background-size: cover;
  background-position: center;
  border-style: solid;
  border-color: #3a3a55;
}

.trailer-placeholder--poster .trailer-label {
  display: none;
}

.trailer-placeholder--poster .trailer-play {
  position: absolute;
  left: 38%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(8, 8, 18, 0.55);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.65);
}

.trailer-play {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 210, 58, 0.15);
  border: 2px solid var(--gold);
  position: relative;
  box-shadow: 0 0 24px rgba(255, 210, 58, 0.2);
}

.trailer-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--gold);
}

.trailer-label {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(10px, 1.2vw, 13px);
  color: var(--muted);
  letter-spacing: 1px;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.trailer-placeholder--ready .trailer-label {
  color: #f0e6c8;
}

.gameplay-video + .gameplay-video {
  margin-top: 40px;
}

.trailer-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #2a2a45;
  border-radius: 12px;
}

/* ===== Sections ===== */
section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

section h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--gold);
  margin: 0 0 32px;
  text-align: center;
}

.about p {
  font-size: 18px;
  color: var(--text);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about strong { color: var(--gold-2); font-weight: 600; }

/* ===== Features ===== */
.features { background: rgba(17, 17, 31, 0.94); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}

.feature {
  background: var(--panel-2);
  border: 1px solid #2a2a45;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.feature-icon { font-size: 36px; margin-bottom: 12px; }

.feature h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: var(--gold);
  margin: 0 0 12px;
  letter-spacing: 1px;
}

.feature p { color: var(--muted); margin: 0; font-size: 15px; }

/* ===== Power-ups ===== */
.powerups { background: var(--panel); }

.powerup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.powerup {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--panel-2);
  border: 1px solid #2a2a45;
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.powerup:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.powerup-dot {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-top: 4px;
  box-shadow: 0 0 12px currentColor;
}

.powerup h4 {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: var(--gold);
  margin: 0 0 8px;
  letter-spacing: 1px;
}

.powerup p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Screenshots ===== */
.hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: -16px 0 32px;
}

.hint code {
  background: var(--panel-2);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--gold);
  font-size: 13px;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.shot {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #2a2a45;
  background: var(--panel-2);
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.shot:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  cursor: zoom-in;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  border: 1px solid var(--gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  image-rendering: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  padding: 8px 16px;
  font-family: inherit;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.lightbox-close:hover { opacity: 1; }

/* ===== Warnings ===== */
.warnings {
  background: rgba(12, 12, 24, 0.94);
  padding: 64px 0 48px;
  border-top: 1px solid #1a1a2e;
}

.warning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.warning-card {
  background: var(--panel);
  border: 1px solid #2a2a40;
  border-left: 3px solid var(--gold-2);
  border-radius: 10px;
  padding: 24px;
}

.warning-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.warning-card h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--gold);
  margin: 0 0 12px;
  line-height: 1.6;
}

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

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 1;
  background: rgba(5, 5, 16, 0.96);
  padding: 48px 0 32px;
  border-top: 1px solid #1a1a2e;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.studio-logo {
  width: 120px;
  height: auto;
  opacity: 0.85;
  image-rendering: pixelated;
}

.footer-links { color: var(--muted); font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold); }
.sep { margin: 0 8px; opacity: 0.5; }

.copy { color: var(--muted); font-size: 13px; margin: 0; }

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .hero { min-height: auto; padding: 60px 20px 80px; }
  .space-rebecca {
    width: min(320px, 70vw);
    right: -12%;
    bottom: -5%;
    opacity: 0.28;
  }
  .hero-spike, .hero-ship-deco { display: none; }
  section { padding: 56px 0; }
  .badge { min-width: 0; flex: 1; }
}
