/* =============================================
   PROQUINIELAS MX — DISEÑO "CANCHA NOCTURNA"
   Verde estadio · Oro · Tipografía deportiva
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@400;500&family=Barlow+Condensed:wght@400;600;700;800;900&display=swap');

:root {
  /* Paleta principal */
  --verde-oscuro:   #0d2b18;
  --verde-card:     #112214;
  --verde-borde:    #1e3d28;
  --verde-mid:      #1a4d2a;
  --verde-activo:   #1f6035;
  --verde-hover:    #244d2f;
  --gris-texto:     #5a7a63;
  --blanco:         #f0ede8;
  --oro:            #c8a84b;
  --oro-claro:      #f5c842;
  --oro-oscuro:     #a88530;
  --rojo:           #e03a3a;
  --verde-wa:       #25D366;

  /* Tipografías */
  --f-titulo: 'Bebas Neue', 'Arial Black', sans-serif;
  --f-cuerpo: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --f-mono:   'DM Mono', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: #f7f7f5;
  color: #1a2a1f;
  font-family: var(--f-cuerpo);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 90px;
}

body::after { display: none; }

/* ── HEADER ─────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  background: rgba(13,43,24,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--verde-borde);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
}

/* Línea dorada decorativa en el header */
.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--oro), transparent);
  opacity: 0.5;
}

/* Logo ProQuinielas — izquierda */
.header-logo {
  height: 38px;
  width: auto;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: contain;
}

.header-logo-placeholder {
  height: 38px;
  width: 38px;
  background: var(--verde-borde);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-titulo);
  font-size: 11px;
  color: var(--blanco);
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* Logo Mundial — segunda pieza izquierda */
.header-mundial-logo {
  height: 43px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

/* Texto central — ocupa todo el espacio libre */
.header-center {
  flex: 1;
  min-width: 0;
  text-align: center;
  line-height: 1;
}

.header-jornada {
  font-family: var(--f-titulo);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--blanco);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-liga {
  font-family: var(--f-cuerpo);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--oro);
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
}

/* Badge Q## */
.header-badge {
  background: var(--oro);
  color: var(--verde-oscuro);
  font-family: var(--f-cuerpo);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 5px 9px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Mascota ZAYU — derecha */
.header-zayu-logo {
  height: 54px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

/* Pantallas pequeñas: escalar todo hacia abajo */
@media (max-width: 400px) {
  .header              { gap: 6px; padding: 0 8px; height: 60px; }
  .header-logo         { height: 30px; }
  .header-mundial-logo { height: 34px; }
  .header-jornada      { font-size: 17px; letter-spacing: 1px; }
  .header-liga         { font-size: 10px; letter-spacing: 1px; }
  .header-badge        { font-size: 12px; padding: 4px 7px; }
  .header-zayu-logo    { height: 42px; }
}

/* ── CONTENEDOR ─────────────────────────── */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 12px;
  position: relative;
  z-index: 1;
}

/* ── TIMER ──────────────────────────────── */
.timer-block {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 14px;
  padding: 14px 18px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.timer-izq {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.timer-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #7a9a82;
  text-transform: uppercase;
  text-align: center;
}

.timer-nota {
  font-size: 10px;
  color: #7a9a82;
  font-weight: 400;
  text-align: center;
}

.timer-value {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--f-cuerpo);
  font-size: 38px;
  font-weight: 900;
  color: #1a2a1f;
  letter-spacing: 0;
}

.timer-value .t-seg {
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: 8px;
  padding: 4px 10px;
  min-width: 58px;
  text-align: center;
  line-height: 1;
  color: var(--oro-claro);
}

.timer-value .t-sep {
  color: var(--oro);
  font-size: 28px;
  opacity: 0.5;
  margin-bottom: 2px;
  line-height: 1;
}

.timer-value.cerrada {
  color: var(--rojo);
  font-family: var(--f-titulo);
  font-size: 24px;
  letter-spacing: 4px;
}

/* ── BANNER CERRADA ─────────────────────── */
.banner-cerrada {
  display: none;
  background: rgba(224,58,58,0.12);
  border: 1px solid var(--rojo);
  color: var(--rojo);
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--f-titulo);
  font-size: 20px;
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.banner-cerrada.visible { display: block; }

/* ── INPUTS ─────────────────────────────── */
.datos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.input-wrap { display: flex; flex-direction: column; gap: 5px; }

.input-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #7a9a82;
  text-transform: uppercase;
}

