/* ABOUTME: JUMP & CLAIM landing page stylesheet - deep-space arcade theme
   ABOUTME: Pure CSS3, zero dependencies, colors fixed by DESIGN.md spec */

/* ============ Design Tokens ============ */
:root {
  --bg-deep: #0B0F19;
  --bg-raised: rgba(16, 185, 129, 0.05);
  --neon-green: #10B981;
  --cyber-pink: #EC4899;
  --text-main: #F3F4F6;
  --text-dim: rgba(243, 244, 246, 0.6);
  --text-faint: rgba(243, 244, 246, 0.35);

  --font-display: "Chakra Petch", "Courier New", ui-monospace, monospace;
  --font-body: "Rajdhani", "Segoe UI", system-ui, sans-serif;

  --radius-panel: 24px;
  --radius-input: 14px;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --glow-green: 0 0 18px rgba(16, 185, 129, 0.55), 0 0 42px rgba(16, 185, 129, 0.22);
  --glow-pink: 0 0 18px rgba(236, 72, 153, 0.5), 0 0 42px rgba(236, 72, 153, 0.2);
}

/* ============ Reset & Base ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  touch-action: manipulation;   /* kill double-tap zoom during play */
}

/* While a run is live the whole screen is the controller - lock page scroll */
body.playing {
  overflow: hidden;
}

/* Deep-space starfield: subtle star dots painted with pure gradients */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(243, 244, 246, 0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 8%, rgba(243, 244, 246, 0.4) 50%, transparent 51%),
    radial-gradient(2px 2px at 84% 32%, rgba(16, 185, 129, 0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 62%, rgba(243, 244, 246, 0.3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 85%, rgba(236, 72, 153, 0.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 72%, rgba(243, 244, 246, 0.35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 5% 88%, rgba(243, 244, 246, 0.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 35%, rgba(243, 244, 246, 0.25) 50%, transparent 51%);
}

/* CRT scanlines: whisper-thin horizontal lines over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(243, 244, 246, 0.016) 3px,
    rgba(243, 244, 246, 0.016) 4px
  );
}

.page {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

/* ============ Header ============ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid var(--neon-green);
  box-shadow: var(--glow-green);
  animation: markBob 3.2s var(--ease-bounce) infinite;
}

.logo-mark svg {
  width: 18px;
  height: 18px;
  stroke: var(--neon-green);
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.logo-text .amp {
  color: var(--cyber-pink);
}

.status-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-green);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: inset 0 0 12px rgba(16, 185, 129, 0.12);
}

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

/* ============ Hero ============ */
.hero {
  text-align: center;
  padding: 26px 0 10px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(243, 244, 246, 0.14);
  background: rgba(243, 244, 246, 0.04);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyber-pink);
  box-shadow: var(--glow-pink);
  animation: dotPulse 1.6s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.65; }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin: 20px auto 14px;
  max-width: 21ch;
  text-wrap: balance;
}

.hero h1 .score-num {
  color: var(--neon-green);
  text-shadow: 0 0 22px rgba(16, 185, 129, 0.6);
}

.hero-sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  font-weight: 500;
  max-width: 46ch;
  margin: 0 auto;
}

/* ============ Game Zone ============ */
.game-zone {
  margin: 30px auto 0;
  max-width: 760px;
  position: relative;
}

.game-frame {
  position: relative;
  border-radius: var(--radius-panel);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06), rgba(11, 15, 25, 0.4));
  box-shadow:
    var(--glow-green),
    inset 0 0 60px rgba(16, 185, 129, 0.05);
  overflow: hidden;
}

/* Score HUD floating above canvas */
.score-hud {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 22px;
  border-radius: 999px;
  background: rgba(11, 15, 25, 0.72);
  border: 1px solid rgba(243, 244, 246, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.score-label {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.score-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
  min-width: 2.2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.score-value.bump {
  animation: scoreBump 0.34s var(--ease-bounce);
}

@keyframes scoreBump {
  0% { transform: scale(1); color: var(--text-main); }
  40% { transform: scale(1.42); color: var(--neon-green); text-shadow: var(--glow-green); }
  100% { transform: scale(1); color: var(--text-main); }
}

/* Canvas */
#gameCanvas {
  display: block;
  width: 100%;
  max-height: 460px;
  touch-action: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* TAP & HOLD overlay */
.tap-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(11, 15, 25, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.tap-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tap-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid var(--neon-green);
  display: grid;
  place-items: center;
  animation: ringPulse 1.6s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45), var(--glow-green);
  }
  50% {
    transform: scale(1.09);
    box-shadow: 0 0 0 16px rgba(16, 185, 129, 0), var(--glow-green);
  }
}

.tap-ring svg {
  width: 34px;
  height: 34px;
  stroke: var(--neon-green);
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tap-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 3vw, 1.5rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-main);
  text-shadow: 0 0 18px rgba(16, 185, 129, 0.55);
  animation: textPulse 1.6s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.tap-hint {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-align: center;
  max-width: 44ch;
  padding: 0 28px;
}

/* Touch devices get touch wording; desktop keeps the keyboard hint */
.hint-touch { display: none; }

@media (hover: none) and (pointer: coarse) {
  .hint-touch { display: inline; }
  .hint-desktop { display: none; }
}

.kbd {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  border: 1px solid rgba(243, 244, 246, 0.25);
  border-bottom-width: 2.5px;
  background: rgba(243, 244, 246, 0.07);
  color: var(--text-main);
}

/* Charge bar */
.charge-bar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  z-index: 5;
  width: min(46%, 220px);
  height: 10px;
  border-radius: 999px;
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid rgba(243, 244, 246, 0.18);
  overflow: hidden;
  pointer-events: none;
  transition: transform 0.18s var(--ease-out);
}

