/* Estilos propios de ANIBOOM. Lo compartido (barra de arriba, inicio, botones, modales) está en /assets/base.css.
   Mockup aprobado: mockups/aniboom/2026-10-26_1_inicio_juego_y_resultado.html */

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.topbar-spacer { width: 40px; }

/* ---------- seguir una partida cortada ---------- */
.resume {
  margin-top: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.resume .resume-boom { font-size: 54px; line-height: 1; }
.resume b { font-family: var(--font-title); font-size: 20px; }
.resume span { color: var(--muted); font-size: 14px; }
.resume .btn { width: 100%; margin-top: 8px; }

/* ---------- en juego ---------- */
#screen-play { position: relative; gap: 10px; }
.hud { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.fuse-tag { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--close); }
.bars { display: flex; gap: 4px; }
.bars i { flex: 1; height: 6px; border-radius: 3px; background: var(--chip); }
.bars .ok { background: var(--ok); } .bars .bad { background: var(--bad); } .bars .boom { background: var(--close); }
.bars .now { background: var(--text); }

/* La pregunta en juego va chica (Juan Cruz, 29/10/2026: "se tiene que leer rápido e ir rápido a los choices"; antes 34 px).
   La consigna gigante sigue en el cartel de 0,8 s de antes (.flash .big). */
.q { font-family: var(--font-title); font-weight: 800; font-size: 21px; line-height: 1.05; text-align: center; letter-spacing: -0.3px; text-transform: uppercase; margin: 0; }
.q small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; margin-top: 3px; }

