/*
 * Estilos compartidos entre game.html y practice.html: variables de diseño, reset,
 * fondo animado con blobs, botones base y el input/botón de micrófono. Cada página
 * carga este archivo antes de su propio <style>, así que sus reglas actúan como
 * base y cada página puede sobreescribir puntualmente (ej. tamaños de .btn) con
 * más reglas propias más abajo en el documento.
 */

:root {
  --bg1: #4361ee;
  --bg2: #7209b7;
  --pink: #f72585;
  --cyan: #4cc9f0;
  --gold: #ffd60a;
  --green: #2ec4b6;
  --red: #ff4d6d;
  --ink: #1b1b2f;
  --muted: #6b7480;
  --card: #ffffff;
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
}

@keyframes bgShift {
  0%, 100% { background-position: 0% 30%; }
  50% { background-position: 100% 70%; }
}

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.blob-a { width: 240px; height: 240px; background: var(--cyan); top: -60px; left: -60px; animation: floatA 14s ease-in-out infinite; }
.blob-b { width: 300px; height: 300px; background: var(--gold); bottom: -80px; right: -80px; animation: floatB 16s ease-in-out infinite; }
.blob-c { width: 180px; height: 180px; background: var(--green); bottom: 30%; left: -60px; animation: floatA 12s ease-in-out infinite reverse; }

@keyframes floatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.15); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, -30px) scale(1.1); }
}

h1, h2, h3 { font-family: "Baloo 2", sans-serif; margin: 0; }

.btn:active { transform: scale(0.96); }
.btn-primary:active { box-shadow: 0 2px 0 #b5179e, 0 4px 10px rgba(247, 37, 133, 0.35); }
.btn-ghost:active { background: rgba(255,255,255,0.3); }

.title span {
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.guess-input {
  flex: 1;
  min-width: 0;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  outline: none;
  color: var(--ink);
}
.guess-input:focus { box-shadow: 0 0 0 3px var(--gold); }

.btn-mic {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn-mic:active { transform: scale(0.9); }
.btn-mic.listening {
  background: linear-gradient(135deg, var(--red), var(--pink));
  color: #fff;
  animation: micPulse 1.1s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 4px 10px rgba(0,0,0,0.18), 0 0 0 0 rgba(255,77,109,0.55); }
  50% { box-shadow: 0 4px 10px rgba(0,0,0,0.18), 0 0 0 9px rgba(255,77,109,0); }
}

.toast.show { transform: translate(-50%, 0); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Animación compartida del nombre grande al acertar/fallar (game.html: .answer-name;
   practice.html: .spotlight-name) — cada página define su propio tamaño/color. */
@keyframes answerNamePop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
