/* ticket_grid.css - Sistema de diseño para portal de sorteos (botonera) */
/* Migrado 1:1 desde botonera.php — NO modificar funcionalidad */


:root {
  /* Colores principales */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #ec4899;
  --secondary-dark: #db2777;
  --accent: #f59e0b;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --gradient-dark: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  
  /* Colores de fondo */
  --bg-primary: #000000;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --bg-card:#0a0a0a;
  
  /* Colores de texto */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  /* Estados */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);
  
  /* Bordes */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Transiciones */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

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

/* ==========================================================================
   FUENTES LOCALES (Inter & Poppins)
   ========================================================================== */

/* Inter */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: optional;
  src: url('../fonts/inter-v20-latin-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: optional;
  src: url('../fonts/inter-v20-latin-800.woff2') format('woff2');
}

/* Poppins */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('../fonts/poppins-v24-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('../fonts/poppins-v24-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-v24-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: optional;
  src: url('../fonts/poppins-v24-latin-800.woff2') format('woff2');
}









body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary) !important;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image: radial-gradient(circle at top left, rgba(140, 43, 238, .2) 0%, transparent 40%);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Raffle Hero (título + imagen) */
.raffle-hero {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 0 0.5rem;
}

.raffle-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.raffle-hero-img-wrapper {
  display: block;
  margin: 0 auto;
  max-width: 450px;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.raffle-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 640px) {
  .raffle-hero-title {
    font-size: 1.25rem;
  }
  .raffle-hero-img-wrapper {
    max-width: 320px;
    border-radius: 8px;
  }
}

/* Raffle Carousel */
.raffle-carousel {
  position: relative;
  max-width: 450px;
  width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.raffle-carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
}

.raffle-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  z-index: 1;
}

.raffle-carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.raffle-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Carousel Arrows */
.raffle-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.raffle-carousel:hover .raffle-carousel-arrow { opacity: 1; }
.raffle-carousel-arrow:hover { background: rgba(0, 0, 0, 0.7); }
.raffle-carousel-arrow:active { transform: translateY(-50%) scale(0.92); }
.raffle-carousel-prev { left: 8px; }
.raffle-carousel-next { right: 8px; }

.raffle-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.raffle-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.raffle-carousel-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.raffle-carousel-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
}

@media (max-width: 640px) {
  .raffle-carousel {
    max-width: 320px;
    border-radius: 8px;
  }

  .raffle-carousel-arrow {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    opacity: 0.7;
  }

  .raffle-carousel-prev { left: 5px; }
  .raffle-carousel-next { right: 5px; }

  .raffle-carousel-dots {
    bottom: 8px;
    gap: 6px;
  }

  .raffle-carousel-dot {
    width: 8px;
    height: 8px;
  }
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem;
  width:95%;
}

/* Header */
.header {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

/* Card hover: no transform to avoid CLS on layout containers */
.card:hover {
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-secondary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Grid de números */
.numeros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); 
  gap: 0.75rem;
  margin: 0rem 0;
}

.numero-item {
  min-width: 60px;
  height: 60px; 
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem; 
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  padding: 0 0.25rem;
  color: var(--text-primary); 
}

.numero-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 1; 
}

.numero-item span, .numero-item b {
  position: relative;
  z-index: 2; 
  color: inherit; 
  white-space: nowrap;
}

.numero-item:hover:not(.reservado):not(.pagado) {
  transform: scale(1.05);
  border-color: var(--primary);
}

.numero-item.seleccionado {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
  color: var(--text-primary); 
}

.numero-item.seleccionado::before {
  opacity: 1;
}

.numero-item.reservado::before {
  opacity: 1;
}

.numero-item.reservado {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
  cursor: not-allowed;
  color: transparent;
}

.numero-item.pagado {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--success);
  cursor: not-allowed;
  opacity: 0.6;
}