.input-field {
  width: 100%;
  background: #ffffff;
  border: 1px solid #d6e0da;
  border-radius: 8px;
  padding: 11px 14px;
  font-family: var(--f-cuerpo);
  font-size: 16px;
  font-weight: 700;
  color: #1a2a1f;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.input-field::placeholder { color: #aac0b0; font-weight: 500; }
.input-field:focus { border-color: var(--verde-mid); }

/* ── BANNER INFO ────────────────────────── */
.info-banner {
  background: rgba(200,168,75,0.06);
  border: 1px solid rgba(200,168,75,0.2);
  border-left: 3px solid var(--oro);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #2a4a32;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* ── PARTIDOS ───────────────────────────── */
.partidos-lista {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.partido-card {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.partido-card.activo {
  box-shadow: 0 0 0 2px var(--verde-mid);
  border-radius: 12px;
}

.partido-num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: #aac0b0;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.equipo-bloque {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.equipo-bloque.visitante {
  align-items: center;
}

.nombre-wrap {
  width: 100%;
  overflow: hidden;
  text-align: center;
}

.equipo-nombre {
  font-family: var(--f-cuerpo);
  font-size: 11px;
  font-weight: 800;
  color: #1a2a1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  text-align: center;
  letter-spacing: 0.2px;
}

.logo-eq {
  width: 36px;
  height: 36px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #e2e8e4;
  background: #f0f4f1;
}

/* Placeholder para logos faltantes */
.logo-svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e8f0eb;
  border: 2px solid #d0e0d5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  color: #5a8a65;
  overflow: hidden;
  font-family: var(--f-cuerpo);
}

/* ── PICKS L/E/V ────────────────────────── */
.vs-picks {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.pick-btn {
  width: 36px;
  height: 36px;
  background: #f0f4f1;
  border: 1px solid #d6e0da;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-cuerpo);
  font-size: 14px;
  font-weight: 900;
  color: #8aaa92;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.1s;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  letter-spacing: 0;
}

.pick-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.pick-btn:active { transform: scale(0.9); }

/* L = verde, E = dorado, V = rojo — igual que antes en lógica */
.pick-btn.sel-L { background: #1e7a3c;    border-color: #1e7a3c;    color: #fff; }
.pick-btn.sel-E { background: var(--oro);  border-color: var(--oro);  color: var(--verde-oscuro); }
.pick-btn.sel-V { background: var(--rojo); border-color: var(--rojo); color: #fff; }

/* ── BOTÓN AZAR ─────────────────────────── */
.btn-azar-wrap {
  text-align: center;
  margin-bottom: 14px;
}

.btn-azar {
  background: #ffffff;
  border: 1px solid #d6e0da;
  color: #8aaa92;
  font-family: var(--f-cuerpo);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 28px;
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-azar:hover, .btn-azar:active {
  border-color: var(--verde-mid);
  color: var(--verde-mid);
}

/* ── RESUMEN ────────────────────────────── */
.resumen-card {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.seccion-titulo {
  font-family: var(--f-titulo);
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--verde-oscuro);
  margin-bottom: 12px;
}

.seleccion-display {
  font-family: var(--f-mono);
  font-size: 16px;
  letter-spacing: 5px;
  color: #1a2a1f;
  background: #f3f8f5;
  border: 1px solid #d6e0da;
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 14px;
  word-break: break-all;
  min-height: 44px;
}

.resumen-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 12px;
  border-top: 1px solid #e2e8e4;
}

.meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #7a9a82;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.meta-valor {
  font-family: var(--f-titulo);
  font-size: 30px;
  color: #1a2a1f;
  line-height: 1;
}

.precio-valor {
  font-family: var(--f-titulo);
  font-size: 40px;
  color: var(--verde-oscuro);
  line-height: 1;
}

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 5px;
}

.chip-desc {
  background: #eaf4ee;
  color: var(--verde-mid);
  border: 1px solid #c0ddc8;
}

/* ── ANIMACIONES 2x1 ───────────────────── */
@keyframes promo-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200,168,75,0.7); transform: scale(1); }
  50%  { box-shadow: 0 0 0 8px rgba(200,168,75,0); transform: scale(1.07); }
  100% { box-shadow: 0 0 0 0 rgba(200,168,75,0); transform: scale(1); }
}
@keyframes promo-shine {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes mini-promo-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

.chip-promo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--verde-oscuro);
  background: linear-gradient(90deg, #c8a84b, #f5c842, #e8d080, #f5c842, #c8a84b);
  background-size: 200% auto;
  border: 2px solid var(--oro-claro);
  animation: promo-pulse 1.6s ease-in-out infinite, promo-shine 2.2s linear infinite;
  cursor: default;
  user-select: none;
  margin-top: 8px;
}