.charge-bar.active {
  transform: translateX(-50%) scaleX(1);
}

.charge-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--neon-green), var(--cyber-pink));
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.65);
}

/* Game over ribbon inside frame */
.gameover-banner {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

.gameover-banner.show {
  opacity: 1;
  visibility: visible;
}

.gameover-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyber-pink);
  text-shadow: var(--glow-pink);
}

.gameover-sub {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
}

/* ============ Game meta row ============ */
.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 0 6px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
  font-family: var(--font-display);
  font-size: 0.72rem;
}

.meta-item strong {
  color: var(--neon-green);
  font-size: 0.95rem;
}

.meta-item.best strong {
  color: var(--cyber-pink);
}

/* ============ Reward strip under game ============ */
.reward-strip {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.reward-card {
  padding: 18px 16px;
  border-radius: var(--radius-panel);
  border: 1px solid rgba(243, 244, 246, 0.1);
  background: var(--bg-raised);
  transition: transform 0.35s var(--ease-bounce), border-color 0.3s, box-shadow 0.3s;
}

.reward-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: var(--glow-green);
}

.reward-card .rc-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  margin-bottom: 12px;
}

.reward-card .rc-icon svg {
  width: 19px;
  height: 19px;
  stroke: var(--neon-green);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reward-card:nth-child(2) .rc-icon {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.4);
}

.reward-card:nth-child(2) .rc-icon svg {
  stroke: var(--cyber-pink);
}

.reward-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.reward-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ============ Footer ============ */
.site-footer {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(243, 244, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.site-footer svg {
  width: 16px;
  height: 16px;
  stroke: var(--neon-green);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ============ Reward Modal ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 10, 18, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: min(460px, 100%);
  position: relative;
  border-radius: 28px;
  border: 1.5px solid rgba(236, 72, 153, 0.4);
  background: linear-gradient(165deg, rgba(236, 72, 153, 0.08), rgba(11, 15, 25, 0.96) 42%);
  box-shadow:
    var(--glow-pink),
    0 30px 80px rgba(0, 0, 0, 0.6);
  padding: 34px 30px 30px;
  text-align: center;
  transform: scale(0.88) translateY(24px);
  transition: transform 0.45s var(--ease-bounce);
  overflow: hidden;
}

.modal-backdrop.open .modal-card {
  transform: scale(1) translateY(0);
}

/* sheen sweep across modal top */
.modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyber-pink), transparent);
  animation: sheen 2.8s var(--ease-out) infinite;
}

@keyframes sheen {
  0% { left: -60%; }
  60%, 100% { left: 115%; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(243, 244, 246, 0.18);
  background: rgba(243, 244, 246, 0.05);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.3s var(--ease-bounce), color 0.25s, border-color 0.25s;
}

.modal-close:hover {
  transform: rotate(90deg);
  color: var(--text-main);
  border-color: rgba(243, 244, 246, 0.4);
}

.modal-close svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.trophy-wrap {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(236, 72, 153, 0.12);
  border: 2px solid var(--cyber-pink);
  box-shadow: var(--glow-pink);
  animation: trophyPop 2.4s var(--ease-bounce) infinite;
}

@keyframes trophyPop {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.07) rotate(-3deg); }
}

.trophy-wrap svg {
  width: 38px;
  height: 38px;
  stroke: var(--cyber-pink);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-kicker {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyber-pink);
  margin-bottom: 10px;
}

.modal-score-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.modal-score-line .m-score {
  color: var(--neon-green);
  text-shadow: var(--glow-green);
  font-size: 1.9em;
  vertical-align: -0.12em;
  padding: 0 6px;
}

.modal-desc {
  color: var(--text-dim);
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 22px;
}

.modal-desc strong {
  color: var(--text-main);
}

.claim-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.claim-form input[type="email"] {
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--radius-input);
  border: 1.5px solid rgba(243, 244, 246, 0.16);
  background: rgba(11, 15, 25, 0.85);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.claim-form input[type="email"]::placeholder {
  color: var(--text-faint);
}

.claim-form input[type="email"]:focus {
  border-color: var(--neon-green);
  box-shadow: var(--glow-green);
}

.claim-form input[type="email"].invalid {
  border-color: var(--cyber-pink);
  box-shadow: var(--glow-pink);
  animation: shake 0.4s var(--ease-out);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  60% { transform: translateX(6px); }
  80% { transform: translateX(-3px); }
}

.btn-claim {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 999px;
  background: var(--neon-green);
  color: #06281C;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--glow-green);
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s, background 0.25s;
}

.btn-claim:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.7), 0 0 60px rgba(16, 185, 129, 0.3);
}

.btn-claim:active {
  transform: scale(0.97);
}

.claim-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px;
}

.claim-success.show {
  display: flex;
  animation: successIn 0.5s var(--ease-bounce);
}

@keyframes successIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.claim-success svg {
  width: 52px;
  height: 52px;
  stroke: var(--neon-green);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.claim-success h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.claim-success p {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}

.modal-privacy {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ============ Responsive ============ */
@media (max-width: 640px) {
  .page {
    padding: 12px 12px 30px;
  }

  /* compress the hero so the playfield gets maximum first-screen height */
  .hero {
    padding: 10px 0 2px;
  }

  .hero h1 {
    margin: 12px auto 8px;
    font-size: clamp(1.6rem, 6.8vw, 2.3rem);
  }

  .hero-sub {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .game-zone {
    margin-top: 14px;
  }

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

  .score-hud {
    top: 10px;
    padding: 6px 16px;
  }

  .score-value {
    font-size: 1.2rem;
  }

  .modal-card {
    padding: 28px 20px 24px;
  }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