.numero-item.extra {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Desktop: acercar los datos al centro del banner */
@media (min-width: 641px) {
  .seleccion-stat:first-child {
    justify-self: end;
  }
  .seleccion-stat:last-child {
    justify-self: start;
  }
}

/* Banner de premio */
.premio-banner {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  margin-bottom: 2rem;
}

.premio-info {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.premio-info h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.premio-details {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.premio-detail {
  text-align: center;
}

.premio-detail-label {
  font-size: 0.875rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premio-detail-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 0.25rem;
}

/* Tabla */
.table-container {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  height: 300px;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

thead {
  background: var(--gradient-dark);
  position: sticky;
  top: 0;
  z-index: 2;
  color:white !important;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.badge-info {
  background: rgba(59, 130, 246, 0.2);
  color: var(--info);
  border: 1px solid var(--info);
}

/* ================================
   Barra de selección (robusta)
   ================================ */

.seleccion-info {
  position: sticky;
  bottom: 0;
  z-index: 900;
  background: var(--gradient-primary);
  padding: 0.8rem 1.2rem;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "left bono right"
    "button button button";
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.6rem 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.seleccion-bono-badge {
  grid-area: bono;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  animation: bonoBadgePulse 2s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.seleccion-bono-badge:hover {
  transform: scale(1.08);
}

@keyframes bonoBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50% { box-shadow: 0 0 10px 3px rgba(245,158,11,0.2); }
}

.seleccion-stat:first-child .seleccion-stat-label,
.seleccion-stat:first-child .seleccion-stat-value {
  text-align: center;
}

.seleccion-stats {
  display: contents;
}

.seleccion-stat:first-child {
  grid-area: left;
  text-align: left;
}

.seleccion-stat:last-child {
  grid-area: right;
  text-align: right;
}

.seleccion-stat-label {
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  opacity: 0.9;
}

.seleccion-stat-value {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 800;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-apartar,
.seleccion-info button {
  grid-area: button;
  justify-self: center;
  min-width: 260px;
}

@media (max-width: 640px) {
  .seleccion-info {
    border-radius: 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem 0;
  }

  .card {
    padding: 1rem 0.75rem;
    border-radius: 0; 
  }

  .header-content {
      padding: 0 1rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .numeros-grid {
    grid-template-columns: repeat(5, 1fr); 
    gap: 0.5rem;
    overflow-x: hidden;
    min-width: unset; 
  }
  
  .numero-item {
    font-size: 0.8rem; 
    height: 50px; 
    padding: 0 0.1rem; 
    min-width: 60px; 
    transform: none !important;
  }
  
  .numero-item span {
    font-size: 1rem;
  }
  
  .premio-info h1 {
    font-size: 1.75rem;
  }
  
  .premio-details {
    gap: 1.5rem;
  }

  .table-container {
    font-size: 0.875rem;
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
  }
}

/* Animaciones — opacity-only to avoid CLS from transform shifts */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Utilidades */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-3 { padding-top: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Clases específicas para la lógica de selección */
.font-lulo {
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Promos display */
.promos-display {
    text-align: center;
    margin-bottom: 16px;
}

.promos-display-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.promo-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    margin: 2px 3px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.promo-item-tickets {
    font-weight: 800;
    color: var(--primary-light);
}

.promo-item-icon {
    font-size: 0.75rem;
}

.promo-item-price {
    font-weight: 600;
    color: var(--success);
}

/* Barra de progreso */
.progress-bar-container {
    width: 100%;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 1rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow);
    transition: width var(--transition-normal);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Inputs warning style */
.form-input.is-warning, 
.form-select.is-warning {
    border-color: var(--warning);
}

.form-select {
    color: white !important;
    background-color: var(--bg-secondary);
    cursor: pointer;
}

.form-select option {
    background-color: var(--bg-secondary);
    color: white;
    padding: 10px;
}

.form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4);
}

.form-input {
    color: white !important;
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Tabla de seleccionados */
.table-container {
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

#tabla-seleccionados2 {
    table-layout: fixed;
    width: 100%;
}

#tabla-seleccionados2 td,
#tabla-seleccionados2 th {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

#tabla-seleccionados2 td:last-child {
    max-width: 0;
    line-height: 1.5;
}

table tr td {
    vertical-align: middle;
}

.btn-success:hover {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Spinner para botones */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .table-container th, 
    .table-container td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* Buscador de número */
#input_search.form-input {
    border: 2px solid var(--text-muted);
    background-color: rgba(15, 23, 42, 0.8);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-align: center;
    transition: all var(--transition-normal);
}

#input_search.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    outline: none;
    transform: scale(1.02);
}

.form-label {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Botón finalizar glow */
.btn-finalizar-glow {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-finalizar-glow:not(:disabled) {
    animation: pulse-glow 3s infinite;
}

.btn-finalizar-glow:hover:not(:disabled) {
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
    100% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.3); }
}

/* Animación bailar */
@keyframes bailar {
  0%   { transform: translateX(0) rotate(0deg); }
  25%  { transform: translateX(-5px) rotate(-5deg); }
  50%  { transform: translateX(5px) rotate(5deg); }
  75%  { transform: translateX(-5px) rotate(-5deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

.bailando {
  animation: bailar 0.4s ease-in-out infinite;
}

/* ================================
   Modal Tragamonedas (v3 — logo + 3 velocidades + palanca)
   ================================ */
.slot-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.slot-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.slot-machine {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 26px 26px 20px;
    box-shadow:
        0 0 60px rgba(255, 215, 0, 0.25),
        inset 0 0 30px rgba(255, 215, 0, 0.10),
        0 10px 40px rgba(0, 0, 0, 0.6);
    border: 4px solid #ffd700;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.slot-modal-overlay.active .slot-machine {
    transform: scale(1);
}

.slot-title {
    text-align: center;
    color: #ffd700;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 10px 0 14px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
}

.slot-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    background: #0a0a0a;
    padding: 18px;
    border-radius: 15px;
    border: 3px solid #333;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    position: relative;
}

.slot-reel {
    width: 70px;
    height: 90px;
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 2px solid #444;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.slot-reel::before,
.slot-reel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    z-index: 2;
    pointer-events: none;
}

.slot-reel::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
}

.slot-reel::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

/* Tira de símbolos */
.slot-symbols {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    will-change: transform;
}

.slot-symbol {
    width: 70px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}

/* Logo como símbolo final (imagen intacta) */
.slot-symbol.logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.20));
}

/*
  Animación spin-to-bunny: se aplica SOLO con .active y se queda en el logo.
  30 items: 29 símbolos + logo al final.
  final = -(29 * 90px) = -2610px
*/
.slot-modal-overlay.active .slot-symbols {
    animation-name: spin-to-bunny;
    animation-timing-function: cubic-bezier(.15, .85, .2, 1);
    animation-fill-mode: forwards;
}

/* 3 VELOCIDADES (reel1 más rápido, reel2 medio, reel3 más lento) */
.slot-modal-overlay.active .reel1 .slot-symbols { animation-duration: 2.1s; animation-delay: 0s; }
.slot-modal-overlay.active .reel2 .slot-symbols { animation-duration: 2.8s; animation-delay: 0.10s; }
.slot-modal-overlay.active .reel3 .slot-symbols { animation-duration: 3.5s; animation-delay: 0.22s; }

@keyframes spin-to-bunny {
    0%   { transform: translateY(0); }
    65%  { transform: translateY(-2340px); }
    85%  { transform: translateY(-2520px); }
    100% { transform: translateY(-2610px); }
}

/* Palanca: bajada/subida SOLO en eje Y */
.slot-lever {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 100px;
    background: linear-gradient(90deg, #c0c0c0, #808080);
    border-radius: 15px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.slot-modal-overlay.active .slot-lever {
    animation: lever-pull-y 0.6s ease-out forwards;
}

@keyframes lever-pull-y {
    0%   { transform: translateY(-50%); }
    35%  { transform: translateY(calc(-50% + 18px)); }
    70%  { transform: translateY(calc(-50% + 10px)); }
    100% { transform: translateY(-50%); }
}

.slot-lever::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 25px;
    background: radial-gradient(circle at 30% 30%, #ff4444, #aa0000);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: glow-lever 1s ease-in-out infinite alternate;
}

@keyframes glow-lever {
    from { box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
    to { box-shadow: 0 0 20px rgba(255, 0, 0, 0.85); }
}

.slot-message {
    text-align: center;
    margin-top: 14px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.slot-message span {
    color: #ffd700;
    font-weight: 800;
}

.slot-lights {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slot-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: blink-light 0.5s ease-in-out infinite alternate;
}

.slot-light:nth-child(1) { background: #ff0000; animation-delay: 0s; }
.slot-light:nth-child(2) { background: #ffff00; animation-delay: 0.1s; }
.slot-light:nth-child(3) { background: #00ff00; animation-delay: 0.2s; }
.slot-light:nth-child(4) { background: #00ffff; animation-delay: 0.3s; }
.slot-light:nth-child(5) { background: #ff00ff; animation-delay: 0.4s; }

@keyframes blink-light {
    from { opacity: 0.45; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.1); }
}

/* Responsive slot */
@media (max-width: 480px) {
    .slot-machine {
        padding: 20px;
        margin: 10px;
    }

    .slot-reel {
        width: 55px;
        height: 70px;
    }

    .slot-symbol {
        width: 55px;
        height: 70px;
        font-size: 2rem;
    }

    .slot-symbol.logo img {
        width: 42px;
        height: 42px;
    }

    /* recalcular: 29 * 70 = 2030 */
    @keyframes spin-to-bunny {
        0%   { transform: translateY(0); }
        65%  { transform: translateY(-1820px); }
        85%  { transform: translateY(-1960px); }
        100% { transform: translateY(-2030px); }
    }

    .slot-modal-overlay.active .reel1 .slot-symbols { animation-duration: 2.0s; animation-delay: 0s; }
    .slot-modal-overlay.active .reel2 .slot-symbols { animation-duration: 2.7s; animation-delay: 0.08s; }
    .slot-modal-overlay.active .reel3 .slot-symbols { animation-duration: 3.3s; animation-delay: 0.18s; }

    .slot-title {
        font-size: 1rem;
    }

    .slot-lever {
        display: none;
    }
}

/* ===================== SOLD OUT BANNER ===================== */
.sold-out-banner {
    text-align: center;
    padding: 2rem 1.5rem;
    margin: 1rem 0;
    background: var(--bg-secondary, #fff);
    border-radius: 16px;
    border: 2px solid var(--border-color, #e5e7eb);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.sold-out-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #047857;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.6rem;
}

.sold-out-icon.pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.sold-out-title {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary, #1f2937);
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sold-out-text {
    font-size: 0.95rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

/* ========================================
   BONUS / BONO STYLES
   ======================================== */

.promo-bonus-tag {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bonus-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b22, #f59e0b11);
    color: #f59e0b;
    border: 1px solid #f59e0b55;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: bonusPulse 2s ease-in-out infinite;
}
.bonus-badge-btn:hover {
    background: linear-gradient(135deg, #f59e0b33, #f59e0b22);
    transform: scale(1.03);
}

@keyframes bonusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.3); }
    50% { box-shadow: 0 0 12px 4px rgba(245,158,11,0.15); }
}

.bono-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.bono-modal {
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid #f59e0b44;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.bono-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    font-size: 1.2rem;
    cursor: pointer;
}

.bono-modal-icon {
    font-size: 2.5rem;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.bono-modal-title {
    color: #f59e0b;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.bono-modal-desc {
    color: var(--text-primary, #f1f5f9);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.bono-modal-info {
    color: var(--text-secondary, #cbd5e1);
    font-size: 0.85rem;
    margin: 0;
}

/* ========================================
   FOMO TOAST NOTIFICATIONS
   ======================================== */
.fomo-toast {
    position: fixed;
    bottom: 24px;
    left: 20px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 15, 25, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 12px 18px;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 12px rgba(99, 102, 241, 0.15);
    transform: translateX(-120%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    pointer-events: none;
}

.fomo-toast.fomo-show {
    transform: translateX(0);
    opacity: 1;
}

.fomo-toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary-light, #818cf8);
}

.fomo-toast-body {
    flex: 1;
    min-width: 0;
}

.fomo-toast-text {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary, #f1f5f9);
    line-height: 1.35;
    margin: 0;
}

.fomo-toast-text strong {
    color: var(--primary-light, #818cf8);
    font-weight: 700;
}

.fomo-toast-time {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
}

@media (max-width: 480px) {
    .fomo-toast {
        left: 10px;
        right: 10px;
        bottom: 16px;
        max-width: calc(100% - 20px);
    }
}

/* ========================================
   STEP INDICATOR (Paso 1 de 2 / Paso 2 de 2)
   ======================================== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    position: sticky;
    top: var(--header-height, 0px);
    z-index: 800;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted, #94a3b8);
    background: transparent;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--primary, #6366f1);
    border-color: var(--primary, #6366f1);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

.step-dot.done {
    background: var(--success, #10b981);
    border-color: var(--success, #10b981);
    color: #fff;
}

.step-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 1px;
}

.step-line.active {
    background: var(--primary, #6366f1);
}

.step-label {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 600;
    margin-left: 6px;
}

/* ====================================================
   PANEL DE ÉXITO — RESPALDO WHATSAPP
   ==================================================== */
.wa-success-card {
    background: var(--bg-card, #1a1f2e);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: 20px;
    padding: 36px 28px 28px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.wa-success-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.wa-success-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    animation: wa-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes wa-pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.wa-success-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary, #fff);
    margin: 0 0 10px;
}

.wa-success-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0 0 20px;
    line-height: 1.5;
}

.wa-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 22px;
}

.wa-status-ok {
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: #25D366;
}

.wa-status-blocked {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f59e0b;
}

.wa-btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 14px;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
}

.wa-btn-main i {
    font-size: 1.3rem;
}

.wa-btn-main:hover,
.wa-btn-main:active {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.wa-fallback-note {
    font-size: 0.82rem;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.5;
    margin: 0 0 20px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.wa-fallback-note i {
    color: #6366f1;
    margin-right: 5px;
}

.wa-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 0 0 18px;
}

.wa-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 11px 22px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wa-btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}
