/* ═══════════════════════════════════════════════════════════
   Academia Espacial 5.0 — CSS
   Aesthetic: Deep Space Luxury · Neon Accents · Glassmorphism
   ═══════════════════════════════════════════════════════════ */

/* ── Custom Properties ── */
:root {
  /* Palette */
  --ink:    #03040e;
  --deep:   #070920;
  --mid:    #0d1240;
  --glass:  rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.10);
  --blue:   #00d4ff;
  --purple: #b44fff;
  --yellow: #ffd84d;
  --green:  #32ff82;
  --pink:   #ff4f9a;
  --orange: #ff8c2a;
  --red:    #ff3f55;
  --white:  #ffffff;

  /* Glows */
  --gb: 0 0 28px rgba(0,212,255,0.55);
  --gp: 0 0 28px rgba(180,79,255,0.55);
  --gy: 0 0 28px rgba(255,216,77,0.55);
  --gg: 0 0 28px rgba(50,255,130,0.55);
  --gk: 0 0 28px rgba(255,79,154,0.55);

  /* Typography */
  --font-display: 'Baloo 2', cursive;
  --font-body:    'Nunito', sans-serif;

  /* Radii */
  --r-xl:   28px;
  --r-lg:   20px;
  --r-md:   14px;
  --r-pill: 999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ── Starfield Canvas ── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ── Utility Classes ── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ── Screens ── */
.screen {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 80px 16px 32px;
}
.screen.active {
  display: flex;
}
.screen.no-hud {
  padding-top: 16px;
}

/* ════════════════════════════════════════════
   GLOBAL HUD
════════════════════════════════════════════ */
.global-hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: rgba(3, 4, 14, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.ghud-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ghud-avatar {
  font-size: 1.7rem;
  filter: drop-shadow(0 0 10px var(--blue));
  animation: float 4s ease-in-out infinite;
}
.ghud-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ghud-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--yellow);
  text-shadow: var(--gy);
  line-height: 1;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ghud-level {
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--purple);
  color: var(--white);
  padding: 1px 8px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}
.ghud-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hud-btn {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: var(--r-pill);
  padding: 7px 13px;
  font-size: 1rem;
  transition: background 0.2s, transform 0.15s;
}
.hud-btn:hover {
  background: rgba(255,255,255,0.14);
  transform: scale(1.06);
}
.hud-btn:active {
  transform: scale(0.93);
}
.hud-btn.mute-btn.muted {
  background: rgba(255,79,154,0.2);
  border-color: var(--pink);
}
.hud-btn.exit-btn {
  border-color: rgba(255,63,85,0.5);
  color: var(--red);
}
.hud-btn.settings-btn {
  border-color: rgba(255,216,77,0.4);
}

/* ════════════════════════════════════════════
   GAUCHO NARRATOR
════════════════════════════════════════════ */
.gaucho-wrap {
  position: fixed;
  bottom: 18px;
  left: 16px;
  z-index: 800;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.gaucho-skip {
  position: absolute;
  top: -12px;
  right: 0;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 0.75rem;
  pointer-events: all;
  z-index: 1;
  transition: background 0.2s;
}
.gaucho-skip:hover { background: rgba(255,255,255,0.18); }
.gaucho-inner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.gaucho-char {
  font-size: 2.8rem;
  filter: drop-shadow(0 0 14px var(--yellow));
  animation: float 3.5s ease-in-out infinite;
  flex-shrink: 0;
  user-select: none;
}
.gaucho-bubble {
  background: rgba(7, 9, 32, 0.96);
  border: 2px solid var(--yellow);
  border-radius: 18px 18px 18px 6px;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
  box-shadow: var(--gy);
  position: relative;
  pointer-events: all;
}
.gaucho-bubble p { margin: 0; }
.gaucho-dots {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.gaucho-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.gaucho-dots span:nth-child(2) { animation-delay: 0.2s; }
.gaucho-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%       { opacity: 1;   transform: translateY(-4px); }
}

/* ════════════════════════════════════════════
   ONBOARDING
════════════════════════════════════════════ */
.ob-card {
  width: 100%;
  max-width: 560px;
  margin: auto;
  background: linear-gradient(145deg, rgba(13,18,64,0.97), rgba(26,10,52,0.97));
  border: 1.5px solid rgba(0,212,255,0.35);
  border-radius: var(--r-xl);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--gb), inset 0 0 80px rgba(0,212,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: riseIn 0.5s var(--ease-spring);
}
.ob-header {
  text-align: center;
}
.ob-rocket-rig {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}
.ob-rocket {
  font-size: 3.6rem;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 16px var(--blue));
  display: block;
}
.ob-trail {
  font-size: 1.6rem;
  animation: trailFlicker 0.35s ease-in-out infinite alternate;
  margin-top: -8px;
}
.ob-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 0 20px var(--blue);
}
.ob-title em {
  font-style: normal;
  color: var(--yellow);
  text-shadow: var(--gy);
}
.ob-title sup {
  font-size: 0.45em;
  color: var(--green);
  text-shadow: var(--gg);
  vertical-align: super;
}
.ob-tagline {
  margin-top: 8px;
  opacity: 0.65;
  font-size: 0.92rem;
}
.section-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 12px;
}
/* Avatar grid */
.avatar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--glass);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--white);
  transition: all 0.2s var(--ease-spring);
}
.avatar-btn:hover {
  border-color: var(--blue);
  background: rgba(0,212,255,0.1);
  transform: translateY(-3px);
}
.avatar-btn:active { transform: scale(0.95); }
.avatar-btn.selected {
  border-color: var(--blue);
  background: rgba(0,212,255,0.18);
  box-shadow: var(--gb);
}
.av-emoji { font-size: 2.8rem; display: block; }
.av-name  { font-size: 0.8rem; font-weight: 700; text-align: center; line-height: 1.3; opacity: 0.85; }
/* Name input */
.ob-name-section { display: flex; flex-direction: column; gap: 8px; }
.ob-input {
  width: 100%;
  padding: 14px 20px;
  background: rgba(255,255,255,0.07);
  border: 2px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ob-input:focus {
  border-color: var(--blue);
  box-shadow: var(--gb);
}
.ob-input::placeholder { opacity: 0.35; }
.input-hint { font-size: 0.75rem; opacity: 0.45; }

/* ════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--blue), #0052ff);
  border: none;
  border-radius: var(--r-pill);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: var(--gb);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}
.btn-primary:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 44px rgba(0,212,255,0.7);
}
.btn-primary:active:not(:disabled) { transform: scale(0.95); }
.btn-primary:disabled { opacity: 0.32; cursor: not-allowed; }
.btn-primary.btn-launch {
  width: 100%;
  font-size: 1.2rem;
  padding: 18px;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--glass);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.2s, transform 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.14); transform: scale(1.03); }
.btn-secondary:active { transform: scale(0.95); }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.15s;
}
.btn-back:hover { background: rgba(255,255,255,0.14); }
.btn-back:active { transform: scale(0.95); }

/* ════════════════════════════════════════════
   SETTINGS
════════════════════════════════════════════ */
.settings-card {
  width: 100%;
  max-width: 640px;
  margin: auto;
  background: linear-gradient(145deg, rgba(13,18,64,0.97), rgba(18,10,40,0.97));
  border: 1.5px solid rgba(180,79,255,0.35);
  border-radius: var(--r-xl);
  padding: clamp(22px, 5vw, 44px);
  box-shadow: var(--gp);
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: riseIn 0.4s var(--ease-spring);
}
.settings-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--purple);
  text-shadow: var(--gp);
}
.settings-sub { font-size: 0.85rem; opacity: 0.6; }
.settings-body { display: flex; flex-direction: column; gap: 22px; }
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: none;
}
.setting-label {
  font-weight: 800;
  font-size: 0.9rem;
  opacity: 0.8;
  display: block;
}
.setting-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.sopt {
  padding: 12px 18px;
  background: var(--glass);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.2s;
  min-width: 120px;
}
.sopt small {
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.65;
}
.sopt:hover { border-color: var(--blue); background: rgba(0,212,255,0.1); }
.sopt.active {
  border-color: var(--blue);
  background: rgba(0,212,255,0.18);
  box-shadow: var(--gb);
}
.pin-setup-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pin-field {
  width: 130px;
  padding: 12px 16px;
  background: var(--glass);
  border: 2px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.4em;
  transition: border-color 0.2s;
}
.pin-field:focus { border-color: var(--yellow); }
.pin-status-line { font-size: 0.82rem; opacity: 0.6; }
.pin-status-line strong { color: var(--yellow); }

