/* game.css — Reto Tito Rangel (game.titorangel.com)
   Paleta oficial «BGA se transforma» (2026-11-14), igual que titorangel.com/campana:
     verde profundo #193F2B (fondo) · verde campaña #008A22 · verde medio #1D7A2E ·
     lima #7EA51A · amarillo #FFDE00 (cajas de acento) · blanco.
   Para que no se vea "todo verde": tarjetas blancas, cajas amarillas con
   mayúsculas condensadas en verde profundo y franja verde/amarillo/verde.
   Mobile primero (los jugadores usan el celular); textos grandes y alto
   contraste para el proyector. Las variables viejas (--g, --g2, --ac, --surf)
   se conservan con los valores nuevos porque las páginas las usan en línea. */
@font-face{font-family:'AmsiProCond';src:url('/AmsiProCond-Black.otf') format('opentype');font-weight:900;font-style:normal;font-display:swap}
@font-face{font-family:'AmsiPro';src:url('/AmsiPro-Black.otf') format('opentype');font-weight:900;font-style:normal;font-display:swap}
@font-face{font-family:'AmsiPro';src:url('/AmsiPro-Bold.otf') format('opentype');font-weight:700;font-style:normal;font-display:swap}

:root{
  --prof:#193F2B; --prof-2:#12301f; --campana:#008A22; --medio:#1D7A2E; --lima:#7EA51A; --amarillo:#FFDE00; --blanco:#ffffff;
  --cal:#f3f6ef; --tinta:#193F2B; --tinta-2:#3d5446;
  /* nombres que ya usaban las páginas */
  --g:var(--prof); --g2:var(--prof-2); --ac:var(--amarillo); --surf:var(--cal); --paper:#ffffff;
  --fc:'AmsiProCond','Arial Narrow',sans-serif; --fd:'AmsiPro','Arial Black',sans-serif; --fb:'Inter',system-ui,sans-serif;
  /* opciones de la trivia (con su figura ▲◆●■, no solo color) */
  --a-color:#FFDE00; --a-fg:#193F2B;
  --b-color:#008A22; --b-fg:#ffffff;
  --c-color:#ffffff; --c-fg:#193F2B;
  --d-color:#7EA51A; --d-fg:#193F2B;
  --error:#d93a2b;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
html,body{margin:0;padding:0;}
body{
  font-family:var(--fb);
  background:
    radial-gradient(900px 620px at 100% -8%, rgba(126,165,26,.32), transparent 62%),
    radial-gradient(760px 560px at -12% 108%, rgba(0,138,34,.42), transparent 60%),
    var(--prof);
  background-attachment:fixed;
  color:#fff; min-height:100vh; min-height:100dvh;
  display:flex; flex-direction:column;
}
/* franja de marca abajo: verde / amarillo / verde */
body::after{content:""; position:fixed; left:0; right:0; bottom:0; height:6px; z-index:30; pointer-events:none;
  background:linear-gradient(90deg,var(--campana) 0 42%,var(--amarillo) 42% 58%,var(--campana) 58%);}
a{color:inherit;}
.wrap{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px 16px 30px; text-align:center; gap:18px;}
h1,h2,h3{font-family:var(--fc); font-weight:900; text-transform:uppercase; letter-spacing:-.01em; margin:0; line-height:1.05;}
.pin{font-family:var(--fd); font-weight:900; letter-spacing:.08em;}

/* marca: logo BGA + nombre del reto */
.logo{font-family:var(--fc); font-weight:900; color:#fff; font-size:1.1rem; letter-spacing:.02em; text-transform:uppercase; display:flex; align-items:center; gap:10px;}
.logo .dot{width:9px;height:9px;border-radius:50%;background:var(--amarillo);}
.logo img{height:30px; width:auto; display:block;}
.logo .sep{width:1px; height:22px; background:rgba(255,255,255,.35);}
/* caja amarilla con mayúsculas condensadas (como en titorangel.com/campana) */
.caja{display:inline-block; background:var(--amarillo); color:var(--prof); font-family:var(--fc); font-weight:900; text-transform:uppercase;
  padding:.12em .38em .06em; line-height:1; letter-spacing:.01em; box-shadow:6px 6px 0 rgba(0,0,0,.18);}

/* tarjeta blanca (formulario, avisos) */
.tarjeta{background:#fff; color:var(--tinta); border-radius:22px; padding:20px 16px; width:100%; max-width:380px;
  box-shadow:0 18px 40px rgba(0,0,0,.28); display:flex; flex-direction:column; align-items:center; gap:12px;}

input[type=text]{
  font-family:var(--fb); font-size:1.15rem; font-weight:700; text-align:center;
  border:2px solid #dfe6da; border-radius:14px; padding:15px 16px; width:100%; max-width:340px;
  background:#fff; color:var(--prof); outline:none;
}
input[type=text]::placeholder{color:#7d8b80; font-weight:600;}
input[type=text]:focus{border-color:var(--campana); box-shadow:0 0 0 3px rgba(0,138,34,.18);}

.btn{
  font-family:var(--fc); font-weight:900; font-size:1.35rem; letter-spacing:.02em; text-transform:uppercase;
  border:none; border-radius:14px; padding:14px 28px 12px; cursor:pointer;
  background:var(--amarillo); color:var(--prof); box-shadow:0 5px 0 #c9ae00;
  transition:transform .15s cubic-bezier(.23,1,.32,1), box-shadow .15s ease, filter .15s ease;
  width:100%; max-width:340px; min-height:54px;
}
.btn:hover{filter:brightness(1.03);}
.btn:active{transform:translateY(3px); box-shadow:0 2px 0 #c9ae00;}
.btn[disabled]{opacity:.5; cursor:not-allowed; transform:none;}
.btn-verde{background:var(--campana); color:#fff; box-shadow:0 5px 0 #005e17;}
.btn-verde:active{box-shadow:0 2px 0 #005e17;}
.btn-outline{background:transparent; border:2px solid rgba(255,255,255,.6); color:#fff; box-shadow:none;}
.btn-outline:active{box-shadow:none;}

.msg-error{background:var(--error); color:#fff; font-weight:700; padding:10px 16px; border-radius:12px; font-size:.95rem; max-width:340px;}
.msg-ok{background:#fff; color:var(--prof); font-weight:600; padding:12px 16px; border-radius:12px; font-size:.95rem; border:2px solid var(--amarillo);}

.opciones{display:grid; grid-template-columns:1fr 1fr; gap:12px; width:100%; max-width:640px; padding:0 4px;}
.op{
  font-family:var(--fb); font-weight:800; font-size:1.05rem; color:#fff;
  border:none; border-radius:18px; padding:24px 12px; min-height:100px;
  display:flex; align-items:center; justify-content:center; gap:10px; text-align:center;
  cursor:pointer; transition:transform .12s ease, opacity .2s ease; box-shadow:0 6px 0 rgba(0,0,0,.25);
}
.op:active{transform:translateY(3px) scale(.98); box-shadow:0 3px 0 rgba(0,0,0,.25);}
.op.a{background:var(--a-color); color:var(--a-fg);}
.op.b{background:var(--b-color); color:var(--b-fg);}
.op.c{background:var(--c-color); color:var(--c-fg);}
.op.d{background:var(--d-color); color:var(--d-fg);}
.op .shape{width:22px;height:22px;flex-shrink:0;font-size:1.2rem;line-height:22px;}
.op[disabled]{opacity:.45; cursor:default;}
.op.elegida{opacity:1; outline:5px solid var(--amarillo); outline-offset:3px;}
.op.c.elegida,.op.a.elegida{outline-color:#fff;}

.timer{
  font-family:var(--fd); font-weight:900; font-size:2.3rem; color:var(--prof);
  width:72px; height:72px; border-radius:50%; background:#fff; border:6px solid var(--amarillo);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}

.roster{display:flex; flex-wrap:wrap; gap:8px; justify-content:center; max-width:900px;}
.chip{background:#fff; color:var(--prof); border-radius:999px; padding:8px 16px; font-weight:800; font-size:.92rem;}
.chip:nth-child(3n+2){background:var(--amarillo);}

.podio{display:flex; align-items:flex-end; gap:12px; justify-content:center; margin-top:20px;}
.podio .lugar{background:#fff; color:var(--prof); border-radius:16px 16px 0 0; padding:16px 12px; text-align:center; font-weight:800; min-width:104px;}
.podio .lugar.p1{background:var(--amarillo); height:170px;}
.podio .lugar.p2{height:130px;}
.podio .lugar.p3{background:var(--lima); height:100px;}
.podio .num{font-family:var(--fc); font-size:2rem; display:block;}

.spinner{width:34px;height:34px;border-radius:50%;border:4px solid rgba(255,255,255,.25);border-top-color:var(--amarillo);animation:spin .8s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s;} .btn,.op,.vc-btn{transition:none;}}

.footer-nota{font-size:.75rem; color:rgba(255,255,255,.6); padding:10px;}

/* host.php y pantalla.php muestran una "vista" a la vez (#v-lobby,
   #v-pregunta...) alternando su display a 'flex' desde JS: apiladas y centradas. */
[id^="v-"]{flex-direction:column; align-items:center; gap:16px; width:100%; text-align:center;}

/* Conteo por opción (barras) y filas de ranking: host.php y pantalla.php. */
.conteo-fila{display:flex; align-items:center; gap:10px; width:100%; max-width:500px; box-sizing:border-box;}
.conteo-fila .shape-tag,.shape-tag{width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-weight:900; flex-shrink:0; color:var(--prof);}
.barra{flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:10px; background:rgba(0,0,0,.22); border-radius:10px; overflow:hidden; height:34px;}
.barra-fill{height:100%; display:flex; align-items:center; padding:0 10px; font-weight:800; font-size:.85rem; white-space:nowrap; min-width:2ch; box-sizing:border-box; transition:width .4s cubic-bezier(.23,1,.32,1); color:var(--prof);}
.ranking-fila{display:flex; justify-content:space-between; width:100%; max-width:420px; padding:9px 14px; background:#fff; color:var(--prof); border-radius:10px; font-weight:800; box-sizing:border-box;}
.ranking-fila:first-child{background:var(--amarillo);}

/* ── Verdad o Cuento y datos opcionales ─────────────────────────────── */
.datos-opc{width:100%; max-width:340px; text-align:left; background:var(--cal); color:var(--prof); border-radius:14px; padding:0;}
.datos-opc summary{cursor:pointer; padding:13px 14px; font-weight:700; font-size:.95rem; list-style:none; text-align:center;}
.datos-opc summary::-webkit-details-marker{display:none;}
.datos-opc summary small{opacity:.7; font-weight:600;}
.datos-opc .datos-cuerpo{display:flex; flex-direction:column; gap:10px; padding:0 12px 14px;}
.datos-opc input[type=text]{max-width:none; font-size:1.05rem; padding:12px 14px;}
.acepto{display:flex; gap:10px; align-items:flex-start; font-size:.74rem; line-height:1.4; color:var(--tinta-2); cursor:pointer;}
.acepto input{width:22px; height:22px; flex-shrink:0; margin-top:1px; accent-color:var(--campana);}
.aviso-barra{background:var(--amarillo); color:var(--prof); border-radius:12px; padding:10px 14px; font-weight:800; font-size:.95rem; max-width:420px; margin:0;}

/* Celular: dos botones que llenan la pantalla (gente mayor, celulares viejos). */
.vc-celular{min-height:calc(100dvh - 110px); justify-content:flex-start;}
.vc-cabeza{display:flex; align-items:center; gap:12px; justify-content:center;}
.vc-lee{font-weight:700; font-size:1rem; margin:0; max-width:220px; text-align:left;}
.vc-botones{flex:1; display:flex; flex-direction:column; gap:16px; width:100%; max-width:560px; min-height:58dvh;}
.vc-btn{flex:1; border:none; border-radius:24px; font-family:var(--fc); font-weight:900; font-size:clamp(2.6rem,13vw,4.2rem); letter-spacing:.02em;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; cursor:pointer; min-height:140px;
  transition:transform .12s ease, opacity .2s ease; box-shadow:0 8px 0 rgba(0,0,0,.28);}
.vc-btn .vc-ico{font-family:var(--fb); font-size:.7em; line-height:1;}
.vc-btn:active{transform:translateY(4px) scale(.98); box-shadow:0 4px 0 rgba(0,0,0,.28);}
.vc-v{background:var(--campana); color:#fff; border:4px solid rgba(255,255,255,.9);}
.vc-f{background:var(--amarillo); color:var(--prof);}
.vc-btn[disabled]{opacity:.35; cursor:default; box-shadow:none;}
.vc-btn.elegida{opacity:1; outline:6px solid #fff; outline-offset:4px;}
.vc-f.elegida{outline-color:var(--campana);}

/* Pantalla grande y anfitrión */
.vc-afirmacion{font-family:var(--fc); font-weight:900; text-transform:none; font-size:clamp(2rem,5vw,4.4rem); line-height:1.08; max-width:1200px; margin:0;
  background:#fff; color:var(--prof); border-radius:24px; padding:clamp(18px,3vw,36px) clamp(18px,4vw,48px); box-shadow:10px 10px 0 var(--amarillo);}
.vc-quedan{display:inline-flex; align-items:baseline; gap:10px; background:var(--amarillo); color:var(--prof); border-radius:999px; padding:8px 22px; font-weight:800;}
.vc-quedan b{font-family:var(--fd); color:var(--prof); font-size:1.8em; line-height:1;}
.vc-veredicto{font-family:var(--fc); font-weight:900; font-size:clamp(3rem,10vw,7rem); line-height:1.08; margin:0; letter-spacing:.02em; padding:.16em .35em .1em; border-radius:16px;}
.vc-veredicto.v{background:var(--campana); color:#fff; border:5px solid #fff;} .vc-veredicto.f{background:var(--amarillo); color:var(--prof);}
.vc-explicacion{font-size:clamp(1.15rem,2.4vw,1.9rem); max-width:1000px; line-height:1.35; margin:0; background:rgba(255,255,255,.1); border-radius:16px; padding:14px 20px;}
.vc-salon{display:flex; gap:clamp(12px,3vw,40px); justify-content:center; width:100%; max-width:1000px;}
.vc-salon div{flex:1; border-radius:22px; padding:clamp(14px,3vw,28px); font-family:var(--fc); font-weight:900; font-size:clamp(1.6rem,4vw,3rem);}
.vc-salon .izq{background:var(--campana); color:#fff; border:4px solid #fff;} .vc-salon .der{background:var(--amarillo); color:var(--prof);}
.vc-salon small{display:block; font-family:var(--fb); font-size:.4em; font-weight:700; opacity:.9; text-transform:none;}
.ganadores{display:flex; flex-wrap:wrap; gap:12px; justify-content:center; max-width:1000px;}
.ganadores .g{background:var(--amarillo); color:var(--prof); border-radius:16px; padding:14px 22px; font-weight:900; font-size:1.2rem; box-shadow:0 6px 0 #c9ae00;}
.ganadores .g small{display:block; font-weight:700; font-size:.75em; opacity:.8;}
.contadores{display:flex; gap:10px; flex-wrap:wrap; justify-content:center;}
.contadores span{background:#fff; color:var(--prof); border-radius:12px; padding:8px 14px; font-weight:700; font-size:.95rem;}
.contadores b{color:var(--campana); font-family:var(--fd);}
