/* ================================
   style.css — EDEN BIZARRO 3.0
   ================================
   Fuentes, layout, botones globales, animaciones y utilidades.
   Diseñado para funcionar con index.html y app.js entregados.
*/

/* ---------- FUENTES ---------- */
@import url('https://fonts.googleapis.com/css?family=Press+Start+2P|Orbitron:900&display=swap');

:root{
  --neon-1: #ff1ecb;
  --neon-2: #00ffe8;
  --neon-3: #ffec00;
  --bg-dark: #050005;
  --glass: rgba(255,255,255,0.03);
  --accent: #ff00ff;
}

/* ---------- RESET / BASE ---------- */
*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  padding:0;
  font-family: 'Press Start 2P', cursive;
  color:#fff;
  background: var(--bg-dark) url('https://media.giphy.com/media/yidUztQ6R16pFAV0I4/giphy.gif') center/cover fixed no-repeat;
  background-size: cover;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x: hidden;
  transition: background .4s ease, filter .4s ease, transform .25s ease;
  perspective: 1200px;
}

/* overlay giratorio sutil */
body::before{
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-conic-gradient(var(--neon-1)22, var(--neon-2)22 30deg, var(--neon-3)22 60deg);
  opacity: .18;
  pointer-events: none;
  z-index: 2;
  animation: overlaySpin 28s linear infinite;
}
@keyframes overlaySpin { 0%{ transform: rotate(0deg)} 100%{ transform: rotate(360deg)} }

/* ---------- CONTENEDORES PRINCIPALES ---------- */
#neon-banner{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  text-align: center;
  z-index: 99999;
  backdrop-filter: blur(6px) saturate(1.2);
  background: linear-gradient(90deg, rgba(0,0,0,0.25), rgba(0,0,0,0.12));
  border-bottom: 2px solid rgba(255,255,255,0.03);
}

header{
  text-align: center;
  padding: 86px 12px 22px;
  z-index: 10;
  position: relative;
}
.title{
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem;
  margin: 0;
  letter-spacing: .12em;
  text-shadow: 0 0 14px var(--neon-3), 0 0 26px var(--neon-1), 0 0 40px var(--neon-2);
}
.subtitle{
  margin: 8px 0 6px;
  color: var(--neon-1);
  font-size: .95rem;
}
.instructions{
  font-size: .83rem;
  color: var(--neon-2);
}

/* ---------- MARQUEE ---------- */
.marquee{
  width: 100%;
  overflow: hidden;
  border-top: 4px solid var(--neon-1);
  border-bottom: 4px solid var(--neon-3);
  margin-bottom: 30px;
  box-shadow: inset 0 0 28px rgba(255,30,203,0.08);
  z-index: 9;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
}
.marquee-content{
  display:inline-block;
  padding-left: 100%;
  animation: scrollMarquee 16s linear infinite;
  font-size: 1.6rem;
  color: var(--neon-2);
  text-shadow: 0 0 10px var(--neon-1);
  white-space: nowrap;
}
@keyframes scrollMarquee{ 0%{ transform: translateX(0%);} 100%{ transform: translateX(-100%);} }

/* ---------- GALERÍA ---------- */
.gallery{
  display:flex;
  gap:20px;
  justify-content:center;
  flex-wrap:wrap;
  margin: 0 12px 44px;
  z-index: 8;
}
.gallery img{
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid var(--neon-1);
  box-shadow: 0 0 20px rgba(255,236,0,0.12), 0 0 36px var(--neon-1);
  filter: grayscale(.6) contrast(1.6) hue-rotate(45deg);
  transition: transform .36s ease, filter .36s ease, box-shadow .36s ease;
  transform-origin: center;
}
.gallery img:hover{
  transform: rotate(-14deg) scale(1.45) perspective(500px) rotateY(18deg);
  filter: hue-rotate(160deg) saturate(2) brightness(1.05);
  box-shadow: 0 12px 60px rgba(0,0,0,0.5), 0 0 60px var(--neon-2);
}

/* ---------- COLLAGE / MOSAICO ---------- */
#collage img{ width:100%; height:auto; display:block; border-radius:8px; }

/* ---------- BOTONES: GLOBAL (CUBRE ESTÁTICOS Y DINÁMICOS) ---------- */
button{
  box-sizing: border-box;
  font-family: 'Orbitron', sans-serif;
  font-size: .95rem;
  color: #0b0010 !important;        /* texto oscuro para contraste con gradiente */
  padding: 12px 18px;
  margin: 6px;
  border-radius: 14px;
  border: 3px solid rgba(255,255,255,0.12);
  background: linear-gradient(135deg, var(--neon-1), var(--neon-2), var(--neon-3));
  background-size: 400% 400%;
  text-shadow: 0 0 6px rgba(255,255,255,0.7);
  box-shadow: 0 10px 36px rgba(0,0,0,0.55), 0 0 28px var(--neon-1);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
  -webkit-tap-highlight-color: transparent;
  z-index: 10;
}