/* ── TICKETS GUARDADOS ──────────────────── */
.jugadas-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8aaa92;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 0;
}

.jugadas-lista { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.jugada-item {
  background: #f7faf8;
  border: 1px solid #e2e8e4;
  border-left: 3px solid var(--verde-mid);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.jugada-nombre {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #7a9a82;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.jugada-picks {
  font-family: var(--f-mono);
  font-size: 13px;
  color: #1a2a1f;
  letter-spacing: 2px;
}

.jugada-precio {
  font-family: var(--f-titulo);
  font-size: 22px;
  color: var(--verde-oscuro);
}

.btn-borrar {
  background: none;
  border: none;
  color: #aac0b0;
  font-size: 14px;
  cursor: pointer;
  padding-left: 10px;
  transition: color 0.2s;
  line-height: 1;
}
.btn-borrar:hover { color: var(--rojo); }

/* ── ACTION BAR ─────────────────────────── */
.action-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(13,43,24,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--verde-borde);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  z-index: 200;
}

.btn {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: 8px;
  font-family: var(--f-cuerpo);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-guardar {
  background: var(--oro);
  color: var(--verde-oscuro);
}

.btn-guardar:disabled {
  background: #d6e0da;
  color: #8aaa92;
  cursor: not-allowed;
  transform: none;
}

.btn-whatsapp {
  background: var(--verde-wa);
  color: white;
}

/* ── MODAL WHATSAPP ─────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.visible {
  display: flex;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-top: 3px solid var(--oro);
  border-radius: 14px;
  padding: 24px 22px;
  max-width: 350px;
  width: 100%;
  animation: slideUp 0.22s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-icon { font-size: 32px; margin-bottom: 10px; }

.modal-titulo {
  font-family: var(--f-titulo);
  font-size: 26px;
  letter-spacing: 2px;
  color: #1a2a1f;
  margin-bottom: 8px;
}

.modal-texto {
  font-size: 14px;
  font-weight: 500;
  color: #5a7a65;
  line-height: 1.55;
  margin-bottom: 20px;
}

.modal-texto strong { color: var(--oro); }

.modal-btns { display: flex; flex-direction: column; gap: 8px; }

.modal-btn-ok {
  background: var(--verde-wa);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-family: var(--f-cuerpo);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.modal-btn-cancel {
  background: transparent;
  color: #7a9a82;
  border: 1px solid #d6e0da;
  border-radius: 8px;
  padding: 13px;
  font-family: var(--f-cuerpo);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

/* ── MINI STICKY ────────────────────────── */
.mini-sticky {
  position: fixed;
  bottom: 72px;
  left: 10px; right: 10px;
  z-index: 150;
  display: none;
}

.mini-sticky.visible {
  display: block;
  animation: slideUp 0.25s ease;
}

.mini-sticky-inner {
  background: rgba(255,255,255,0.97);
  border: 1px solid #d6e0da;
  border-top: 2px solid var(--verde-mid);
  border-radius: 10px;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-nombre {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #7a9a82;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.mini-picks {
  font-family: var(--f-mono);
  font-size: 13px;
  color: #1a2a1f;
  letter-spacing: 3px;
}

.mini-promo {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--oro);
  text-transform: uppercase;
  margin-bottom: 1px;
  text-align: right;
}
.mini-promo.es-2x1 {
  animation: mini-promo-blink 1.1s ease-in-out infinite;
  color: var(--oro-claro);
}

.mini-precio {
  font-family: var(--f-titulo);
  font-size: 22px;
  color: var(--verde-oscuro);
  text-align: right;
}

/* ── TOAST NOTIFICACIÓN ─────────────────── */
#toast-pq {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #ffffff;
  border: 1px solid var(--verde-mid);
  color: var(--verde-oscuro);
  font-family: var(--f-cuerpo);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 12px 24px;
  border-radius: 10px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

#toast-pq.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 480px) {
  .datos-grid      { grid-template-columns: 1fr; }
  .equipo-nombre   { font-size: 12px; }
  .logo-eq, .logo-svg { width: 28px; height: 28px; }
  .pick-btn        { width: 34px; height: 34px; font-size: 13px; }
  .precio-valor    { font-size: 32px; }
  .btn             { font-size: 14px; padding: 12px; }
}