/* === ESTILOS GENERALES === */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  background: #111;
  color: white;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === HEADER === */
.header {
  background: #1a1a1a;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #9333ea;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.header .logo {
  font-size: 1.5rem;
  color: #facc15;
  font-weight: bold;
}

/* NAV DESKTOP */
.header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.header nav a:hover {
  background-color: #222;
  color: #facc15;
  transform: scale(1.05);
}

.btn-boletos {
  background: #9333ea;
  color: white;
  font-weight: bold;
  box-shadow: 0 0 6px #9333ea88;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-boletos:hover {
  background-color: #7c2dd1;
  transform: scale(1.05);
}

/* === SECCIÓN COMBO === */
.combo-section {
  display: flex;
  padding: 2rem;
  background: linear-gradient(to right, #1b1b1b, #111);
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.combo-img {
  width: 300px;
  border-radius: 12px;
  flex-shrink: 0;
}

.combo-info h1 {
  font-size: 2rem;
  color: #facc15;
}

.combo-info ul {
  text-align: justify;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.combo-info li {
  margin: 0.5rem 0;
}

/* === SECCIÓN BOLETOS === */
.boletos-section {
  padding: 2rem;
  text-align: center;
  flex-grow: 1;
}

.buscador-boleto,
.controles-azar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.buscador-boleto input,
.verificador-section input {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: none;
  background-color: #222;
  color: #facc15;
  font-size: 1rem;
  width: 200px;
  text-align: center;
  font-weight: bold;
  outline: none;
}

.buscador-boleto button,
.verificador-section button,
.controles-azar button {
  background: #360068;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lista-boletos {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-height: 300px;
  overflow-y: auto;
  background: #222;
  padding: 1rem;
  border-radius: 8px;
  user-select: none;
}

.boleto {
  position: relative;
  width: 40px;
  height: 40px;
  background: #333;
  color: #facc15;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
}

.boleto.seleccionado {
  background-color: #9333ea;
  color: white;
}

.boleto.ocupado {
  background-color: #ccc;
  color: #666;
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

/* === FORMULARIO === */
.form-section {
  background: #1a1a1a;
  padding: 2rem;
  margin: 2rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-section input[type="text"],
.form-section input[type="tel"],
.form-section input[type="email"],
.form-section input[type="file"] {
  width: 100%;
  background: #171717;
  padding: 0.75rem;
  border-radius: 6px;
  border: none;
  color: white;
}


#confirmarBtn {
  width: 100%;
  background: #9333ea;
  padding: 1rem;
  font-weight: bold;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

/* === MÉTODOS DE PAGO DETALLE === */
.pago-info {
  margin-top: 1rem;
}

.pago-detalle {
  display: none;
  background: #1a1a1a;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 0 10px #9333ea;
  margin-bottom: 1rem;
}

.pago-detalle.active {
  display: block;
}

.icono-metodo {
  width: 48px;
  height: 48px;
  display: block;
  margin-bottom: 0.5rem;
}

.pago-detalle h4 {
  color: #facc15;
}

.copiar-btn {
  background: #facc15;
  border: none;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin-left: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.85rem;
  color: black;
}

/* === VERIFICADOR === */
.verificador-section {
  padding: 2rem;
  background: #111;
  text-align: center;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 1rem;
  background: #000;
  color: #666;
  margin-top: auto;
}

/* === MENÚ RESPONSIVE === */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: #facc15;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .header nav {
    position: fixed;
    top: 60px;
    right: 0;
    background-color: #111;
    width: 200px;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 1.2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    border-left: 2px solid #9333ea;
  }

  .header nav.active {
    transform: translateX(0);
  }

  .header nav a {
    margin-left: 0;
    font-size: 1.2rem;
    width: 100%;
    padding: 0.3rem 0;
  }

  .combo-section {
    flex-direction: column;
    padding: 1rem;
  }

  .form-section {
    margin: 1rem;
    padding: 1.5rem;
  }

  .boletos-section h2,
  .boletos-section h3,
  .form-section h3,
  .verificador-section h3 {
    font-size: 1.2rem;
  }

  .combo-info h1 {
    font-size: 1.5rem;
  }
}

@keyframes flash {
  0%, 100% {
    background-color: #9333ea;
    color: white;
  }
  50% {
    background-color: #facc15;
    color: black;
  }
}

@keyframes flash {
  0%, 100% {
    background-color: #9333ea;
    color: white;
  }
  50% {
    background-color: #facc15;
    color: black;
  }
}

.boleto.flash {
  animation: flash 1s infinite;
}

.conversion-bolivar {
  text-align: center;
  margin: 1rem 0;
  font-size: 1.1rem;
  color: #facc15;
  font-weight: bold;
}

.ticket-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.ticket-preview {
  position: relative;
  background: linear-gradient(135deg, #51009c, #51009c);
  color: white;
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  padding: 1rem;
  font-family: 'Segoe UI', sans-serif;
}

.ticket-preview::before,
.ticket-preview::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.ticket-preview::before {
  left: -20px;
}

.ticket-preview::after {
  right: -20px;
}

.ticket-header {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.ticket-subtitle {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 500;
  color: #facc15;
}

.ticket-numeros {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  justify-content: center;
  margin-bottom: 1rem;
}

.ticket-numeros .num {
  background-color: #facc15;
  color: #111827;
  padding: 8px 0;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ticket-footer {
  border-top: 1px solid #e9d5ff;
  padding-top: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

.file-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem auto;
  padding: 1rem;
  border: 2px dashed #eaff4f;
  border-radius: 12px;
  background-color: #51009c;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.file-label {
  background-color: #eaff4f;
  color: #51009c;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
  text-align: center;
}

.file-label:hover {
  background-color: #357ab8;
}

.file-input {
  display: none;
}

.file-name {
  font-size: 0.9rem;
  color: #ffffff;
  margin-top: 5px;
  text-align: center;
  word-wrap: break-word;
}

.metodo {
  width: 80px;
  height: 80px;
  margin: 10px;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

.metodo.activo {
  border: 2px solid #4caf50;
  box-shadow: 0 0 10px #4caf50;
}

.info-metodo {
  margin-top: 20px;
  padding: 15px;
  background-color: #323232;
  border-radius: 10px;
  font-size: 16px;
}

.metodos img {
  width: 50px;
  height: 50px;
}

#nombre,
#email,
#codigoPais,
#telefono {
  background-color: #171717;
  color: #eee;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}


#nombre::placeholder,
#email::placeholder,
#telefono::placeholder {
  color: #bbb;
}

#nombre:focus,
#email:focus,
#codigoPais:focus,
#telefono:focus {
  border-color: #9333ea;
  background-color: #222;
  outline: none;
  box-shadow: 0 0 8px #9333ea88;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Código teléfono container */
.codigo-telefono {
  display: flex;
  gap: 1rem;
  width: 100%;
  flex-wrap: nowrap;
}

.codigo-telefono select {
  width: 35%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #333;
  background-color: #171717;
  color: #eee;
  font-size: 1rem;
}

.codigo-telefono input[type="tel"] {
  width: 65%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #333;
  background-color: #171717;
  color: #eee;
  font-size: 1rem;
}

/* Pulso para botón seleccionado */
.boleto.seleccionado {
  animation: pulseGlow 1s ease forwards;
  box-shadow: 0 0 10px 2px #9333ea;
  position: relative;
  z-index: 1;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 10px 2px #9333ea;
  }
  50% {
    box-shadow: 0 0 20px 6px #9333ea;
  }
  100% {
    box-shadow: 0 0 10px 2px #9333ea;
  }
}

/* Confetti container */
.confetti {
  position: absolute;
  pointer-events: none;
  width: 8px;
  height: 8px;
  background-color: #9333ea;
  opacity: 0.9;
  animation: confettiFall 1.2s linear forwards;
  border-radius: 2px;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(80px) rotate(360deg);
    opacity: 0;
  }
}

/* Overlay de carga fullscreen */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden; /* inicialmente oculto */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Mostrar overlay */
#loadingOverlay.active {
  visibility: visible;
  opacity: 1;
}

/* Spinner grande */
#loadingOverlay .spinner {
  width: 80px;
  height: 80px;
  border: 10px solid rgba(255,255,255,0.3);
  border-top-color: #facc15; /* color amarillo para que destaque */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animación giro */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#progressContainer {
  display: none;
  margin-top: 10px;
  width: 100%;
  max-width: 400px;
  background: #333;
  border-radius: 6px;
}

#progressBar {
  width: 0%;
  height: 10px;
  background: linear-gradient(90deg, #9333ea, #facc15);
  border-radius: 6px;
  transition: width 0.3s ease;
}

/* Preloader full screen overlay */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Spinner animado */
.spinner {
  border: 8px solid #eee;
  border-top: 8px solid #9333ea;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  animation: spin 1.2s linear infinite;
}

/* Animación giro */
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

#descargarTicketBtn {
  background: linear-gradient(90deg, #9333ea, #facc15);
  color: #111;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 12px 25px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

#descargarTicketBtn:hover {
  background: linear-gradient(90deg, #facc15, #9333ea);
  box-shadow: 0 6px 15px rgba(250, 204, 21, 0.7);
}

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}