/* GENEEGY — The Golden Ghost */

html, body {
  margin: 0;
  padding: 0;
  background: #030106;
  color: #cfc3e8;
  overflow-x: hidden;
}
* { box-sizing: border-box; }
a { color: #e8c15a; text-decoration: none; }
a:hover { color: #ffe9a8; }
::selection { background: #3a1f5e; color: #ffe9a8; }
img { max-width: 100%; height: auto; }

/* ---------- keyframes ---------- */
@keyframes gnBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .1; } }
@keyframes gnFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes gnFog { 0% { transform: translate(-6%, 0) scale(1); } 50% { transform: translate(6%, -3%) scale(1.12); } 100% { transform: translate(-6%, 0) scale(1); } }
@keyframes gnFog2 { 0% { transform: translate(5%, 2%) scale(1.1); } 50% { transform: translate(-7%, -2%) scale(1); } 100% { transform: translate(5%, 2%) scale(1.1); } }
@keyframes gnRise { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: .9; } 90% { opacity: .8; } 100% { transform: translateY(-110vh); opacity: 0; } }
@keyframes gnGlitch { 0%, 92%, 100% { transform: translate(0); filter: none; } 93% { transform: translate(-2px, 1px); filter: hue-rotate(40deg); } 95% { transform: translate(2px, -1px); filter: none; } 97% { transform: translate(-1px, 0); filter: hue-rotate(-30deg); } }
@keyframes gnScan { 0% { background-position: 0 0; } 100% { background-position: 0 6px; } }
@keyframes gnShimmer { 0% { background-position: -200% 50%; } 100% { background-position: 200% 50%; } }
@keyframes gnCardSway { 0%, 100% { transform: rotateY(-7deg) rotateX(3deg); } 50% { transform: rotateY(7deg) rotateX(-3deg); } }
@keyframes gnFoilSway { 0%, 100% { background-position: 20% 40%; opacity: .85; } 50% { background-position: 80% 60%; opacity: 1; } }

/* ---------- overlays ---------- */
.scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0px, rgba(0,0,0,.22) 1px, transparent 1px, transparent 3px);
  animation: gnScan 1.2s steps(6) infinite;
  mix-blend-mode: multiply; opacity: .5;
}
.vignette {
  position: fixed; inset: 0; z-index: 61; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}
.particles { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }

/* ---------- fixed pills ---------- */
.pill {
  position: fixed; top: 16px; z-index: 70;
  background: rgba(10,4,18,.7); border: 1px solid #4a2a72; color: #e8c15a;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer; letter-spacing: 1px; line-height: 1;
  min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.pill:hover { border-color: #8f6cc4; color: #ffe9a8; }
.pill-x { right: 16px; font-size: 11px; padding: 10px 13px; }
.pill-sound { right: 74px; font-size: 9px; padding: 10px 12px; }

/* ---------- shared ---------- */
.blink { animation: gnBlink 1.4s steps(1) infinite; }
.blink-slow { animation: gnBlink 2.2s steps(1) infinite; }
.glitch { animation: gnGlitch 7s infinite; }
.glitch-slow { animation: gnGlitch 9s infinite; }
.gold { color: #e8c15a; }
.h2 {
  margin: 0; font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(38px, 7vw, 72px); letter-spacing: .05em; color: #e6d9ff; line-height: 1;
}
.lead {
  font-family: 'VT323', monospace; font-size: clamp(20px, 3vw, 26px);
  color: #9d8bc0; line-height: 1.5; margin: 30px 0 0;
}
.kicker {
  font-family: 'Press Start 2P', monospace; font-size: 9px; color: #6b4a9e;
  letter-spacing: 3px; margin-bottom: 22px; line-height: 1.9;
}
.btn {
  font-family: 'Press Start 2P', monospace; font-size: 11px;
  padding: 18px 26px; cursor: pointer; display: inline-block;
}
.btn-gold {
  background: linear-gradient(180deg, #f4d97c, #c99a2e); color: #1a0f00;
  border: 1px solid #ffe9a8; box-shadow: 0 0 24px rgba(232,193,90,.35);
}
.btn-gold:hover { color: #1a0f00; box-shadow: 0 0 40px rgba(232,193,90,.6); }
.btn-ghost { background: transparent; color: #b79ae0; border: 1px solid #4a2a72; }
.btn-ghost:hover { border-color: #8f6cc4; color: #e6d9ff; }
.btn-big { font-size: 12px; padding: 18px 34px; }

.fog-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fog { position: absolute; }
.fog-a {
  left: -20%; right: -20%; bottom: -10%; height: 70%;
  background: radial-gradient(ellipse 60% 50% at 50% 80%, rgba(106,44,181,.35), transparent 70%);
  filter: blur(30px); animation: gnFog 14s ease-in-out infinite;
}
.fog-b {
  left: -25%; right: -25%; bottom: -15%; height: 60%;
  background: radial-gradient(ellipse 50% 45% at 40% 85%, rgba(64,20,120,.4), transparent 70%);
  filter: blur(40px); animation: gnFog2 18s ease-in-out infinite;
}
.fog-c {
  left: -20%; right: -20%; top: 20%; height: 70%;
  background: radial-gradient(ellipse 55% 45% at 50% 50%, rgba(90,36,160,.3), transparent 70%);
  filter: blur(50px); animation: gnFog 20s ease-in-out infinite;
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 20px;
  background: radial-gradient(ellipse 90% 60% at 50% 110%, #1b0a33 0%, #0b0316 45%, #030106 80%);
}
.hero-tag {
  font-family: 'Press Start 2P', monospace; font-size: 10px; color: #8f6cc4;
  letter-spacing: 2px; margin-bottom: 26px; line-height: 1.9;
}
.hero-art { position: relative; width: min(560px, 86vw); animation: gnFloat 7s ease-in-out infinite; }
.hero-glow {
  position: absolute; inset: -12%;
  background: radial-gradient(circle at 50% 45%, rgba(232,193,90,.22), transparent 60%);
  filter: blur(24px);
}
.hero-art img { width: 100%; display: block; mix-blend-mode: screen; position: relative; }
.hero-title {
  margin: 18px 0 0; font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(64px, 14vw, 168px); line-height: .9; letter-spacing: .06em;
  background: linear-gradient(105deg, #7a5a18 0%, #e8c15a 25%, #fff3c4 50%, #e8c15a 75%, #7a5a18 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gnShimmer 8s linear infinite;
}
.hero-sub {
  font-family: 'Press Start 2P', monospace; font-size: clamp(10px, 2.4vw, 15px);
  color: #b79ae0; letter-spacing: 6px; margin-top: 10px;
}
.hero-copy {
  font-family: 'VT323', monospace; font-size: clamp(19px, 3vw, 24px);
  color: #9d8bc0; max-width: 460px; margin: 26px auto 0; line-height: 1.4;
}
.hero-ctas { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.hero-rare {
  font-family: 'Press Start 2P', monospace; font-size: 9px; color: #e8c15a;
  margin-top: 30px; letter-spacing: 2px; line-height: 1.9;
}

/* ---------- discovery ---------- */
.discovery {
  position: relative; padding: 18vh 20px; text-align: center;
  background: linear-gradient(180deg, #030106 0%, #0a0314 50%, #030106 100%);
  overflow: hidden;
}
.discovery-inner { position: relative; max-width: 640px; margin: 0 auto; }

/* ---------- fight ---------- */
.fight { position: relative; background: #030106; overflow: hidden; }
.fight img {
  width: 100%; display: block;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.fight-fog {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 50% 50%, rgba(90,36,160,.3), transparent 70%);
  filter: blur(50px); animation: gnFog 20s ease-in-out infinite;
}

/* ---------- pokedex ---------- */
.dex-section { position: relative; padding: 14vh 20px; background: #030106; }
.dex {
  max-width: 680px; margin: 0 auto; border: 1px solid #3a1f5e;
  background: linear-gradient(180deg, #0c0418, #070210);
  box-shadow: 0 0 60px rgba(74,42,114,.25), inset 0 0 40px rgba(0,0,0,.6);
}
.dex-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid #3a1f5e; background: rgba(58,31,94,.25);
}
.dex-led { width: 10px; height: 10px; border-radius: 50%; background: #e8c15a; box-shadow: 0 0 10px #e8c15a; flex: none; }
.dex-head-label { font-family: 'Press Start 2P', monospace; font-size: 9px; color: #b79ae0; letter-spacing: 2px; line-height: 1.9; }
.dex-err { margin-left: auto; font-family: 'Press Start 2P', monospace; font-size: 9px; color: #5c3d8a; }
.dex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.dex-name-row { grid-column: 1 / -1; padding: 22px 18px 6px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.dex-name { font-family: 'Bebas Neue', sans-serif; font-size: 44px; letter-spacing: .06em; color: #e8c15a; line-height: 1; }
.dex-no { font-family: 'Press Start 2P', monospace; font-size: 10px; color: #6b4a9e; }
.dex-cell { padding: 14px 18px; border-top: 1px solid rgba(58,31,94,.5); }
.dex-k { font-family: 'Press Start 2P', monospace; font-size: 8px; color: #6b4a9e; letter-spacing: 2px; margin-bottom: 8px; }
.dex-v { font-family: 'VT323', monospace; font-size: 22px; }
.dex-flavor { grid-column: 1 / -1; padding: 18px; border-top: 1px solid rgba(58,31,94,.5); background: rgba(0,0,0,.3); }
.dex-flavor .dex-k { margin-bottom: 10px; }
.dex-flavor-text { font-family: 'VT323', monospace; font-size: 23px; color: #cfc3e8; line-height: 1.4; }

/* ---------- card ---------- */
.card-section {
  position: relative; padding: 16vh 20px; text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, #120627 0%, #030106 70%);
}
.card-lead { margin: 18px auto 56px; }
.card-stage { display: inline-block; perspective: 1100px; }
.card3d {
  position: relative; width: min(400px, 82vw);
  transition: transform .25s ease-out; transform-style: preserve-3d; will-change: transform;
}
.card3d img {
  width: 100%; display: block; border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 60px rgba(140,80,220,.25);
}
.foil {
  position: absolute; inset: 0; border-radius: 16px;
  background: linear-gradient(115deg, transparent 30%, rgba(255,240,180,.25) 45%, rgba(190,120,255,.28) 52%, rgba(120,255,230,.18) 58%, transparent 70%);
  background-size: 250% 250%; background-position: 50% 50%;
  mix-blend-mode: screen; pointer-events: none; opacity: .7;
}
.card-hint {
  font-family: 'Press Start 2P', monospace; font-size: 8px; color: #5c3d8a;
  letter-spacing: 2px; margin-top: 34px; line-height: 1.8; padding: 0 12px;
}
.hint-touch { display: none; }
/* touch devices: card sways on its own, hint changes */
@media (hover: none) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
  .card3d { animation: gnCardSway 9s ease-in-out infinite; }
  .foil { animation: gnFoilSway 9s ease-in-out infinite; }
}

/* ---------- final ---------- */
.final {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px; background: #020104; overflow: hidden;
}
.final-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0); transition: filter 3.5s ease;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 85%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 85%, transparent 100%);
}
.final-bg.lit { filter: brightness(1); }
.final-fog {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 50% 50%, rgba(90,36,160,.3), transparent 70%);
  filter: blur(50px); animation: gnFog 20s ease-in-out infinite;
}
.final-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(2,1,4,.35) 0%, rgba(2,1,4,.55) 100%);
}
.final-text {
  position: relative; opacity: 0; transform: translateY(12px);
  transition: opacity 2.5s ease 1.2s, transform 2.5s ease 1.2s;
}
.final-text.on { opacity: 1; transform: translateY(0); }
.final-line {
  font-family: 'Press Start 2P', monospace; font-size: clamp(13px, 3vw, 20px);
  color: #e6d9ff; letter-spacing: 3px; line-height: 1.8; margin-top: 36px;
}
.final-q { font-family: 'VT323', monospace; font-size: 24px; color: #8f6cc4; margin-top: 14px; }
.final-ctas {
  display: flex; gap: 18px; justify-content: center; margin-top: 36px;
  position: relative; min-height: 60px; flex-wrap: wrap;
}
#runBtn { transition: transform .18s ease; position: relative; }
.final-msg { font-family: 'VT323', monospace; font-size: 19px; color: #4a3670; margin-top: 26px; min-height: 24px; }
/* ---------- footer / disclaimer ---------- */
.site-footer {
  position: relative; background: #020104; border-top: 1px solid #2a1848;
  padding: 56px 20px 40px; text-align: center;
}
.disclaimer {
  max-width: 720px; margin: 0 auto; border: 1px solid #4a2a72;
  background: rgba(10, 4, 18, .65); padding: 28px 26px 20px;
  box-shadow: 0 0 40px rgba(74, 42, 114, .2);
}
.disclaimer-title {
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: #e8c15a;
  letter-spacing: 3px; line-height: 1.9; margin-bottom: 18px;
}
.disclaimer-text {
  font-family: 'VT323', monospace; font-size: 21px; color: #9d8bc0;
  line-height: 1.5; margin: 0 0 14px;
}
.disclaimer-text strong { color: #e6d9ff; font-weight: normal; }
.footer-line {
  font-family: 'Press Start 2P', monospace; font-size: 8px; color: #33235a;
  letter-spacing: 2px; padding: 34px 16px 0; line-height: 1.9;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .final-text { transition: none; }
  .final-bg { transition: none; }
  .particles { display: none; }
}
