/* ===== Batalla v2 ===== */
.bv2-wrap { max-width: 1000px; margin: 0 auto; padding: 16px; color: #1f2430; }
.bv2-wrap h1, .bv2-wrap h2, .bv2-wrap h3, .bv2-wrap h4, .bv2-wrap p, .bv2-wrap label { color: #1f2430; }
.bv2-wrap .text-muted { color: #6b7280 !important; }
.bv2-hidden { display: none !important; }

.bv2-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.bv2-title { font-weight: 800; font-size: 1.4rem; margin: 0; }
.bv2-saldo {
  background: #10241b; color: #7CFFC4; border: 1px solid #1f5c43;
  padding: 6px 14px; border-radius: 999px; font-weight: 700;
}

/* Lobby */
.bv2-card {
  background: #fff; color: #1f2430; border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px; padding: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.06);
}
.bv2-entradas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; }
.bv2-entrada {
  cursor: pointer; border: 2px solid rgba(0,0,0,.1); border-radius: 14px;
  padding: 14px; text-align: center; transition: all .15s ease; background: #fff;
}
.bv2-entrada:hover { transform: translateY(-2px); border-color: #6c5ce7; }
.bv2-entrada.sel { border-color: #6c5ce7; box-shadow: 0 0 0 3px rgba(108,92,231,.25); }
.bv2-entrada .precio { font-size: 1.5rem; font-weight: 800; color: #6c5ce7; }
.bv2-entrada .premios { font-size: .8rem; color: #666; margin-top: 4px; }

/* Título llamativo del lobby */
.bv2-wrap h1.bv2-hero-title {
  text-align: center; font-weight: 900; font-size: clamp(1.6rem, 5.5vw, 2.5rem);
  margin: 6px 0 20px; letter-spacing: .5px; line-height: 1.15;
  background: linear-gradient(135deg, #6c5ce7 0%, #d63384 48%, #fd7e14 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 8px rgba(108,92,231,.35));
}

/* Subtítulos de paso con badge numerado */
.bv2-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 800; color: #2d2140 !important;
  margin: 0 0 16px;
}
.bv2-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; font-size: .95rem; font-weight: 800;
  background: linear-gradient(135deg, #6c5ce7, #8e7bff); color: #fff;
  box-shadow: 0 3px 8px rgba(108,92,231,.4);
}

/* Card de instrucciones */
.bv2-instrucciones { margin-top: 16px; }
.bv2-reglas { margin: 0 0 14px; padding-left: 22px; line-height: 1.6; color: #34313f; }
.bv2-reglas li { margin-bottom: 6px; }
.bv2-regla-importante {
  background: linear-gradient(135deg, #fff3cd, #ffe08a); border: 2px solid #ffc107;
  border-radius: 12px; padding: 14px 16px; line-height: 1.55; color: #6b4e00;
}
.bv2-regla-importante strong { color: #7a3d00; }

.bv2-carton-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.bv2-btn {
  border: none; border-radius: 12px; padding: 12px 22px; font-weight: 800;
  cursor: pointer; font-size: 1rem; transition: transform .1s ease, filter .15s ease;
}
.bv2-btn:active { transform: scale(.97); }
.bv2-btn[disabled] { opacity: .5; cursor: not-allowed; }
.bv2-btn-primary { background: linear-gradient(135deg,#6c5ce7,#8e7bff); color: #fff; }
.bv2-btn-jugar { background: linear-gradient(135deg,#00b894,#00cec9); color: #fff; font-size: 1.15rem; padding: 16px 28px; width: 100%; }
.bv2-btn-bingo { background: linear-gradient(135deg,#e17055,#d63031); color: #fff; font-size: 1.3rem; padding: 18px; width: 100%; animation: bv2-pulse 1s ease-in-out infinite; }
.bv2-btn-bingo:disabled, .bv2-btn-bingo[disabled] { animation: none; background: linear-gradient(135deg,#c7ccd1,#aeb4ba); color: #fff; opacity: 1; }
.bv2-player .bv2-btn-bingo { margin-top: 12px; }
.bv2-btn-ghost { background: transparent; border: 2px solid rgba(0,0,0,.15); color: inherit; }
@keyframes bv2-pulse { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.03); filter: brightness(1.1);} }

.bv2-status { text-align: center; margin-top: 14px; min-height: 24px; font-weight: 600; }
.bv2-spinner { width: 42px; height: 42px; border: 4px solid rgba(108,92,231,.25); border-top-color: #6c5ce7; border-radius: 50%; animation: bv2-spin 1s linear infinite; margin: 12px auto; }
@keyframes bv2-spin { to { transform: rotate(360deg);} }

/* Ruleta */
.bv2-ruleta { display: flex; justify-content: center; gap: 10px; margin: 16px 0; }
.bv2-mult {
  width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem; background: #2d2140; color: #cbb6ff; border: 2px solid #3d2f5c;
  transition: all .12s ease;
}
.bv2-mult.on { background: linear-gradient(135deg,#ffd700,#ffa502); color: #1a1a1a; transform: scale(1.12); box-shadow: 0 0 22px rgba(255,215,0,.6); }
.bv2-mult.win { background: linear-gradient(135deg,#00b894,#00cec9); color: #fff; transform: scale(1.2); box-shadow: 0 0 30px rgba(0,206,201,.7); }

/* Números que salen — bolitas (estilo bingo en vivo) sobre franja oscura */
.bv2-caller { background: linear-gradient(135deg,#1b1030,#2d1b4e); border-radius: 14px; padding: 16px; margin-top: 8px; }
.bv2-caller h3 { color: #fff !important; margin: 0 0 12px; }
.bv2-balls { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; min-height: 60px; align-items: center; }
.bv2-ball {
  width: 54px; height: 54px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: linear-gradient(45deg,#ffffff,#f0f0f0);
  color: #333; font-weight: 900; box-shadow: 0 4px 12px rgba(255,255,255,.25); border: 2px solid #fff;
  transition: all .3s ease;
}
.bv2-ball .l { font-size: .8rem; line-height: 1; color: #6c5ce7; font-weight: 900; }
.bv2-ball .n { font-size: 1.15rem; line-height: 1; font-weight: 900; }
.bv2-ball.nuevo { animation: bv2-pop .5s ease-out; }
.bv2-ball.actual { transform: scale(1.22); box-shadow: 0 0 22px rgba(255,215,0,.75); border-color: #ffd700; }
@keyframes bv2-pop { 0% { transform: scale(.4); opacity: 0;} 60% { transform: scale(1.15);} 100% { transform: scale(1); opacity: 1;} }
.bv2-caller .bv2-progreso { text-align: center; color: #c9b6ff; font-size: .85rem; margin-top: 10px; }

/* Arena de cartones */
.bv2-arena { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.bv2-player { border-radius: 16px; padding: 12px; border: 2px solid rgba(0,0,0,.08); }
.bv2-player.yo { border-color: #6c5ce7; }
.bv2-player.lleno { border-color: #00b894; box-shadow: 0 0 0 3px rgba(0,184,148,.25); }
.bv2-player h4 {
  margin: 0 0 10px; display: block; text-align: center;
  font-size: 1.25rem; font-weight: 800; color: #fff !important;
  background: linear-gradient(135deg,#6c5ce7,#8e7bff);
  padding: 10px 12px; border-radius: 12px; letter-spacing: .3px;
  text-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.bv2-player.lleno h4 { background: linear-gradient(135deg,#00b894,#00cec9); }
.bv2-carton {
  display: grid; grid-template-columns: repeat(5,1fr); gap: 5px;
  background: #fff; padding: 8px; border-radius: 14px; border: 3px solid #e3f2fd;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.bv2-cab {
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-weight: 900; font-size: clamp(1.2rem,5vw,1.75rem); color: #fff;
  background: linear-gradient(135deg,#ff6b6b,#ee5a24); border: 2px solid #ff4757;
  text-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.bv2-celda {
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: linear-gradient(135deg,#f8f9fa,#e9ecef); border: 2px solid #dee2e6;
  color: #495057; font-weight: 800; font-size: clamp(1rem,4.2vw,1.6rem);
  transition: all .3s ease; position: relative; overflow: hidden;
}
.bv2-celda .bv2-n { position: relative; z-index: 1; }
.bv2-celda.free { background: linear-gradient(135deg,#ffd93d,#ffb347); border-color: #ffa726; color: #d84315; font-weight: 800; font-size: .85rem; }
.bv2-celda.marcada {
  background: linear-gradient(135deg,#4caf50,#66bb6a); border-color: #4caf50; color: #fff;
  transform: scale(1.05); box-shadow: 0 4px 15px rgba(76,175,80,.4); animation: bv2-marcar .5s ease-out;
}
.bv2-celda.marcada::before {
  content: ''; position: absolute; inset: 0; margin: auto; width: 62%; height: 62%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat center;
  background-size: contain; opacity: .85; z-index: 0;
}
@keyframes bv2-marcar { 0% { transform: scale(1);} 50% { transform: scale(1.2);} 100% { transform: scale(1.05);} }

/* "Casi ganas": cuando faltan 1-2 números, las casillas pendientes vibran y la card late */
.bv2-celda.casi {
  background: linear-gradient(135deg,#fff3cd,#ffe08a) !important;
  border-color: #ffc107 !important; color: #7a3d00 !important;
  box-shadow: 0 0 0 3px rgba(255,193,7,.45), 0 0 14px rgba(255,193,7,.6);
  animation: bv2-casi .55s ease-in-out infinite;
  z-index: 2;
}
@keyframes bv2-casi {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.14) rotate(-4deg); }
  50% { transform: scale(1.16) rotate(0deg); }
  75% { transform: scale(1.14) rotate(4deg); }
}
.bv2-carton.palpito { animation: bv2-palpito .8s ease-in-out infinite; }
@keyframes bv2-palpito {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,.15); border-color: #e3f2fd; }
  50% { box-shadow: 0 0 0 4px rgba(214,51,132,.4), 0 12px 34px rgba(214,51,132,.5); border-color: #ff8fcf; }
}

/* Resultado */
.bv2-overlay {
  position: fixed; inset: 0; background: rgba(10,8,20,.72); display: flex; align-items: center; justify-content: center;
  z-index: 3000; padding: 20px;
}
.bv2-modal { background: #fff; color: #1f2430; border-radius: 20px; padding: 28px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.bv2-modal h2 { color: #1f2430; }
.bv2-modal .text-muted { color: #6b7280 !important; }
.bv2-revancha-msg { min-height: 22px; margin: 6px 0 10px; font-weight: 800; color: #6c5ce7; }
.bv2-modal .bv2-btn { margin-top: 4px; }
.bv2-modal.win { border-top: 8px solid #00b894; }
.bv2-modal.lose { border-top: 8px solid #d63031; }
.bv2-modal h2 { margin: 6px 0; font-size: 1.8rem; }
.bv2-modal .monto { font-size: 2.2rem; font-weight: 800; margin: 8px 0; }
.bv2-modal .win .monto { color: #00b894; }

/* Diseño móvil de BingoTovar */
.bv2-wrap { max-width:456px; padding:20px 16px 100px; color:#182652; font-family:Poppins,system-ui,sans-serif; }
.bv2-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:18px; }
.bv2-heading img { width:82px; height:92px; object-fit:contain; }
.bv2-back { display:inline-block; margin-bottom:10px; color:#435798; font-weight:700; font-size:13px; text-decoration:none; }
.bv2-wrap h1.bv2-hero-title { text-align:left; color:#182652; -webkit-text-fill-color:initial; background:none; filter:none; font-size:30px; letter-spacing:-.04em; margin:0 0 6px; }
.bv2-heading p { margin:0; font-size:13px; line-height:1.4; color:#52617d; }
.bv2-card { border:1px solid #e0e5ef; border-radius:18px; box-shadow:none; padding:17px; }
.bv2-step { color:#182652 !important; font-size:17px; margin-bottom:12px; }
.bv2-step-num { background:#293eb1; box-shadow:none; }
.bv2-entradas { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.bv2-entrada { padding:12px 7px; background:#f6f8ff; border-color:#e0e5f1; }
.bv2-entrada.sel { border-color:#293eb1; background:#e9edff; box-shadow:0 0 0 2px #293eb126; }
.bv2-entrada .precio { color:#253ba8; }
.bv2-entrada .premios { color:#4b5874; line-height:1.35; }
.bv2-carton-pick label { padding:9px; border-radius:9px; background:#f1f4fa; font-size:13px; font-weight:700; }
.bv2-btn-jugar { background:#ffca48; color:#182652; }
.bv2-btn-primary { background:#293eb1; color:white; }
.bv2-btn-ghost { color:#293b7b; border-color:#cbd4e7; }
.bv2-status:empty { min-height:0; margin:0; }
.bv2-instrucciones { background:#f5f7ff; }
.bv2-reglas { font-size:13px; line-height:1.5; }
.bv2-regla-importante { font-size:13px; }
.bv2-caller { background:#192963; }
.bv2-player { background:white; border-color:#dce2ef; }
.bv2-player.yo { border-color:#293eb1; }
.bv2-player h4 { background:#293eb1; text-shadow:none; }
.bv2-modal { max-height:calc(100dvh - 32px); overflow:auto; }
.bv2-overlay { padding:16px; }
@media (prefers-reduced-motion:reduce) { .bv2-wrap *, .bv2-modal * { animation-duration:.01ms !important; animation-iteration-count:1 !important; } }

.bv2-heading { display:block; }
.bv2-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.bv2-top .bv2-back { margin:0; }
.bv2-help { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:6px 12px; border:0; border-radius:12px; color:#252554; background:#ffda71; font-size:12px; font-weight:800; cursor:pointer; }
.bv2-help span { display:grid; place-items:center; width:20px; height:20px; border:2px solid currentColor; border-radius:50%; }
#bv2-guia { position:fixed; inset:0; width:min(410px,calc(100% - 24px)); max-height:84vh; max-height:84dvh; margin:auto; padding:0; overflow:hidden; border:0; border-radius:18px; background:#fffaf2; color:#19264a; box-shadow:0 12px 48px #121c4d55; }
#bv2-guia::backdrop { background:#101936bc; }
#bv2-guia form { display:flex; flex-direction:column; max-height:inherit; margin:0; }
.bv2-guia-head { display:flex; align-items:center; justify-content:space-between; flex:none; padding:10px 16px; background:#293ba0; color:white; }
.bv2-guia-head h2 { margin:0; color:white; font-size:22px; }
.bv2-guia-head button { width:44px; height:44px; border:0; border-radius:50%; background:#ffffff22; color:white; font-size:25px; cursor:pointer; }
#bv2-guia ol { margin:0; padding:18px 16px 18px 44px; overflow-y:auto; overscroll-behavior:contain; list-style:decimal outside; }
#bv2-guia li { padding-left:5px; margin-bottom:12px; }
#bv2-guia li:last-child { margin-bottom:0; }
#bv2-guia li::before { content:none; }
#bv2-guia li::marker { color:#3743a4; font-weight:800; }
.bv2-guia-close { flex:none; margin:0 16px 16px; min-height:44px; border:0; border-radius:10px; background:#ffca48; color:#192652; font-weight:800; cursor:pointer; }

.bv2-visitor { padding:12px 14px; border-radius:12px; background:#e9edff; color:#29335f; font-size:13px; }
.bv2-visitor a { color:#253ba0; font-weight:750; text-decoration:underline; }

