/* ══════════════════════════════════════════════════════════
   Froggy Jumps — complete visual system
   ══════════════════════════════════════════════════════════ */

/* ── Game shell ──────────────────────────────────────────── */
.froggy-game {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: .45rem;
  container-type: size;
  font-family: system-ui, sans-serif;
}

/* ── HUD ─────────────────────────────────────────────────── */
.froggy-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .25rem .6rem;
  border-radius: 10px;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  flex-shrink: 0;
  gap: .5rem;
  flex-wrap: wrap;
}
.froggy-hud-pos   { font-weight: 800; font-size: .88rem; color: #fff; }
.froggy-hud-center { flex: 1; text-align: center; }
.froggy-hud-right  { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.froggy-hud-streak {
  font-size: .92rem; font-weight: 800; color: #fbbf24;
  text-shadow: 0 0 8px rgba(251,191,36,.7);
  animation: froggy-streak-pulse 1s ease infinite;
}
.froggy-timer {
  background: #dc2626; color: #fff; border-radius: 8px;
  padding: .15em .55em; font-weight: 800; font-size: .85rem;
  transition: background .3s;
}
.froggy-timer-urgent {
  background: #7f1d1d;
  animation: froggy-urgent 0.4s ease-in-out infinite alternate;
}
.froggy-score { color: #fbbf24; font-weight: 800; font-size: .9rem; }

/* ── Viewport ────────────────────────────────────────────── */
.froggy-vp {
  flex-shrink: 0;
  height: 130px;
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
  border-radius: 14px;
  scroll-behavior: smooth;
}

/* ── World ────────────────────────────────────────────────── */
.froggy-world {
  position: relative;
  height: 100%;
}

/* ── Lily pads ────────────────────────────────────────────── */
.froggy-pad {
  position: absolute;
  bottom: 14px;
  width: 54px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: 50%;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.4));
  transform: translateX(-50%);
  user-select: none;
}

/* ── Frog ─────────────────────────────────────────────────── */
.froggy-frog {
  position: absolute;
  bottom: 42px;
  width: 48px;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.froggy-char {
  font-size: 2.1rem;
  line-height: 1;
  display: block;
  transition: filter .3s;
  transform-origin: bottom center;
  will-change: transform;
}
.froggy-char.froggy-golden {
  filter: brightness(1.3) sepia(.6) saturate(3) hue-rotate(5deg) drop-shadow(0 0 8px gold);
}
.froggy-shadow {
  width: 28px; height: 7px;
  background: rgba(0,0,0,.25);
  border-radius: 50%;
  margin-top: 2px;
  flex-shrink: 0;
}
.froggy-streak-badge {
  font-size: 1rem;
  line-height: 1;
  min-height: 1.2rem;
  text-align: center;
}

/* ── Start / Finish flags ─────────────────────────────────── */
.froggy-start-flag,
.froggy-finish-flag {
  position: absolute;
  bottom: 40px;
  font-size: 1.5rem;
  z-index: 5;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}

/* ── Particles ───────────────────────────────────────────── */
.froggy-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: froggy-pop .7s ease-out forwards;
  z-index: 20;
}
@keyframes froggy-pop {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ── Ambient water overlay ───────────────────────────────── */
.froggy-ambient {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.18) 100%);
}

/* ── Question area ────────────────────────────────────────── */
.froggy-q-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-height: 0;
}
.froggy-q-number {
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  opacity: .55;
  letter-spacing: .06em;
  flex-shrink: 0;
}
.froggy-q-text {
  font-size: clamp(1rem, 4cqmin, 1.9rem);
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
  flex-shrink: 0;
  padding: 0 .5rem;
}
.froggy-q-img {
  text-align: center;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.froggy-q-img img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 10px;
}

/* ── Answer options grid ─────────────────────────────────── */
.froggy-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.35rem, 1.2cqh, .8rem);
  flex-shrink: 0;
}

.froggy-opt {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: clamp(.5rem, 2cqh, 1.1rem) .9rem;
  border: none;
  border-radius: 12px;
  font-size: clamp(.82rem, 2.8cqmin, 1.2rem);
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform .1s, filter .1s, opacity .2s;
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
  min-height: 0;
  box-shadow: 0 4px 0 rgba(0,0,0,.28);
}
.froggy-opt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .12s;
}
.froggy-opt:active::after { background: rgba(255,255,255,.18); }
.froggy-opt:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.28); }

.froggy-opt i { font-size: 1.05em; flex-shrink: 0; }
.froggy-opt span { flex: 1; word-break: break-word; }