/* ════════════════════════════════════════════
   HUB
════════════════════════════════════════════ */
.hub-header {
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hub-logo { display: flex; align-items: center; gap: 14px; }
.hub-rocket {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px var(--blue));
}
.hub-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 0 18px var(--blue);
}
.hub-title mark {
  background: none;
  color: var(--yellow);
  text-shadow: var(--gy);
}
.hub-welcome { font-size: 0.88rem; opacity: 0.7; margin-top: 4px; }
.hub-welcome strong { color: var(--yellow); }
.hub-medals-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 8px 16px;
}
.medals-row { display: flex; gap: 6px; font-size: 1.3rem; min-height: 24px; flex-wrap: wrap; }

/* Hub Gaucho bar */
.hub-gaucho {
  width: 100%;
  max-width: 1000px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,216,77,0.07);
  border: 1px solid rgba(255,216,77,0.2);
  border-radius: var(--r-lg);
  padding: 12px 18px;
  margin-bottom: 20px;
}
.hg-avatar {
  font-size: 2.2rem;
  animation: float 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px var(--yellow));
  flex-shrink: 0;
}
.hg-bubble {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255,216,77,0.9);
}

/* Game grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 1000px;
}
.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 18px;
  border-radius: var(--r-xl);
  border: 1.5px solid transparent;
  color: var(--white);
  text-align: center;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.25s;
  min-height: 220px;
  cursor: pointer;
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.08), transparent 70%);
}
.game-card:hover { transform: translateY(-6px) scale(1.02); }
.game-card:hover::before { opacity: 1; }
.game-card:active { transform: scale(0.97); }
.gc-icon   { font-size: 2.6rem; display: block; position: relative; z-index: 1; }
.gc-planet {
  font-size: 1.8rem;
  position: absolute;
  top: 14px; right: 14px;
  animation: float 5s ease-in-out infinite;
  opacity: 0.55;
}
.game-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 800;
  line-height: 1.2;
  position: relative; z-index: 1;
}
.game-card p {
  font-size: 0.82rem;
  opacity: 0.78;
  line-height: 1.5;
  position: relative; z-index: 1;
}
.gc-tag {
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(255,255,255,0.13);
  border-radius: var(--r-pill);
  padding: 3px 12px;
  position: relative; z-index: 1;
}
/* Card variants */
.gcard-math   { background: linear-gradient(145deg,#0d1a4a,#1a0d3a); border-color: var(--blue);   box-shadow:0 0 26px rgba(0,212,255,.15); }
.gcard-lang   { background: linear-gradient(145deg,#1a0d3a,#0a1a2e); border-color: var(--purple); box-shadow:0 0 26px rgba(180,79,255,.15); }
.gcard-trivia { background: linear-gradient(145deg,#1a2e0a,#0a2e1a); border-color: var(--green);  box-shadow:0 0 26px rgba(50,255,130,.15); }
.gcard-radar  { background: linear-gradient(145deg,#2e1a0a,#1a0a0a); border-color: var(--orange); box-shadow:0 0 26px rgba(255,140,42,.15); }
.gcard-cuentos{ background: linear-gradient(145deg,#0a1a2e,#1a0a2e); border-color: var(--yellow); box-shadow:0 0 26px rgba(255,216,77,.15); }
.gcard-math:hover   { box-shadow:0 0 48px rgba(0,212,255,.5),  0 12px 40px rgba(0,0,0,0.4); }
.gcard-lang:hover   { box-shadow:0 0 48px rgba(180,79,255,.5), 0 12px 40px rgba(0,0,0,0.4); }
.gcard-trivia:hover { box-shadow:0 0 48px rgba(50,255,130,.5), 0 12px 40px rgba(0,0,0,0.4); }
.gcard-radar:hover  { box-shadow:0 0 48px rgba(255,140,42,.5), 0 12px 40px rgba(0,0,0,0.4); }
.gcard-cuentos:hover{ box-shadow:0 0 48px rgba(255,216,77,.5), 0 12px 40px rgba(0,0,0,0.4); }

/* Ranking */
.ranking-section {
  width: 100%;
  max-width: 680px;
  margin-top: 28px;
  padding: 0 4px;
}
.ranking-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--yellow);
  text-shadow: var(--gy);
  text-align: center;
  margin-bottom: 14px;
}
.ranking-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px 16px;
}
.rank-pos  { font-family: var(--font-display); font-size: 1.15rem; min-width: 30px; text-align: center; }
.rp-gold   { color: #ffd700; }
.rp-silver { color: #c0c0c0; }
.rp-bronze { color: #cd7f32; }
.rank-av   { font-size: 1.4rem; }
.rank-name { flex: 1; font-weight: 700; font-size: 0.92rem; }
.rank-score{ font-family: var(--font-display); color: var(--yellow); }
.rank-empty{ text-align: center; opacity: 0.4; padding: 14px; font-size: 0.88rem; }

/* ════════════════════════════════════════════
   SHARED GAME UI
════════════════════════════════════════════ */
/* Topbar */
.game-topbar {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.topbar-title {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 3vw, 1.45rem);
  font-weight: 800;
  flex: 1;
  text-align: center;
  text-shadow: 0 0 14px var(--blue);
}
.score-pill {
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 7px 16px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: var(--gy);
  min-width: 76px;
  text-align: center;
}
/* Mascot bar */
.mascot-bar {
  width: 100%;
  max-width: 700px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.mascot-emoji {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px var(--blue));
  animation: bounce 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
.mascot-bubble {
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.28);
  border-radius: 4px 18px 18px 18px;
  padding: 10px 15px;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.45;
  transition: all 0.3s;
}
.mascot-bubble.happy { background: rgba(50,255,130,0.12); border-color: rgba(50,255,130,0.35); color: var(--green); }
.mascot-bubble.sad   { background: rgba(255,79,154,0.1);  border-color: rgba(255,79,154,0.3);  color: var(--pink);  }
/* Mode select */
.mode-select {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.mode-select h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--yellow);
  text-shadow: var(--gy);
}
.mode-select p { opacity: 0.75; font-size: 0.95rem; line-height: 1.6; max-width: 480px; }
.mode-btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.mode-btn {
  padding: 18px 24px;
  background: linear-gradient(145deg, var(--mid), #0d1a3a);
  border: 2px solid var(--blue);
  border-radius: var(--r-xl);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  min-width: 145px;
  transition: all 0.2s var(--ease-spring);
  box-shadow: var(--gb);
}
.mode-btn:hover { transform: scale(1.07); box-shadow: 0 0 36px rgba(0,212,255,0.65); }
.mode-btn:active { transform: scale(0.95); }
.mode-btn-all { border-color: var(--green); box-shadow: var(--gg); background: linear-gradient(145deg,#0d3a1a,#1a0d3a); }
.mode-btn-all:hover { box-shadow: 0 0 36px rgba(50,255,130,0.65); }
/* Radar pulse */
.radar-pulse {
  font-size: 4rem;
  animation: radarSpin 3s linear infinite;
  filter: drop-shadow(0 0 16px var(--blue));
}
/* Feedback */
.feedback-line {
  font-family: var(--font-display);
  font-size: 1.2rem;
  min-height: 34px;
  text-align: center;
  transition: color 0.2s;
}
.feedback-line.correct { color: var(--green); text-shadow: var(--gg); animation: bounceIn 0.35s; }
.feedback-line.wrong   { color: var(--pink);  text-shadow: var(--gk); animation: shake 0.4s; }
/* Progress dots */
.progress-dots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pdot {
  width: 15px; height: 15px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.3s;
}
.pdot.correct { background: var(--green); border-color: var(--green); box-shadow: var(--gg); }
.pdot.wrong   { background: var(--pink);  border-color: var(--pink); }

/* History capsule */
.history-capsule {
  width: 100%;
  max-width: 560px;
  background: rgba(255,216,77,0.08);
  border: 1px solid rgba(255,216,77,0.28);
  border-radius: var(--r-md);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeUp 0.4s ease;
}
.history-capsule span { font-size: 1.3rem; flex-shrink: 0; }
.history-capsule p   { font-size: 0.86rem; line-height: 1.55; opacity: 0.88; }

/* Summary overlay */
.summary-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3,4,14,0.95);
  backdrop-filter: blur(12px);
  padding: 20px;
}
.summary-card {
  background: linear-gradient(145deg, #0d1a4a, #1a0d3a);
  border: 1.5px solid var(--purple);
  border-radius: var(--r-xl);
  padding: clamp(22px, 5vw, 46px);
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--gp), 0 24px 60px rgba(0,0,0,0.5);
  animation: riseIn 0.4s var(--ease-spring);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.sum-av {
  font-size: 3rem;
  animation: float 2.5s ease-in-out infinite;
}
.sum-trophy {
  font-size: 3.5rem;
  animation: bounce 1.2s ease-in-out infinite;
}
.summary-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--yellow);
}
.summary-card p { opacity: 0.85; line-height: 1.65; }
.sum-medals { display: flex; gap: 10px; justify-content: center; font-size: 1.9rem; }
.sum-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Launch screen */
.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #0d1a3a 0%, var(--ink) 70%);
  overflow: hidden;
}
.launch-rocket {
  font-size: 5.5rem;
  animation: launchUp 2.8s cubic-bezier(0.2,0,0.8,1) forwards;
  filter: drop-shadow(0 0 20px var(--blue));
}
.launch-fire {
  font-size: 2.5rem;
  margin-top: -14px;
  animation: trailFlicker 0.3s infinite alternate;
}
.launch-label {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--yellow);
  text-shadow: var(--gy);
  text-align: center;
  padding: 20px;
  animation: fadeUp 0.5s ease 0.4s backwards;
}
.burst-layer { position: absolute; inset: 0; pointer-events: none; }
.burst-star {
  position: absolute;
  font-size: 1.3rem;
  animation: burst 1.6s ease-out forwards;
}

/* ════════════════════════════════════════════
   MATH GAME
════════════════════════════════════════════ */
.math-arena {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.fuel-bar-wrap {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fuel-bar {
  flex: 1;
  height: 28px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(0,212,255,0.35);
  overflow: hidden;
}
.fuel-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0080ff, var(--blue), var(--green));
  border-radius: var(--r-pill);
  transition: width 0.55s var(--ease-spring);
  box-shadow: 0 0 12px var(--blue);
}
.math-planet {
  font-size: clamp(3rem, 9vw, 5rem);
  animation: float 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(255,255,255,0.25));
}
.math-dest-label { font-size: 0.88rem; opacity: 0.65; margin-top: -10px; }
.math-dest-label strong { color: var(--yellow); }
.question-card {
  width: 100%;
  background: linear-gradient(145deg, rgba(26,31,74,0.95), rgba(13,17,51,0.95));
  border: 2px solid var(--purple);
  border-radius: var(--r-xl);
  padding: 28px 36px;
  text-align: center;
  box-shadow: var(--gp);
  animation: pulseBorder 2.8s ease-in-out infinite;
}
.math-visual {
  font-size: 1.5rem;
  min-height: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}
.math-eq {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 800;
  text-shadow: 0 0 16px var(--purple);
  letter-spacing: 3px;
}
/* MC grid */
.mc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
.mc-btn {
  padding: 18px 14px;
  background: var(--glass);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  transition: all 0.18s var(--ease-spring);
}
.mc-btn:hover:not(:disabled) {
  border-color: var(--blue);
  background: rgba(0,212,255,0.15);
  transform: scale(1.06);
}
.mc-btn.mc-correct { border-color:var(--green);background:rgba(50,255,130,.2);box-shadow:var(--gg);animation:bounceIn .4s; }
.mc-btn.mc-wrong   { border-color:var(--pink); background:rgba(255,79,154,.15);animation:shake .4s; }
.mc-btn.mc-dim     { opacity: 0.28; }
/* Input row */
.input-row {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  flex-wrap: wrap;
  justify-content: center;
}
.ans-input {
  flex: 1;
  min-width: 120px;
  padding: 14px 18px;
  background: var(--glass);
  border: 2px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}
.ans-input::-webkit-outer-spin-button,
.ans-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ans-input:focus { border-color: var(--blue); box-shadow: var(--gb); }

/* ════════════════════════════════════════════
   LANG GAME
════════════════════════════════════════════ */
.lang-panel {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.lang-prog-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.lang-prog-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
}
.word-card {
  width: 100%;
  background: linear-gradient(145deg, rgba(26,10,50,0.95), rgba(10,10,40,0.95));
  border: 2px solid var(--purple);
  border-radius: var(--r-xl);
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--gp);
}
.word-emoji {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 10px;
  animation: float 3s ease-in-out infinite;
}
.word-hint { font-size: 0.95rem; font-weight: 700; opacity: 0.8; margin-bottom: 18px; }
.word-blanks {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.blank-cell {
  width: 46px; height: 54px;
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.blank-cell.filled   { border-color: var(--blue); background: rgba(0,212,255,0.14); }
.blank-cell.bc-ok    { border-color: var(--green); background: rgba(50,255,130,0.2); color: var(--green); }
.blank-cell.bc-wrong { border-color: var(--pink); animation: shake 0.35s; }
.letter-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 440px;
}
.letter-btn {
  width: 46px; height: 46px;
  background: var(--glass);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  transition: all 0.18s var(--ease-spring);
}
.letter-btn:hover:not(:disabled) {
  border-color: var(--blue);
  background: rgba(0,212,255,0.18);
  transform: scale(1.12);
}
.letter-btn:disabled { opacity: 0.22; cursor: not-allowed; }
/* Sopa */
.sopa-instr {
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0.8;
  text-align: center;
  padding: 6px;
  max-width: 600px;
}
.sopa-wrap { overflow-x: auto; max-width: 100%; padding: 8px 0; }
.sopa-grid {
  display: inline-grid;
  gap: 2px;
  background: rgba(13,18,64,0.9);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px;
}
.sc {
  width: 33px; height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.sc:hover    { background: rgba(0,212,255,0.22); }
.sc.sc-sel   { background: rgba(0,212,255,0.32); border: 1px solid var(--blue); }
.sc.sc-found { background: rgba(50,255,130,0.25); color: var(--green); border: 1px solid var(--green); }
.sopa-chips  { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 500px; }
.sopa-chip {
  padding: 5px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  font-weight: 700;
  font-size: 0.82rem;
}
.sopa-chip.chip-found {
  border-color: var(--green);
  color: var(--green);
  text-decoration: line-through;
}

/* ════════════════════════════════════════════
   TRIVIA
════════════════════════════════════════════ */
.trivia-arena {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
}
.trivia-prog-wrap {
  width: 100%;
  height: 9px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.trivia-prog {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
  box-shadow: var(--gg);
}
.trivia-meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.72;
  flex-wrap: wrap;
  gap: 4px;
}
/* Gaucho inline */
.trivia-gaucho {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,216,77,0.06);
  border: 1px solid rgba(255,216,77,0.2);
  border-radius: var(--r-md);
  padding: 10px 14px;
  animation: fadeUp 0.3s ease;
}
.trivia-gaucho span { font-size: 1.6rem; flex-shrink: 0; animation: float 3s ease-in-out infinite; }
.tg-bubble { font-size: 0.85rem; font-weight: 700; line-height: 1.55; color: rgba(255,216,77,0.9); }
/* Question card */
.trivia-qcard {
  width: 100%;
  background: linear-gradient(145deg, rgba(20,10,50,0.96), rgba(5,15,40,0.96));
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--r-xl);
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.3s;
  animation: fadeUp 0.35s ease;
}
.trivia-qcard.qc-ok  { border-color: var(--green); box-shadow: var(--gg); }
.trivia-qcard.qc-bad { border-color: var(--pink);  box-shadow: var(--gk); }
.tq-emoji { font-size: 2.4rem; display: block; margin-bottom: 10px; animation: float 3s ease-in-out infinite; }
.tq-text  { font-size: clamp(0.92rem,2.5vw,1.15rem); font-weight: 700; line-height: 1.55; }
/* Trivia options */
.trivia-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.topt {
  padding: 13px 11px;
  background: var(--glass);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  color: var(--white);
  font-weight: 700;
  font-size: clamp(0.82rem,2.2vw,0.96rem);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  line-height: 1.4;
  transition: all 0.17s var(--ease-spring);
}
.topt:hover:not(:disabled) {
  border-color: var(--blue);
  background: rgba(0,212,255,0.12);
  transform: translateY(-2px);
}
.topt:disabled { cursor: default; }
.topt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  font-size: 0.78rem;
  font-weight: 900;
  flex-shrink: 0;
}
.topt.t-correct { background:rgba(50,255,130,.2); border-color:var(--green); box-shadow:var(--gg); animation:bounceIn .45s; }
.topt.t-correct .topt-letter { background: var(--green); color: var(--ink); }
.topt.t-wrong   { background:rgba(255,79,154,.14); border-color:var(--pink); animation:shake .4s; }
.topt.t-wrong   .topt-letter { background: var(--pink); color: var(--ink); }
.topt.t-dim     { opacity: 0.28; }
/* Trivia feedback */
.trivia-fb {
  width: 100%;
  border-radius: var(--r-xl);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  animation: fadeUp 0.3s ease;
}
.trivia-fb.fb-ok  { background:rgba(50,255,130,.1); border:2px solid var(--green); }
.trivia-fb.fb-bad { background:rgba(255,79,154,.08); border:2px solid var(--pink); }
.tfb-icon { font-size: 1.7rem; flex-shrink: 0; }
.tfb-text { flex:1; font-size:.87rem; line-height:1.55; font-weight:600; min-width:150px; }
.trivia-breakdown {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; font-size: 0.88rem;
}
.trivia-breakdown span {
  background: var(--glass); border-radius: var(--r-pill); padding: 4px 14px; font-weight: 700;
}
/* Confetti */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.cpiec {
  position: absolute;
  top: -24px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

/* ════════════════════════════════════════════
   RADAR
════════════════════════════════════════════ */
.radar-arena {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.radar-hud {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}
.rhud-item {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 7px 16px;
  font-size: 0.87rem;
  font-weight: 700;
}
.radar-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
.ri-col  { display: flex; flex-direction: column; gap: 6px; }
.ri-label{ text-align: center; font-size: 0.82rem; font-weight: 700; opacity: 0.8; }
.ri-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--mid);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}
.ri-frame svg { width: 100%; height: 100%; display: block; }
.dm-hit {
  position: absolute; border-radius: 50%;
  border: 3px solid var(--green); background: rgba(50,255,130,0.15);
  pointer-events: none;
  animation: rippleOut 0.65s ease-out forwards;
  box-shadow: var(--gg);
}
.dm-miss {
  position: absolute; border-radius: 50%;
  border: 3px solid var(--pink); background: rgba(255,79,154,0.15);
  pointer-events: none;
  animation: rippleOut 0.65s ease-out forwards;
}
.diff-pips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dpip {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.3s;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.dpip.dp-found { background: var(--green); border-color: var(--green); box-shadow: var(--gg); }

/* ════════════════════════════════════════════
   CUENTOS
════════════════════════════════════════════ */
.cuentos-list {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.cuentos-intro {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.7;
}
.cuentos-intro em { color: var(--yellow); font-style: normal; font-weight: 700; }
.cuento-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
}
.cuento-card {
  background: linear-gradient(145deg, rgba(13,18,64,0.95), rgba(26,10,52,0.95));
  border: 1.5px solid rgba(255,216,77,0.3);
  border-radius: var(--r-xl);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
  color: var(--white);
}
.cuento-card:hover {
  transform: translateY(-5px);
  border-color: var(--yellow);
  box-shadow: var(--gy);
}
.cuento-card:active { transform: scale(0.96); }
.cc-emoji { font-size: 2.6rem; display: block; animation: float 4s ease-in-out infinite; }
.cc-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; }
.cc-hint  { font-size: 0.8rem; opacity: 0.68; line-height: 1.4; }
/* Reader */
.cuentos-reader {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.reader-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.reader-controls { display: flex; gap: 8px; }
.reader-article {
  background: rgba(13,18,64,0.92);
  border: 1.5px solid rgba(255,216,77,0.25);
  border-radius: var(--r-xl);
  padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--gy);
}
.reader-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 16px;
}
.reader-emoji { font-size: 2.8rem; flex-shrink: 0; animation: float 4s ease-in-out infinite; }
.reader-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  font-weight: 800;
  color: var(--yellow);
}
.reader-body {
  font-size: clamp(0.92rem, 2.3vw, 1.08rem);
  line-height: 1.85;
  color: rgba(255,255,255,0.88);
}
.reader-body p { margin-bottom: 14px; }
.reader-body p:last-child { margin-bottom: 0; }
.reader-gaucho {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,216,77,0.07);
  border: 1px solid rgba(255,216,77,0.2);
  border-radius: var(--r-md);
  padding: 12px 16px;
  animation: fadeUp 0.3s ease;
}
.reader-gaucho span { font-size: 1.8rem; flex-shrink: 0; }
.rg-bubble { font-size: 0.87rem; font-weight: 700; color: rgba(255,216,77,0.88); line-height: 1.5; }

/* ════════════════════════════════════════════
   PIN MODAL
════════════════════════════════════════════ */
.pin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pin-modal-card {
  background: linear-gradient(145deg, #0d1133, #1a0d3a);
  border: 2px solid var(--yellow);
  border-radius: var(--r-xl);
  padding: 38px 32px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--gy), 0 20px 60px rgba(0,0,0,0.5);
  animation: riseIn 0.35s var(--ease-spring);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.pin-lock { font-size: 3.5rem; animation: float 2.5s ease-in-out infinite; }
.pin-modal-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--yellow);
}
.pin-display {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.7em;
  color: var(--yellow);
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}
.pin-pad button {
  padding: 18px;
  background: var(--glass);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  transition: all 0.18s var(--ease-spring);
}
.pin-pad button:hover { background: rgba(255,255,255,0.18); transform: scale(1.06); }
.pin-pad button:active { transform: scale(0.92); }
.pin-del    { border-color: rgba(255,140,42,0.5); color: var(--orange); }
.pin-cancel { border-color: rgba(255,63,85,0.5);  color: var(--red); }
.pin-error  { color: var(--pink); font-size: 0.86rem; font-weight: 700; animation: shake 0.4s; }