/* hover & movimiento llamativo */
button:hover{
  transform: translateY(-6px) rotate(-3deg) scale(1.07);
  filter: saturate(1.25) brightness(1.03);
  animation: buttonGradient 2s ease-in-out infinite;
  box-shadow: 0 24px 72px rgba(0,0,0,0.6), 0 0 60px var(--neon-2);
}
@keyframes buttonGradient{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

/* estado visual al tocar el botón (app.js usa la clase .btn-hit) */
button.btn-hit{
  animation: btn-hit 650ms cubic-bezier(.4,.9,.2,1);
  transform: rotate(8deg) scale(1.16) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,0.6), 0 0 80px var(--neon-1) !important;
}
@keyframes btn-hit{
  0%{ transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 6px var(--neon-1)); }
  50%{ transform: rotate(12deg) scale(1.3); filter: drop-shadow(0 0 18px var(--neon-2)); }
  100%{ transform: rotate(8deg) scale(1.16); }
}

/* clase para borde aleatorio (aplicada temporalmente por JS) */
button.borders-random{
  border-style: dashed !important;
  border-width: 4px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 60px var(--neon-2) inset !important;
}

/* específico para el botón del mini-juego para destacarlo */
#rapidButton{
  background: linear-gradient(45deg,#ff4b4b,#ff00ff);
  color: #fff !important;
  border: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 48px rgba(0,0,0,0.6), 0 0 36px #ff00ff;
  font-weight: bold;
}

/* ---------- CLASES Y EFECTOS GLOBALES USADOS POR app.js ---------- */
/* shake de página */
.effect-shake{
  animation: page-shake .06s infinite;
}
@keyframes page-shake{
  0%{ transform: translate(0,0) }
  50%{ transform: translate(8px,-6px) rotate(.8deg) }
  100%{ transform: translate(-6px,6px) rotate(-.6deg) }
}

/* glitch de títulos */
.effect-glitch{
  animation: glitch-shadow .12s steps(2) 5;
}
@keyframes glitch-shadow{
  0%{ text-shadow: 2px 2px var(--neon-1); transform: translate(0,0) }
  50%{ text-shadow: -6px -4px var(--neon-2); transform: translate(6px,-6px) skewX(6deg) }
  100%{ text-shadow: 2px 6px var(--neon-3); transform: translate(0,0) }
}

/* pulse del body */
.effect-pulse{
  animation: pulseBody .45s infinite alternate;
}
@keyframes pulseBody{
  from{ transform: scale(1); filter: drop-shadow(0 0 6px var(--neon-1)); }
  to{ transform: scale(1.03); filter: drop-shadow(0 0 28px var(--neon-2)); }
}

/* sprites base (creados por JS) */
.sprite-float{
  position: fixed;
  width: 80px;
  pointer-events: none;
  z-index: 9999;
  transition: top 900ms ease, left 900ms ease, transform 800ms ease;
}

/* secreto (oculto por defecto) */
#txtSecreto{
  display:none;
  position: fixed;
  left:50%;
  top:22%;
  transform: translateX(-50%);
  z-index:10002;
  padding: 14px 18px;
  border: 4px double var(--neon-1);
  background: rgba(0,0,0,0.88);
  color: var(--neon-3);
  border-radius: 12px;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 10px var(--neon-1);
}

/* small toast usado por popup fallback */
.toast {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 22000;
  padding: 10px 14px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  border-radius: 8px;
  font-family: 'Orbitron', sans-serif;
  box-shadow: 0 8px 36px rgba(0,0,0,0.6);
}

/* ---------- TARJETAS / SECCIONES ---------- */
section{ margin: 18px 12px; z-index: 6; }
h2{ margin: 6px 0 12px; font-family: 'Orbitron', sans-serif; color: var(--neon-3); }
.secret-card{ padding:10px; border-radius:10px; background: rgba(255,30,203,0.06); min-width:180px; }

/* mini-game panel */
#miniScore, #miniTime{
  font-family: 'Orbitron', sans-serif;
  color: var(--neon-1);
}

/* cronómetro display */
#chronoDisplay{ font-family: 'Orbitron', sans-serif; color: var(--neon-2); }

/* float phrases */
.float-phrase{
  color: rgba(255,255,255,0.9);
  font-weight: 700;
  text-shadow: 0 0 8px var(--neon-1);
  font-family: 'Orbitron', sans-serif;
}

/* footer */
footer{ text-align:center; margin: 28px 12px 80px; color:#ccc; z-index:4; }
#footer-phrase{ font-family: 'Orbitron', sans-serif; color: var(--neon-3); text-shadow: 0 0 8px var(--neon-1); }

/* ascii / pre */
pre{ font-family: 'Courier New', monospace; color: #ddd; }

/* responsive */
@media (max-width: 820px){
  .title{ font-size: 1.6rem; letter-spacing: .06em; }
  .marquee-content{ font-size: 1.05rem; }
  .gallery img{ width: 96px; height: 96px; }
  button{ font-size: .86rem; padding: 10px 12px; margin: 6px; }
  #neon-banner{ padding: 6px 8px; font-size: .85rem; }
}

/* accessibility small focus style */
button:focus{
  outline: 3px solid rgba(255,236,0,0.22);
  outline-offset: 4px;
  transform: translateY(-4px) scale(1.03);
}

/* small utility classes (por si JS decide añadir) */
.hidden { display:none !important; }
.center { text-align:center; }
.grid-cols { display:grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap:12px; }