/* 4 distinct option colours — follow the skin's shape palette */
.froggy-opt-0 { background: var(--ww-shape-1, #e53935); }
.froggy-opt-1 { background: var(--ww-shape-2, #1e88e5); }
.froggy-opt-2 { background: var(--ww-shape-3, #43a047); }
.froggy-opt-3 { background: var(--ww-shape-4, #fb8c00); }

.froggy-opt-correct { background: #16a34a !important; box-shadow: 0 0 0 3px #86efac, 0 4px 0 #14532d !important; }
.froggy-opt-wrong   { background: #64748b !important; opacity: .65; }
.froggy-opt[disabled], .froggy-opt[style*="pointer-events:none"] { opacity: .7; cursor: default; }

/* ══════════════════════════════════════════════════════════
   SCENARIO THEMES
   Each scenario sets the viewport background + pad style.
   ══════════════════════════════════════════════════════════ */

/* Pantano (default) */
.froggy-swamp .froggy-vp {
  background: linear-gradient(180deg, #164e63 0%, #0e7490 45%, #0369a1 70%, #075985 100%);
}
.froggy-swamp .froggy-pad { background: rgba(5,150,105,.8); box-shadow: 0 3px 8px rgba(0,0,0,.5); border-radius: 50%; }

/* Selva */
.froggy-jungle .froggy-vp {
  background: linear-gradient(180deg, #14532d 0%, #166534 40%, #15803d 70%, #052e16 100%);
}
.froggy-jungle .froggy-pad { background: rgba(20,120,60,.85); box-shadow: 0 3px 8px rgba(0,0,0,.5); border-radius: 50%; }

/* Espacio */
.froggy-space .froggy-vp {
  background: linear-gradient(180deg, #0f0f1a 0%, #1e1b4b 45%, #0f172a 100%);
}
.froggy-space .froggy-pad { background: rgba(79,70,229,.7); border-radius: 50%; box-shadow: 0 0 12px rgba(99,102,241,.6); }
.froggy-space .froggy-vp::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.8) 0, transparent 0),
                    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,.6) 0, transparent 0),
                    radial-gradient(1px 1px at 60% 15%, rgba(255,255,255,.9) 0, transparent 0),
                    radial-gradient(1px 1px at 80% 45%, rgba(255,255,255,.7) 0, transparent 0),
                    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,.5) 0, transparent 0);
  pointer-events: none;
}

/* Hielo */
.froggy-winter .froggy-vp {
  background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 40%, #3b82f6 70%, #1d4ed8 100%);
}
.froggy-winter .froggy-pad { background: rgba(219,234,254,.85); border-radius: 50%; box-shadow: 0 2px 8px rgba(59,130,246,.5); }

/* Volcán */
.froggy-volcano .froggy-vp {
  background: linear-gradient(180deg, #1c0a00 0%, #7c2d12 40%, #b45309 65%, #92400e 100%);
}
.froggy-volcano .froggy-pad { background: rgba(120,40,10,.85); border-radius: 50%; box-shadow: 0 0 10px rgba(239,68,68,.6); }

/* ══════════════════════════════════════════════════════════
   VS / Equipos round: compact mini-track
   ══════════════════════════════════════════════════════════ */
.froggy-round .froggy-q-text { font-size: clamp(.9rem, 3cqmin, 1.5rem); }

.froggy-mini-track {
  position: relative;
  height: 60px;
  border-radius: 10px;
  overflow: visible;          /* frogs at 0%/100% stay visible */
  background: linear-gradient(90deg, #0e7490, #0369a1);
  flex-shrink: 0;
  margin: 0 .75rem .4rem;    /* side margins give room to frogs at 0% / finish at 100% */
}
/* .froggy-mini-world removed — pads/frogs are direct children now, positioned by % */
.froggy-mini-pad {
  position: absolute;
  bottom: 8px;
  font-size: 1.1rem;
  transform: translateX(-50%);
}
.froggy-mini-frog {
  position: absolute;
  font-size: 1.3rem;
  bottom: 26px;
  transform: translateX(-50%);
  transition: left 0.5s cubic-bezier(.25,.46,.45,.94);
}
.froggy-mini-p2 { filter: hue-rotate(180deg); }
.froggy-mini-finish {
  position: absolute;
  bottom: 20px;
  right: -.6rem;
  font-size: 1.2rem;
}

/* ══════════════════════════════════════════════════════════
   LIVE host screen
   ══════════════════════════════════════════════════════════ */
.froggy-live-title {
  font-size: clamp(1.4rem, 4vmin, 2.6rem);
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
}
.froggy-live-answer { font-size: 1.4rem; }
.froggy-live-frogjump {
  font-size: 3rem;
  animation: froggy-bounce 0.6s ease infinite alternate;
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════ */
@keyframes froggy-streak-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.12); }
}
@keyframes froggy-urgent {
  from { opacity: 1; }
  to   { opacity: .6; }
}
@keyframes froggy-bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

/* ══════════════════════════════════════════════════════════
   THUMBNAIL (activityThumb preview)
   ══════════════════════════════════════════════════════════ */
.froggy-thumb-track {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #0e7490, #0369a1);
  overflow: hidden;
}
.froggy-thumb-pad  { font-size: 1.2rem; }
.froggy-thumb-frog { font-size: 1.6rem; margin: 0 4px; }

/* Responsive: 1 column options on very narrow */
@container (max-width: 380px) {
  .froggy-options { grid-template-columns: 1fr; }
}