.fuse { position: relative; display: flex; align-items: center; height: 46px; }
.bomb { width: 46px; height: 46px; flex: none; }
.bomb svg { width: 46px; height: 46px; display: block; }
.bomb .body { fill: var(--chip); stroke: var(--text); stroke-width: 2; }
.rope { flex: 1; height: 6px; position: relative; margin-left: -4px; }
.rope .burnt { position: absolute; left: 0; right: 0; top: 2px; border-top: 2px dashed var(--border-strong); }
.rope .live { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 3px; background: repeating-linear-gradient(90deg, #F2B33D 0 6px, #C98A1E 6px 9px); }
.rope .spark {
  position: absolute; top: 50%; left: 100%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 999px;
  background: radial-gradient(#fff 0 20%, #FFD36A 35%, #FF5A36 60%, transparent 70%); box-shadow: 0 0 14px #FF5A36; transition: opacity 0.2s;
}

/* Las opciones van pegadas a la foto (antes margin-top: auto las mandaba al fondo de la pantalla). */
.q-body { display: flex; flex-direction: column; gap: 10px; }
.photo { width: min(180px, 46vw); aspect-ratio: 3 / 4; margin: 0 auto; border-radius: 14px; background: var(--surface-2) center 15% / cover no-repeat; border: 1px solid var(--border); }
.t-anime .photo { width: min(150px, 38vw); }
.t-opening .photo, .t-source .photo { width: min(150px, 38vw); aspect-ratio: 2 / 3; background-position: center; }
.an-name { font-family: var(--font-title); font-weight: 700; font-size: 15px; text-align: center; line-height: 1.2; margin-top: -3px; }
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.o {
  min-height: 58px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  display: flex; align-items: center; gap: 12px; padding: 6px 14px; font-weight: 700; font-size: 17px; text-align: left;
}
.o:hover:not(:disabled) { border-color: var(--muted); }
.o .k { width: 26px; height: 26px; border-radius: 999px; background: var(--chip); font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; color: var(--muted); }
.o.cov { min-height: 72px; padding: 6px 10px; }
.o .cv { width: 44px; height: 60px; border-radius: 6px; background: var(--surface-2) center / cover; flex: none; }
.o .n { min-width: 0; line-height: 1.2; display: flex; flex-direction: column; }
/* romaji · kanji abajo, en chico y en un renglón (completo al pasar el mouse) */
.sub { display: block; max-width: 100%; font-family: var(--font-body, inherit); font-size: 10.5px; font-weight: 400; color: var(--muted); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-name { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.an-name .sub { font-size: 11px; }
.o:disabled, .ch:disabled { opacity: 1; cursor: default; }
.o.ok, .ch.ok { border: 2px solid var(--ok); background: #16332E; }
.o.bad, .ch.bad { border: 2px solid var(--bad); background: #2E1A1C; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 0; }
.ch { border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; color: var(--text); padding: 0; }
.ch:hover:not(:disabled) { border-color: var(--muted); }
.ch .im { aspect-ratio: 3 / 4; background: var(--surface-2) center 15% / cover no-repeat; width: 100%; }
.ch .nm { font-size: 12px; font-weight: 700; padding: 8px 6px; text-align: center; line-height: 1.2; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.line { font-size: 13px; text-align: center; color: var(--text-2); min-height: 18px; }
.line .plus { color: var(--ok); } .line .minus { color: var(--bad); }

/* carteles: consigna, cuenta 3-2-1, explosión */
.flash {
  position: absolute; inset: -8px -16px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; background: var(--bg); text-align: center; padding: 24px; overflow: hidden;
}
.flash[hidden] { display: none; }
.flash .big { font-family: var(--font-title); font-weight: 800; font-size: 54px; line-height: 0.95; text-transform: uppercase; letter-spacing: -1px; }
.flash .big.a { color: var(--accent); }
.flash .sub { font-size: 14px; color: var(--muted); max-width: 280px; line-height: 1.5; }
.flash .tag { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--close-bg); color: var(--close); }
.count { display: flex; gap: 10px; }
.count i {
  width: 46px; height: 46px; border-radius: 999px; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center;
  font-style: normal; font-family: var(--font-title); font-weight: 800; font-size: 22px; color: var(--muted);
}
.count i.on { border-color: var(--accent); color: var(--accent); }
.boom { font-size: 90px; line-height: 1; }

@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pop { 0% { transform: scale(0.2); opacity: 0; } 40% { transform: scale(1.5); opacity: 1; } 70% { transform: scale(0.9); } 100% { transform: scale(1); } }
@keyframes blast { 0% { background: #FFF6E0; } 15% { background: #FFB23D; } 40% { background: #FF5A36; } 100% { background: #1A0F0C; } }
@keyframes ring { 0% { transform: scale(0.1); opacity: 1; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes fly { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--x), var(--y)) scale(0.3); opacity: 0; } }
@keyframes tense { 0%, 100% { transform: scale(1) rotate(0); } 25% { transform: scale(1.12) rotate(-8deg); } 75% { transform: scale(1.12) rotate(8deg); } }
@keyframes relax { 0% { transform: scale(1); } 30% { transform: scale(1.15, 0.8); } 60% { transform: scale(0.92, 1.08); } 100% { transform: scale(1); } }
@keyframes puff { 0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0.9; } 100% { transform: translate(-50%, -160%) scale(1.8); opacity: 0; } }
@keyframes phewup { 0% { transform: translateY(6px) scale(0.7); opacity: 0; } 25% { transform: translateY(0) scale(1.1); opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-14px) scale(1); opacity: 0; } }

.shake { animation: shake 0.25s 2; }
.flash.blast { animation: blast 0.7s ease-out forwards; }
.flash.blast .boom { animation: pop 0.45s ease-out; }
.flash.blast .big { animation: pop 0.5s 0.08s ease-out both; color: var(--text); }
.flash.blast .sub { color: #F2D28A; }
.flash.blast .ring { position: absolute; left: 50%; top: 40%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 999px; border: 6px solid #FFD36A; animation: ring 0.6s ease-out forwards; }
.flash.blast .bit { position: absolute; left: 50%; top: 40%; width: 12px; height: 12px; margin: -6px; border-radius: 3px; animation: fly 0.7s ease-out forwards; }
.bomb.tense { animation: tense 0.18s infinite; }
.bomb.tense .body { fill: #7A2A1E; stroke: var(--accent); }
.bomb.relax { animation: relax 0.45s ease-out; }
.puff { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 999px; background: radial-gradient(#C9CED6 0 35%, #9AA3AE88 60%, transparent 72%); pointer-events: none; animation: puff 0.6s ease-out forwards; }
.phew {
  position: absolute; left: 50%; top: 7px; margin-left: -62px; padding: 2px 12px; border-radius: 999px; background: #16332E; border: 1px solid var(--ok);
  font-family: var(--font-title); font-weight: 800; font-size: 20px; color: var(--ok); pointer-events: none; white-space: nowrap; animation: phewup 0.8s ease-out forwards;
}
@media (prefers-reduced-motion: reduce) {
  .shake, .bomb.tense, .bomb.relax, .flash.blast .boom, .flash.blast .big { animation: none; }
}

/* ---------- resultado ---------- */
.result-head { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; }
.result-line { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.result-points { font-family: var(--font-title); font-weight: 800; font-size: 46px; line-height: 1; }
.result-points small { font-size: 22px; }
.result-calc { font-size: 13px; color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.strip i { aspect-ratio: 1; border-radius: 4px; background: var(--chip); }
.strip .ok { background: var(--ok); } .strip .bad { background: var(--bad); } .strip .boom { background: var(--close); }
.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.row .d { width: 22px; height: 22px; border-radius: 6px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--bg); }
.row .d.ok { background: var(--ok); } .row .d.bad { background: var(--bad); } .row .d.boom { background: var(--close); }
.row .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row .t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t .jp { font-size: 10.5px; opacity: .8; }
.result-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }

/* ---------- estadísticas ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stat-tiles div { border-radius: 10px; background: var(--surface-2); padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-tiles span { color: var(--muted); text-align: center; line-height: 1.2; }
.stat-block { display: flex; flex-direction: column; gap: 8px; }
.dist { display: flex; flex-direction: column; gap: 4px; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bar .k { width: 18px; text-align: right; color: var(--muted); flex: none; }
.bar i {
  height: 20px; border-radius: 4px; background: var(--border-strong); min-width: 24px; font-style: normal; font-weight: 700;
  font-size: 13px; display: flex; align-items: center; justify-content: flex-end; padding: 0 7px;
}
.bar i.today { background: var(--accent); color: var(--bg); }
.record { white-space: nowrap; }

/* ---------- resultado en una pantalla (Juan Cruz, 28/10/2026: no entraba) ----------
   Celu: una columna (puntaje, tira, las 10, botones). Compu: dos columnas, puntaje y botones a la izquierda. */
.result-side { display: contents; }
.result-side .result-actions { order: 3; }
#screen-result .rows { order: 2; }
@media (min-width: 900px) {
  .app:has(> #screen-result:not([hidden])) { max-width: 1040px; }
  #screen-result { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; flex: none; }
  /* las 10 en dos columnas de 5 (en orden: 1–5 a la izquierda, 6–10 a la derecha) */
  #screen-result .rows { display: grid; grid-template-rows: repeat(5, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .result-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }
  .result-side .result-actions { margin-top: 4px; }
  #screen-result .rows { gap: 6px; }
  #screen-result .row { padding: 6px 12px; }
}

/* Celu (Juan Cruz, 28/10/2026: el resultado tiene que entrar en una pantalla de 390×750): las 10 van en fichas chicas de a
   dos (tipo + respuesta en un renglón) y el detalle completo (lo que pusiste, romaji · kanji) en "All answers". */
@media (max-width: 899px) {
  .result-head { margin-top: 0; }
  .result-points { font-size: 40px; }
  #screen-result { gap: 10px; }
  #screen-result .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  #screen-result .row { padding: 5px 7px; gap: 6px; border-radius: 8px; min-width: 0; }
  #screen-result .row .d { width: 18px; height: 18px; font-size: 11px; border-radius: 5px; }
  #screen-result .row .t { gap: 0; }
  #screen-result .row .t b { font-size: 12px; }
  #screen-result .row .t span { font-size: 12px; }
  #screen-result .row .t .jp { display: none; }
  .result-actions { gap: 6px; }
}
@media (min-width: 900px) { #answers-btn { display: none; } }
#answers-modal .modal { max-width: 460px; }
.rows.full .row .t b, .rows.full .row .t span { white-space: normal; }
.rows.full .row .t .jp { font-size: 12px; }

/* ---------- día bonus: segunda ronda (29/10/2026) ----------
   El botón y la nota van en una sola fila; en el celu la cuenta regresiva se esconde para que el resultado siga entrando. */
.r2-box:not([hidden]) { display: flex; align-items: center; gap: 10px; }
.r2-box .btn { flex: none; }
.r2-box .round2-note { line-height: 1.25; }
.brand .round2-pill { margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.round2-pill[hidden] { display: none; }
@media (max-width: 899px) {
  .result-actions:has(.r2-box:not([hidden])) .countdown { display: none; }
}
/* En el celu la barra de arriba no tiene lugar: la pastilla va chiquita, debajo del número. */
@media (max-width: 520px) {
  .brand { position: relative; }
  .brand .round2-pill { position: absolute; right: -4px; top: 100%; margin: 1px 0 0; padding: 1px 7px; font-size: 9px; letter-spacing: .5px; }
}

/* Publicidad (30/10/2026, assets/ads.js): con la barra de abajo del celu, la foto de la pregunta se achica ~12 % para
   que todo siga entrando en 390×750. Con ADS_MODE 'off' no cambia nada. */
@media (max-width: 899px) {
  .ads-on .photo { width: min(158px, 40vw); }
  .ads-on .t-anime .photo { width: min(124px, 32vw); }
  .ads-on .t-opening .photo, .ads-on .t-source .photo { width: min(114px, 30vw); }
}

/* "Which one does NOT have a movie?" (1/11/2026): 3 portadas lado a lado (como Odd one out), sin foto arriba. */
.t-nomovie .ch .im { aspect-ratio: 2 / 3; background-position: center; }
.t-nomovie .ch .nm .nmain { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.t-nomovie .trio { max-width: 460px; margin-left: auto; margin-right: auto; width: 100%; }
