/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
  min-height: 100%; overflow-x: hidden;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: #04040D; color: #fff;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ===== SPLASH INTRO ===== */
.splash {
  position: fixed; inset: 0; z-index: 100;
  background: #14141F;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3vh;
  transition: opacity 0.8s ease-out;
}
.splash.fade-out { opacity: 0; pointer-events: none; }

.splash-studio {
  display: flex; align-items: center; gap: 1.5vh;
  margin-top: -1vh;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
.splash-studio.visible { opacity: 1; }
.splash-studio-line {
  width: 6vh; height: 1px;
  background: rgba(255,255,255,0.15);
}
.splash-studio-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5vh; font-weight: 600;
  letter-spacing: 0.35vh;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  white-space: nowrap;
}

.splash-tap {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5vh; font-weight: 500;
  letter-spacing: 0.3vh;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  position: absolute; bottom: 5vh;
  opacity: 0;
  cursor: pointer;
  animation: tapPulse 2s ease-in-out infinite;
}
.splash-tap.visible { opacity: 1; transition: opacity 0.5s; }
.splash-tap.hidden { opacity: 0; transition: opacity 0.3s; }
@keyframes tapPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.5; }
}

/* Stars canvas */
.splash-stars {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Character — fade in from below + float */
.splash-character {
  position: relative;
  width: 22vh; height: 22vh;
  opacity: 0;
  transform: translateY(4vh) scale(0.92);
}
.splash-character.enter {
  opacity: 1; transform: translateY(0) scale(1);
  transition: opacity 1.2s ease-out, transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.splash-character.float {
  animation: splashFloat 2.5s ease-in-out infinite alternate;
}
@keyframes splashFloat {
  0% { transform: translateY(-0.8vh); }
  100% { transform: translateY(0.8vh); }
}

.splash-char-base, .splash-char-red, .splash-char-cyan {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
.splash-char-red {
  mix-blend-mode: screen; opacity: 0.35;
  transform: translate(-2px, 0.5px);
  filter: hue-rotate(-20deg) saturate(1.5) brightness(0.8);
}
.splash-char-cyan {
  mix-blend-mode: screen; opacity: 0.35;
  transform: translate(2px, -0.5px);
  filter: hue-rotate(20deg) saturate(1.5) brightness(0.8);
}

/* Title — shimmer sweep */
.splash-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 7vh;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-align: center;
  background: linear-gradient(90deg, rgb(46,199,230), rgb(79,217,242), #fff, rgb(79,217,242), rgb(46,199,230));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(46,199,230,0.4));
  opacity: 0;
  transform: perspective(600px) rotateX(90deg);
  animation: none;
}
.splash-title.enter {
  opacity: 1;
  transform: perspective(600px) rotateX(0deg);
  transition: opacity 0.5s, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.splash-title.shimmer {
  animation: splashShimmer 3s ease-in-out infinite;
}

/* Glitch flicker — rapid opacity blink */
.splash.glitching {
  animation: splashGlitchFlicker 0.4s steps(1) forwards;
}
@keyframes splashGlitchFlicker {
  0%   { opacity: 1; }
  8%   { opacity: 0; }
  12%  { opacity: 1; }
  20%  { opacity: 0; }
  25%  { opacity: 1; }
  35%  { opacity: 0; }
  40%  { opacity: 0.6; }
  48%  { opacity: 0; }
  55%  { opacity: 1; }
  65%  { opacity: 0; }
  72%  { opacity: 0.8; }
  80%  { opacity: 0; }
  88%  { opacity: 0.4; }
  92%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Chromatic shift during glitch */
.splash-character.glitch-shift .splash-char-red {
  transform: translate(-8px, 1px);
  opacity: 0.6;
  transition: transform 0.05s, opacity 0.05s;
}
.splash-character.glitch-shift .splash-char-cyan {
  transform: translate(8px, -1px);
  opacity: 0.6;
  transition: transform 0.05s, opacity 0.05s;
}
@keyframes splashShimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

/* ===== MAIN STAGE (scales as unit on scroll) ===== */
.main-stage {
  position: fixed; inset: 0;
  z-index: 2;
  transform-origin: center center;
}

/* ===== FULL-SCREEN BACKGROUND ===== */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
  background-image: url('assets/images/scenes/command_center.jpg');
  background-size: cover;
  background-position: center;
  transition: background-image 1.2s ease;
}
.bg-overlay {
  position: fixed; inset: 0; z-index: 1;
  background: radial-gradient(
    ellipse 60% 100% at 50% 50%,
    rgba(4,4,13,0.92) 0%,
    rgba(4,4,13,0.75) 40%,
    rgba(4,4,13,0.45) 100%
  );
}

/* ===== GAME COLUMN — 9:16, viewport-scaled ===== */
.game-column {
  position: fixed; z-index: 10;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  height: 94vh;
  width: calc(94vh * 9 / 16);
  max-width: 92vw;
  display: flex; flex-direction: column;
  background: rgb(20, 20, 31);
  border-radius: 24px;
  /* Allow swipe overflow */
  overflow: visible;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 0 80px rgba(0,0,0,0.6),
    0 0 200px rgba(0,0,0,0.3);
}

/* ===== TOP BAR ===== */
.top-bar {
  flex-shrink: 0;
  padding: 2.2vh 1.5vh 1.5vh;
  background: rgb(20, 20, 31);
  border-radius: 24px 24px 0 0;
}

/* Stat bar */
.stat-bar { display: flex; }
.stat-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 0.5vh;
}
.stat-icon {
  width: 4.5vh; height: 4.5vh; object-fit: contain;
  transition: filter 0.3s, transform 0.3s;
}
.stat-icon.glow-active {
  filter: brightness(1.1) drop-shadow(0 0 1.2vh rgba(46, 199, 230, 0.6));
  transform: scale(1.08);
  animation: iconBreathe 1.8s ease-in-out infinite;
}
@keyframes iconBreathe {
  0%, 100% {
    filter: brightness(1.08) drop-shadow(0 0 1vh rgba(46, 199, 230, 0.5));
    transform: scale(1.06);
  }
  50% {
    filter: brightness(1.14) drop-shadow(0 0 1.6vh rgba(46, 199, 230, 0.7));
    transform: scale(1.1);
  }
}
.stat-label {
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 1.3vh; letter-spacing: 0.08vh;
  color: rgba(255,255,255,0.8); text-transform: uppercase;
}
.stat-segments { display: flex; gap: 0.25vh; align-items: center; }
.stat-seg {
  width: 0.55vh; height: 1.2vh; border-radius: 1px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat-seg.active {
  background: rgb(252, 240, 209);
  box-shadow: 0 0 0.6vh rgba(255, 153, 74, 0.7);
}
.stat-seg.inactive {
  background: rgb(66, 66, 89);
  transform: scaleY(0.8); opacity: 0.6;
}
.stat-seg.gain {
  background: rgb(38, 242, 128) !important;
  box-shadow: 0 0 1vh rgba(38, 242, 128, 0.7) !important;
  transform: scaleY(1.15);
}
.stat-seg.loss {
  background: rgb(255, 64, 77) !important;
  box-shadow: 0 0 1vh rgba(255, 64, 77, 0.7) !important;
  transform: scaleY(1.15);
}

/* ===== CONTENT AREA ===== */
.content-area {
  flex: 1; display: flex; flex-direction: column;
  background: linear-gradient(to bottom, rgb(36,36,52) 0%, rgb(28,28,42) 100%);
  overflow: visible;
  min-height: 0;
}

/* Body text — vertically centered in remaining space above card */
.body-zone {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 1vh 3vh;
  min-height: 0;
}
.body-text {
  font-family: 'Space Grotesk', monospace;
  font-size: 2.2vh; font-weight: 500;
  color: #fff; text-align: center;
  line-height: 1.55;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.body-text.exit { opacity: 0; transform: translateY(1vh); }
.body-text.enter { opacity: 0; transform: translateY(-1vh); }

/* Card zone */
.card-zone {
  flex-shrink: 0;
  padding: 0 3vh 6vh; /* bottom padding = gap before bottom bar */
  overflow: visible;
}
.card-wrapper {
  position: relative; width: 100%;
  aspect-ratio: 1 / 1.08;
}
.card-bg {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}
.card-bg-img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 2.2vh;
  box-shadow: 0.6vh 0.6vh 0px rgba(10,10,18,1);
  backface-visibility: hidden;
}
/* Flip reveal: next card on back face of card-bg */
.card-bg-next {
  position: absolute; inset: 0;
  border-radius: 2.2vh; overflow: visible;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  box-shadow: 0.6vh 0.6vh 0px rgba(10,10,18,1);
}
.card-bg-next img {
  position: absolute; bottom: 0; left: 0; right: 0;
  width: 100%; height: auto;
  object-fit: contain; object-position: bottom;
  pointer-events: none;
  /* Clip image to card bounds since parent is overflow:visible for badge */
  clip-path: inset(0 round 2.2vh);
}

.swipe-card {
  position: absolute; inset: 0;
  cursor: grab; user-select: none;
  touch-action: none; z-index: 10;
  will-change: transform;
}
.swipe-card:active { cursor: grabbing; }

.card-face {
  width: 100%; height: 100%;
  border-radius: 2.2vh; overflow: hidden;
  position: relative;
  box-shadow: 0.6vh 0.6vh 0px rgba(10, 10, 18, 1);
  transition: background-color 0.5s;
}
/* Character image — pinned to bottom of card */
.character-img {
  position: absolute; bottom: 0; left: 0; right: 0;
  width: 100%; height: auto;
  object-fit: contain; object-position: bottom;
  pointer-events: none;
}

/* Swipe labels */
.swipe-label {
  position: absolute; top: -4vh; left: 0; right: 0;
  height: 14vh; pointer-events: none; opacity: 0;
}
.label-bg-shape { position: absolute; inset: 0; }
.label-bg-shape.left {
  background: rgba(0,0,0,0.55);
  clip-path: polygon(100% 0, 0 0, 0 72%, 100% 100%);
}
.label-bg-shape.right {
  background: rgba(0,0,0,0.55);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
}
.label-text {
  position: absolute; top: 8vh;
  font-family: 'Space Grotesk', monospace;
  font-weight: 700; font-size: 2.2vh;
  color: rgb(102, 217, 242);
  text-transform: uppercase; letter-spacing: 0.1vh;
  opacity: 0;
}
.label-left .label-text { right: 1.8vh; transform: rotate(3deg); }
.label-right .label-text { left: 1.8vh; transform: rotate(-3deg); }

/* Character badge — raised 24px higher */
.char-badge {
  position: absolute; bottom: calc(2vh + 24px); right: -0.5vh;
  display: flex; z-index: 15;
  opacity: 0; transition: opacity 0.4s 0.25s;
}
.char-badge.visible { opacity: 1; }
.char-badge-text {
  background: #fff; color: #000;
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 2.4vh; padding: 0.4vh 1.8vh;
  border-radius: 100px 0 0 100px;
}
.char-badge-tail { width: 0.6vh; background: #ccc; }

/* ===== BOTTOM BAR ===== */
.bottom-bar {
  flex-shrink: 0; height: calc(8.5vh + 18px);
  background: rgb(20, 20, 31);
  position: relative;
  border-radius: 0 0 24px 24px;
}
.bottom-sep {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(46,199,230,0.2), transparent);
}
#bottomParticles {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.bottom-content {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}

/* ===== DOWNLOAD BUTTON (bottom bar) ===== */
.scifi-download {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 1.4vh 4.5vh;
  background: rgba(46,199,230,0.08);
  border: 1px solid rgba(46,199,230,0.25);
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(46,199,230,0.06);
}
.scifi-download:hover {
  background: rgba(46,199,230,0.14);
  border-color: rgba(46,199,230,0.5);
  box-shadow: 0 0 30px rgba(46,199,230,0.12);
  transform: scale(1.03);
}
.scifi-download:active { transform: scale(0.97); }

/* Hide unused decorative children */
.dl-scanline, .dl-orbit, .dl-corner { display: none; }

/* Inner content */
.dl-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 1vh;
}
.dl-apple {
  width: 2.6vh; height: 2.6vh;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
  transition: color 0.3s;
}
.scifi-download:hover .dl-apple { color: #fff; }

.dl-text {
  display: flex; flex-direction: column; gap: 0;
  text-align: left;
}
.dl-action {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.7vh;
  letter-spacing: 0.25vh;
  color: rgba(255,255,255,0.9);
  line-height: 1.1;
}
.scifi-download:hover .dl-action { color: #fff; }
.dl-platforms {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05vh; font-weight: 500;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04vh;
  white-space: nowrap;
}
.scifi-download:hover .dl-platforms { color: rgba(255,255,255,0.5); }

/* ===== TOP-RIGHT SOCIAL CORNER ===== */
.social-corner {
  position: fixed; top: 0; right: 0;
  z-index: 60; transform-origin: top right;
  display: flex; gap: 2vh;
  padding: 2.5vh 3vh;
  /* Vignette backdrop */
  background: radial-gradient(
    ellipse 140% 160% at 100% 0%,
    rgba(4,4,13,0.7) 0%,
    rgba(4,4,13,0.4) 40%,
    transparent 70%
  );
}
.social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.8vh; height: 2.8vh;
  color: rgba(255,255,255,0.45);
  transition: color 0.3s, transform 0.2s;
}
.social-btn:hover { transform: scale(1.15); opacity: 0.85; }
.social-btn img, .social-btn svg {
  width: 100%; height: 100%;
  filter: invert(1) brightness(1);
  opacity: 0.45;
  transition: opacity 0.3s;
}
.social-btn:hover img, .social-btn:hover svg { opacity: 0.85; }

/* ===== DEATH SCREEN (GameOverView) ===== */
.death-screen {
  position: fixed; inset: 0; z-index: 50;
  background: #000;
  overflow: hidden;
  opacity: 0; pointer-events: none;
}
.death-screen.active { opacity: 1; pointer-events: all; }

/* Death glitch transition overlay — covers game column during burst */
/* Death transition — lottie overlay */
.death-transition {
  position: fixed; inset: 0; z-index: 45;
  background: #14141F;
  pointer-events: none; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.death-transition.active { opacity: 1; pointer-events: all; }
.death-lottie {
  width: 130vmax; height: 130vmax;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
@media (max-aspect-ratio: 1/1) {
  .death-lottie {
    transform: translate(-50%, -50%) rotate(90deg);
  }
}

/* White reveal flash */
.death-white {
  position: absolute; inset: 0; z-index: 60;
  background: #fff; opacity: 0;
  pointer-events: none;
}
.death-white.flash { opacity: 1; transition: opacity 1s ease-out; }
.death-white.fade { opacity: 0; }

/* Ending image — 55% top, chromatic aberration */
.death-image-zone {
  position: absolute; top: 0;
  left: 50%; transform: translateX(-50%);
  width: calc(94vh * 9 / 16);
  max-width: 92vw;
  height: 60%; overflow: hidden;
}
.death-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  animation: deathBreathe 4s ease-in-out infinite;
}
@keyframes deathBreathe {
  0%, 100% { transform: scale(1.02); }
  50% { transform: scale(1.06); }
}
.death-img.death-img-red {
  animation: deathBreatheRed 4s ease-in-out infinite;
}
@keyframes deathBreatheRed {
  0%, 100% { transform: translate(-2px, 0.3px) scale(1.02); }
  50% { transform: translate(-2px, 0.3px) scale(1.06); }
}
.death-img.death-img-cyan {
  animation: deathBreatheCyan 4s ease-in-out infinite;
}
@keyframes deathBreatheCyan {
  0%, 100% { transform: translate(2px, -0.3px) scale(1.02); }
  50% { transform: translate(2px, -0.3px) scale(1.06); }
}
.death-img-base { z-index: 1; }
.death-img-red {
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.5;
  transform: translate(-2px, 0.3px);
  filter: hue-rotate(-30deg) saturate(2);
}
.death-img-cyan {
  z-index: 3;
  mix-blend-mode: screen;
  opacity: 0.5;
  transform: translate(2px, -0.3px);
  filter: hue-rotate(160deg) saturate(1.5);
}
.death-img-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 40%; z-index: 4;
  background: linear-gradient(to bottom, transparent, #000);
}

/* CRT scanlines */
.death-crt {
  position: absolute; inset: 0; z-index: 10;
  width: 100%; height: 100%;
  pointer-events: none; opacity: 0.4;
}

/* Vignette */
.death-vignette {
  position: absolute; inset: 0; z-index: 11;
  background: radial-gradient(
    ellipse 55% 55% at 50% 40%,
    transparent 0%,
    rgba(0,0,0,0.4) 60%,
    rgba(0,0,0,0.85) 100%
  );
  pointer-events: none;
}

/* Floating particles */
.death-particles {
  position: absolute; inset: 0; z-index: 12;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Glitch bars */
.death-glitch-bars {
  position: absolute; inset: 0; z-index: 13;
  pointer-events: none;
}
.glitch-bar {
  position: absolute; left: 0; right: 0;
  pointer-events: none;
}

/* Content — constrained to game-column width */
.death-content {
  position: absolute; top: 60%; bottom: 0; z-index: 20;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding-top: 2vh;
  text-align: center;
  width: calc(94vh * 9 / 16);
  max-width: 92vw;
  left: 50%;
  transform: translateX(-50%);
}

.death-badge {
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 2vh;
  background: #fff; color: #000;
  padding: 0.3vh 1.6vh;
  transform: rotate(-3deg);
  margin-bottom: 2vh;
  opacity: 0;
}
.death-badge.reveal {
  opacity: 1;
  animation: badgeBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes badgeBounce {
  0% { transform: rotate(-3deg) scale(0.7); opacity: 0; }
  100% { transform: rotate(-3deg) scale(1); opacity: 1; }
}

.death-message {
  font-family: 'Rajdhani', sans-serif; font-weight: 500;
  font-size: 2.2vh; color: #fff;
  line-height: 1.5; max-width: 80%;
  margin-bottom: 3vh;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}
.death-message.reveal { opacity: 1; }

/* Download button — death screen (same style, just reveal animation) */
.death-download {
  margin-bottom: 2.5vh;
  opacity: 0;
  transform: scale(0.95);
}
.death-download.reveal {
  opacity: 1; transform: scale(1);
  transition: all 0.3s ease, opacity 0.6s ease-out;
}
.death-download.reveal:hover {
  background: rgba(46,199,230,0.14);
  border-color: rgba(46,199,230,0.5);
  box-shadow: 0 0 30px rgba(46,199,230,0.12);
  transform: scale(1.03);
}

/* Death screen socials — mobile only */
.death-socials {
  display: none;
  gap: 3.5vh;
  margin-top: 1vh;
  margin-bottom: 2vh;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}
.death-socials a {
  width: 2.2vh; height: 2.2vh;
  display: flex; align-items: center; justify-content: center;
}
.death-socials img {
  width: 100%; height: 100%;
  filter: invert(1) brightness(1);
  opacity: 0.4;
  transition: opacity 0.3s;
}
.death-socials a:hover img { opacity: 0.8; }

/* Play again — subtle, secondary */
.death-replay {
  font-family: 'Space Grotesk', sans-serif; font-weight: 500;
  font-size: 1.3vh; letter-spacing: 0.2vh;
  color: rgba(255,255,255,0.2);
  background: none; border: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.3s;
  opacity: 0;
}
.death-replay.reveal { opacity: 1; transition: opacity 0.5s ease-out; }
.death-replay:hover { color: rgba(255,255,255,0.5); }
.death-replay { margin-top: auto; padding-bottom: 4vh; }

/* ===== LANGUAGE TOGGLE (top-left) ===== */
.lang-toggle {
  position: fixed; top: 2.5vh; left: 2.5vh;
  z-index: 60; transform-origin: top left;
  width: 4.5vh; height: 4.5vh;
  border-radius: 50%;
  background: rgba(4,4,13,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  padding: 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.6vh;
  font-weight: 700;
  letter-spacing: 0.05vh;
  line-height: 1;
}
.lang-toggle:hover {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
  background: rgba(4,4,13,0.7);
}

/* ===== LANGUAGE DROPDOWN ===== */
.lang-dropdown {
  position: fixed;
  z-index: 1000;
  background: rgba(10,10,22,0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1.2vh;
  padding: 0.6vh 0;
  min-width: 16vh;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.lang-dropdown-item {
  display: flex; align-items: center; gap: 1vh;
  width: 100%;
  padding: 0.9vh 1.6vh;
  background: none; border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5vh;
  transition: all 0.15s;
  text-align: left;
}
.lang-dropdown-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
}
.lang-dropdown-item.active {
  color: rgba(46,199,230,0.9);
}
.lang-dd-flag { font-size: 1.8vh; line-height: 1; }
.lang-dd-label { letter-spacing: 0.02vh; }

/* ===== SOUND TOGGLE (top-left, next to lang) ===== */
.sound-toggle {
  position: fixed; top: 2.5vh; left: 8vh;
  z-index: 60; transform-origin: top left;
  width: 4.5vh; height: 4.5vh;
  border-radius: 50%;
  background: rgba(4,4,13,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  padding: 0;
}
.sound-toggle:hover {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
  background: rgba(4,4,13,0.7);
}
.sound-toggle svg { width: 2.2vh; height: 2.2vh; }
.sound-toggle.muted { border-color: rgba(255,64,77,0.3); }
.sound-toggle.muted:hover { border-color: rgba(255,64,77,0.5); }

/* ===== DECK INTRO ===== */
.deck-intro {
  position: absolute; inset: 0; z-index: 30;
  pointer-events: none;
}
.deck-card {
  position: absolute; inset: 0;
  transform: translateX(-120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.deck-card.arrived { transform: translateX(0); }
.deck-card img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 2.2vh;
  box-shadow: 0.6vh 0.6vh 0px rgba(10,10,18,1);
}
/* Flip card (top of deck) */
.deck-flip {
  position: absolute; inset: 0; z-index: 40;
  transform-style: preserve-3d;
}
.deck-flip-back, .deck-flip-front {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 2.2vh; overflow: hidden;
}
.deck-flip-front {
  transform: rotateY(180deg);
}

/* ===== BOTTOM-LEFT TRAILER BUTTON ===== */
.trailer-btn {
  position: fixed; bottom: 3vh; left: 3vh;
  z-index: 60; transform-origin: bottom left;
  display: flex; align-items: center; gap: 1.2vh;
  cursor: pointer;
  transition: transform 0.3s;
}
.trailer-btn:hover { transform: translateY(-2px); }

.trailer-play-circle {
  width: 5.5vh; height: 5.5vh;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(4,4,13,0.5);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.trailer-play-circle svg {
  width: 3.4vh; height: 3.4vh;
  color: rgba(255,255,255,0.5);
  margin-left: 0.2vh;
  transition: color 0.3s;
}
.trailer-btn:hover .trailer-play-circle {
  border-color: rgba(46,199,230,0.5);
  background: rgba(46,199,230,0.08);
  box-shadow: 0 0 20px rgba(46,199,230,0.12);
}
.trailer-btn:hover .trailer-play-circle svg {
  color: rgba(46,199,230,0.9);
}

.trailer-label {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.6vh; font-weight: 600;
  letter-spacing: 0.08vh;
  color: rgba(255,255,255,0.35);
  transition: color 0.3s;
}
.trailer-btn:hover .trailer-label {
  color: rgba(255,255,255,0.7);
}

/* ===== RIGHT SIDE STORE BUTTONS ===== */
.store-links {
  position: fixed;
  right: 3vh; bottom: 3vh;
  z-index: 60; transform-origin: bottom right;
  display: flex; flex-direction: column;
  gap: 1.4vh;
}

/* App Store — primary CTA, must stand out */
.store-card {
  position: relative;
  display: flex; align-items: center; gap: 1.6vh;
  padding: 1.8vh 2.8vh;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 1.4vh;
  cursor: pointer;
  transition: all 0.35s ease;
  overflow: hidden;
}
.store-card.secondary:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.store-icon-wrap {
  width: 4.2vh; height: 4.2vh;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.store-svg {
  width: 3.6vh; height: 3.6vh;
  transition: color 0.3s;
}
.store-card.secondary .store-svg {
  filter: invert(1) brightness(1);
  opacity: 0.4;
  transition: opacity 0.3s;
}
.store-card.secondary:hover .store-svg { opacity: 0.75; }
.store-card.secondary:hover .store-svg { color: rgba(255,255,255,0.75); }

.store-text {
  display: flex; flex-direction: column; gap: 0.1vh;
}
.store-small {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1vh; font-weight: 500;
  letter-spacing: 0.04vh;
}
.store-card.secondary .store-small { color: rgba(255,255,255,0.3); }

.store-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.4vh; font-weight: 700;
  letter-spacing: 0.06vh;
  transition: color 0.3s;
}
.store-card.secondary .store-name { color: rgba(255,255,255,0.55); }
.store-card.secondary:hover .store-name { color: rgba(255,255,255,0.85); }

/* Glow line on bottom */
.store-glow {
  position: absolute; bottom: 0; left: 10%; right: 10%;
  height: 1px;
  opacity: 0; transition: opacity 0.35s;
}
.store-card.secondary .store-glow {
  background: linear-gradient(to right, transparent, rgba(102,192,244,0.3), transparent);
}
.store-card.secondary:hover .store-glow { opacity: 1; }


/* ===== TRAILER MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-frame {
  position: relative;
}
.modal-content {
  /* Same size as game column */
  height: 94vh;
  width: calc(94vh * 9 / 16);
  max-width: 92vw;
  background: #000; border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.modal-close {
  position: absolute; top: -1.8vh; right: -1.8vh;
  width: 4.5vh; height: 4.5vh;
  border-radius: 50%;
  background: rgb(20, 20, 31);
  border: 1.5px solid rgba(46,199,230,0.3);
  color: rgba(255,255,255,0.6);
  cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
}
.modal-close svg { width: 2vh; height: 2vh; }
.modal-close:hover {
  color: #fff;
  border-color: rgba(46,199,230,0.6);
  background: rgb(26, 26, 41);
  box-shadow: 0 0 16px rgba(46,199,230,0.12);
  transform: scale(1.08);
}

/* ===== SCROLL BACKDROP ===== */
.scroll-backdrop {
  position: fixed; inset: 0; z-index: 22;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/* ===== FOOTER ===== */
.footer-spacer { height: 100vh; position: relative; z-index: 70; pointer-events: none; }
.site-footer {
  position: relative; z-index: 70;
  background: #04040D;
  padding: 3vh 4vh 2vh;
}
.footer-row {
  display: flex; justify-content: space-between;
  align-items: center;
  padding-bottom: 2vh;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.footer-dev {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4vh; font-weight: 400;
  color: rgba(255,255,255,0.9);
  transition: opacity 0.3s;
}
.footer-dev strong {
  font-weight: 600;
}
.footer-dev:hover { opacity: 0.6; }

.footer-email {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.3vh; font-weight: 500;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.03vh;
  transition: opacity 0.3s;
}
.footer-email:hover { opacity: 0.6; }

.footer-copy {
  text-align: center;
  padding-top: 1.5vh;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1vh; font-weight: 500;
  letter-spacing: 0.15vh;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
}

/* ===== MOBILE NAV BAR ===== */
.mobile-nav {
  display: none;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding: 1.8vh 2.5vh 0.5vh;
  background: rgb(20, 20, 31);
}
.mobile-nav-left {
  display: flex; align-items: center; gap: 1vh;
}
.mobile-lang-toggle {
  width: 4vh; height: 4vh;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5vh;
  font-weight: 700;
  letter-spacing: 0.05vh;
  line-height: 1;
  transition: all 0.3s;
}
.mobile-lang-toggle:hover {
  border-color: rgba(255,255,255,0.25);
}
.mobile-sound-toggle {
  width: 4vh; height: 4vh;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: all 0.3s;
}
.mobile-sound-toggle:hover {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
}
.mobile-sound-toggle svg { width: 2vh; height: 2vh; }
.mobile-sound-toggle.muted { border-color: rgba(255,64,77,0.3); }

.mobile-trailer-link {
  height: 4vh;
  padding: 0 1.8vh;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  display: flex; align-items: center; gap: 0.6vh;
  transition: all 0.3s;
}
.mobile-trailer-link:hover {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
}
.mobile-trailer-link svg { width: 1.6vh; height: 1.6vh; margin-left: 0.1vh; }
.mobile-trailer-link span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4vh; font-weight: 600;
  letter-spacing: 0.05vh;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .mobile-nav { display: flex; }
  .store-links { display: none; }
  .trailer-btn { display: none; }
  .social-corner { display: none; }
  .sound-toggle { display: none; }
  .lang-toggle { display: none; }
  .game-column {
    height: 100vh; width: 100vw;
    border-radius: 0; max-width: 100vw;
  }
  .top-bar { border-radius: 0; }
  .bottom-bar { border-radius: 0; }
  .death-socials { display: flex; }
  .demo-end-overlay { border-radius: 0; }
}