/* ════════════════════════════════════════════
   MEDAL OVERLAY
════════════════════════════════════════════ */
.medal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}
.medal-card {
  background: linear-gradient(145deg,#1a0a2e,#0a1a2e);
  border: 2px solid var(--yellow);
  border-radius: var(--r-xl);
  padding: 38px 32px;
  text-align: center;
  max-width: 320px; width: 100%;
  box-shadow: 0 0 70px rgba(255,216,77,0.55), 0 20px 60px rgba(0,0,0,0.5);
  animation: riseIn 0.4s var(--ease-spring);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.medal-big   { font-size: 4.2rem; animation: bounce 1.2s ease-in-out infinite; }
.medal-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--yellow); }
.medal-card p { opacity: 0.88; font-size: 0.93rem; }

/* ════════════════════════════════════════════
   KEYFRAMES
════════════════════════════════════════════ */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes bounce {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}
@keyframes bounceIn {
  0%   { transform: scale(0.8); }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  18%     { transform: translateX(-8px); }
  40%     { transform: translateX(8px); }
  62%     { transform: translateX(-6px); }
  80%     { transform: translateX(6px); }
}
@keyframes riseIn {
  from { transform: scale(0.88) translateY(20px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes launchUp {
  0%   { transform: translateY(0)     rotate(0deg); }
  15%  { transform: translateY(-20px) rotate(-4deg); }
  100% { transform: translateY(-150vh) rotate(-4deg); }
}
@keyframes trailFlicker {
  from { transform: scale(1) translateY(0); opacity: 0.9; }
  to   { transform: scale(1.2) translateY(4px); opacity: 0.6; }
}
@keyframes burst {
  0%   { opacity: 1; transform: translate(0,0) scale(0.5); }
  100% { opacity: 0; transform: translate(var(--tx),var(--ty)) scale(1.6); }
}
@keyframes rippleOut {
  0%   { transform: translate(-50%,-50%) scale(0.4); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(2.8); opacity: 0; }
}
@keyframes pulseBorder {
  0%,100% { border-color: var(--purple); box-shadow: var(--gp); }
  50%     { border-color: var(--blue);   box-shadow: var(--gb); }
}
@keyframes radarSpin {
  0%   { transform: rotate(0deg)   scale(1);    filter: drop-shadow(0 0 10px var(--purple)); }
  50%  { transform: rotate(180deg) scale(1.12); filter: drop-shadow(0 0 20px var(--blue)); }
  100% { transform: rotate(360deg) scale(1);    filter: drop-shadow(0 0 10px var(--purple)); }
}
@keyframes confettiFall {
  0%   { transform: translateY(0)     rotate(0deg);   opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 560px) {
  .radar-images  { grid-template-columns: 1fr; }
  .trivia-opts   { grid-template-columns: 1fr; }
  .mc-grid       { grid-template-columns: 1fr 1fr; }
  .input-row     { flex-direction: column; align-items: stretch; }
  .ans-input,.btn-primary { width: 100%; }
  .game-topbar   { flex-wrap: wrap; justify-content: center; }
  .topbar-title  { width: 100%; }
  .trivia-fb     { flex-direction: column; text-align: center; }
  .ghud-name     { max-width: 72px; }
  .sum-btns      { flex-direction: column; align-items: stretch; }
}
@media (max-width: 380px) {
  .avatar-grid   { grid-template-columns: 1fr 1fr; }
  .sc { width: 27px; height: 27px; font-size: 0.85rem; }
}

/* ══════════════════════════════════════════
   GAUCHO: BOTÓN OCULTAR PERSONAJE
══════════════════════════════════════════ */
.gaucho-toggle {
  position: absolute;
  top: -12px;
  right: 40px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 0.75rem;
  pointer-events: all;
  z-index: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.gaucho-toggle:hover { background: rgba(255,255,255,0.18); }

/* ══════════════════════════════════════════
   JUEGO GEOGRAFÍA ARGENTINA
══════════════════════════════════════════ */
.gcard-geo {
  background: linear-gradient(145deg,#0a2a1a,#0d1a3a);
  border-color: #00e5a0;
  box-shadow: 0 0 26px rgba(0,229,160,.15);
}
.gcard-geo:hover {
  box-shadow: 0 0 48px rgba(0,229,160,.5), 0 12px 40px rgba(0,0,0,0.4);
}

.geo-arena {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 12px 24px;
}

.geo-img-wrap {
  width: 100%;
  max-height: 220px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 2px solid rgba(0,229,160,0.4);
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.geo-img-el {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: var(--r-lg);
}

.geo-img-fallback {
  font-size: 5rem;
  line-height: 1;
}

.geo-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.geo-opt {
  background: var(--glass);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 14px 10px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  line-height: 1.3;
}
.geo-opt:hover:not(:disabled) {
  background: rgba(0,229,160,0.15);
  border-color: #00e5a0;
  transform: translateY(-2px);
}
.geo-opt.correct {
  background: rgba(50,255,130,0.22);
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(50,255,130,0.4);
}
.geo-opt.wrong {
  background: rgba(255,60,60,0.22);
  border-color: #ff3c3c;
}
.geo-opt:disabled { cursor: default; }

@media (max-width: 480px) {
  .geo-opts { grid-template-columns: 1fr; }
  .geo-img-wrap { max-height: 160px; }
  .geo-img-el { height: 160px; }
}

/* ══════════════════════════════════════════
   COHETE POR PARTES
══════════════════════════════════════════ */
.rocket-section {
  background: linear-gradient(135deg,rgba(20,40,80,.85),rgba(10,20,50,.9));
  border: 1px solid rgba(100,150,255,.25);
  border-radius: var(--r-xl);
  padding: 18px 20px 16px;
  margin: 0 auto 18px;
  max-width: 700px;
  width: 100%;
}
.rk-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.rk-title  { color:#f5c842; font-size:1rem; font-weight:800; margin:0; }
.rk-count  { color:rgba(255,255,255,.6); font-size:.8rem; }
.rk-bar-wrap { background:rgba(255,255,255,.12); border-radius:99px; height:8px; margin-bottom:14px; overflow:hidden; }
.rk-bar    { height:8px; background:linear-gradient(90deg,#4488ff,#00e5a0); border-radius:99px; width:0; transition:width .6s cubic-bezier(.4,0,.2,1); }
.rk-parts  { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.rk-part   {
  display:flex; flex-direction:column; align-items:center; gap:4px;
  background:rgba(255,255,255,.06); border:1.5px dashed rgba(255,255,255,.2);
  border-radius:var(--r-lg); padding:10px 14px; min-width:70px;
  transition:all .35s; opacity:.45; filter:grayscale(1);
}
.rk-part.rk-done {
  background:rgba(0,229,160,.12); border:1.5px solid #00e5a0;
  opacity:1; filter:none;
  box-shadow:0 0 16px rgba(0,229,160,.25);
  animation:rk-pop .4s ease;
}
@keyframes rk-pop { 0%{transform:scale(.8)} 60%{transform:scale(1.15)} 100%{transform:scale(1)} }
.rk-part-icon  { font-size:1.6rem; line-height:1; }
.rk-part-label { font-size:.65rem; color:rgba(255,255,255,.7); font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.rk-launch {
  display:block; margin:16px auto 0;
  background:linear-gradient(135deg,#f5c842,#ff8800);
  color:#1a1a1a; font-weight:900; font-size:1.05rem; font-family:var(--font);
  border:none; border-radius:var(--r-pill); padding:12px 32px;
  cursor:pointer; animation:rk-pulse 1.5s ease-in-out infinite;
}
@keyframes rk-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(245,200,66,.4)} 50%{box-shadow:0 0 0 12px rgba(245,200,66,0)} }
/* Modal lanzamiento */
.rk-modal {
  position:fixed; inset:0; background:rgba(0,0,30,.88); z-index:9999;
  display:flex; align-items:center; justify-content:center;
}
.rk-modal.hidden { display:none; }
.rk-modal-inner  { text-align:center; color:white; }
.rk-rocket-anim  { font-size:5rem; animation:rk-fly 2s ease-in forwards; display:block; }
@keyframes rk-fly { 0%{transform:translateY(0) scale(1)} 100%{transform:translateY(-200px) scale(1.5)} }
.rk-modal-inner h2 { font-size:2.5rem; color:#f5c842; margin:.5rem 0; }
.rk-modal-inner p  { font-size:1.1rem; opacity:.85; }
.rk-stars { font-size:1.8rem; margin-top:1rem; letter-spacing:.3em; }

/* ══════════════════════════════════════════
   RACHA DIARIA
══════════════════════════════════════════ */
.hub-daily-row { display:flex; gap:14px; max-width:700px; margin:0 auto 18px; width:100%; flex-wrap:wrap; }
.streak-widget { display:flex; align-items:center; }
.streak-display {
  background:rgba(255,255,255,.08); border-radius:var(--r-pill);
  padding:8px 18px; font-size:.95rem; font-weight:800; color:rgba(255,255,255,.7);
  border:1px solid rgba(255,255,255,.12); transition:all .3s;
}
.streak-display.streak-active {
  background:rgba(255,100,0,.18); border-color:#ff6400;
  color:#ff9944; box-shadow:0 0 12px rgba(255,100,0,.3);
}

/* ══════════════════════════════════════════
   PREGUNTA DEL DÍA
══════════════════════════════════════════ */
.daily-section {
  flex:1; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12);
  border-radius:var(--r-xl); padding:14px 16px; min-width:200px;
}
.daily-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.daily-badge  { background:rgba(100,200,255,.18); color:#88ddff; border-radius:var(--r-pill); padding:3px 12px; font-size:.75rem; font-weight:700; }
.daily-bonus  { font-size:.72rem; color:#f5c842; font-weight:700; }
.daily-question { color:white; font-weight:700; font-size:.9rem; margin-bottom:10px; }
.daily-opts   { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.daily-opt    {
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15);
  color:white; border-radius:var(--r-lg); padding:8px 6px; font-size:.8rem;
  font-weight:600; cursor:pointer; font-family:var(--font); transition:all .18s;
}
.daily-opt:hover { background:rgba(100,200,255,.18); border-color:#88ddff; }
.daily-done   { text-align:center; padding:8px 0; }
.daily-result-icon { font-size:2rem; display:block; margin-bottom:6px; }
.daily-done-text   { color:rgba(255,255,255,.8); font-size:.85rem; margin-bottom:4px; }
.daily-fact        { color:#f5c842; font-size:.78rem; line-height:1.5; font-style:italic; }

/* ══════════════════════════════════════════
   COPLAS DEL GAUCHO
══════════════════════════════════════════ */
.copla-section {
  background:linear-gradient(135deg,rgba(80,40,10,.7),rgba(40,20,5,.8));
  border:1px solid rgba(200,160,30,.25); border-radius:var(--r-xl);
  padding:16px 20px; max-width:700px; margin:0 auto 18px; width:100%;
}
.copla-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; color:#f5c842; font-weight:700; font-size:.9rem; }
.copla-next-btn { background:rgba(245,200,66,.15); border:1px solid rgba(245,200,66,.3); color:#f5c842; border-radius:var(--r-pill); padding:4px 14px; font-size:.78rem; cursor:pointer; font-family:var(--font); }
.copla-next-btn:hover { background:rgba(245,200,66,.28); }
.copla-texto { color:rgba(255,255,255,.92); font-size:.88rem; line-height:1.9; font-style:italic; margin-bottom:8px; white-space:pre-line; }
.copla-dato  { color:rgba(245,200,66,.75); font-size:.76rem; line-height:1.5; border-top:1px solid rgba(245,200,66,.15); padding-top:8px; }

/* ══════════════════════════════════════════
   ÁLBUM DE FIGURITAS
══════════════════════════════════════════ */
.album-section {
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1);
  border-radius:var(--r-xl); padding:16px 20px;
  max-width:700px; margin:0 auto 18px; width:100%;
}
.album-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.album-header h3 { color:white; font-size:.95rem; margin:0; }
.album-pct    { color:rgba(255,255,255,.5); font-size:.78rem; }
.alb-cat      { margin-bottom:16px; }
.alb-cat-label{ font-size:.72rem; font-weight:700; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px; }
.alb-row      { display:flex; flex-wrap:wrap; gap:8px; }
.alb-fig      {
  display:flex; flex-direction:column; align-items:center; gap:3px;
  width:62px; border-radius:var(--r-lg); padding:8px 4px;
  border:1.5px solid; transition:all .25s;
}
.alb-owned  { background:rgba(0,229,160,.1); border-color:rgba(0,229,160,.4); }
.alb-missing{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.1); filter:grayscale(.8); opacity:.5; }
.alb-emoji  { font-size:1.4rem; line-height:1; }
.alb-name   { font-size:.58rem; color:rgba(255,255,255,.7); text-align:center; line-height:1.2; font-weight:600; }
/* Modal figurita ganada */
.album-earned {
  position:fixed; bottom:80px; left:50%; transform:translateX(-50%);
  z-index:8000; background:linear-gradient(135deg,#0a2a1a,#1a4a2a);
  border:2px solid #00e5a0; border-radius:var(--r-xl); padding:20px 28px;
  text-align:center; box-shadow:0 8px 40px rgba(0,229,160,.3);
  animation:slide-up .4s ease;
}
.album-earned.hidden { display:none; }
@keyframes slide-up { from{transform:translateX(-50%) translateY(40px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }
.alb-earn-pre   { color:rgba(255,255,255,.6); font-size:.75rem; margin:0 0 6px; }
.alb-earn-emoji { font-size:3rem; line-height:1; margin-bottom:6px; }
.alb-earn-name  { color:#00e5a0; font-weight:900; font-size:1.05rem; margin:0 0 4px; }
.alb-earn-desc  { color:rgba(255,255,255,.7); font-size:.78rem; margin:0; }

@media (max-width:480px) {
  .hub-daily-row  { flex-direction:column; }
  .rk-parts       { gap:5px; }
  .rk-part        { min-width:58px; padding:8px 8px; }
  .alb-fig        { width:54px; }
  .rk-launch      { font-size:.9rem; padding:10px 22px; }
}
