:root {
  --primary-orange: #f97316;
  --dark-orange: #ea580c;
  --gold-accent: #facc15;
  --dark-blue: #0f172a;
  --accent-green: #22c55e;
  --accent-red: #e11d48;
  --bg-light: #fff5eb;
  --text-dark: #0f172a;
}

*, *::before, *::after {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #fff7ed 0%, #ffedd5 100%);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

svg.ico {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

header {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 48%, #ea580c 100%);
  color: white;
  padding: 28px 0 86px 0;
  text-align: center;
  border-bottom-left-radius: 52px;
  border-bottom-right-radius: 52px;
  box-shadow: 0 14px 36px rgba(234, 88, 12, 0.34);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 55%),
              radial-gradient(circle at 80% 30%, rgba(250, 204, 21, 0.22), transparent 50%);
  pointer-events: none;
}

.ruletas-marquee {
  width: 100%;
  overflow: hidden;
  padding: 8px 0 16px 0;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ruletas-track {
  display: flex;
  width: max-content;
  gap: 28px;
  animation: desfilarDerechaIzquierda 22s linear infinite;
}

@keyframes desfilarDerechaIzquierda {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.mini-ruleta-item {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg, #ffffff, #fde047, #38bdf8, #f43f5e, #ffffff);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 0 12px rgba(254, 240, 138, 0.65);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-ruleta-disco {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #ffffff;
  position: relative;
  animation: girarRuletaLogo 3.6s linear infinite;
}

.mini-ruleta-disco::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #fde047;
}

.paleta-1 { background: conic-gradient(#ef4444 0deg 60deg, #facc15 60deg 120deg, #22c55e 120deg 180deg, #3b82f6 180deg 240deg, #a855f7 240deg 300deg, #ec4899 300deg 360deg); }
.paleta-2 { background: conic-gradient(#06b6d4 0deg 60deg, #f97316 60deg 120deg, #84cc16 120deg 180deg, #f43f5e 180deg 240deg, #eab308 240deg 300deg, #6366f1 300deg 360deg); }
.paleta-3 { background: conic-gradient(#ff007f 0deg 60deg, #00e676 60deg 120deg, #00e5ff 120deg 180deg, #ff6d00 180deg 240deg, #d500f9 240deg 300deg, #ffea00 300deg 360deg); }
.paleta-4 { background: conic-gradient(#10b981 0deg 60deg, #f59e0b 60deg 120deg, #ef4444 120deg 180deg, #8b5cf6 180deg 240deg, #0ea5e9 240deg 300deg, #f472b6 300deg 360deg); }

.header-inner {
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.badge-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.24);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.logo-wrapper {
  width: 134px;
  height: 134px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  position: relative;
}

.logo-luz-giratoria {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ffffff, #fde047, #ff007f, #00e5ff, #22c55e, #fde047, #ffffff);
  animation: girarLuzBorde 2.4s linear infinite;
  box-shadow: 0 0 26px rgba(254, 240, 138, 0.9), 0 0 42px rgba(255, 255, 255, 0.55);
  z-index: 1;
}

.logo-luz-halo {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #fde047, #38bdf8, #f43f5e, #22c55e, #fde047);
  filter: blur(11px);
  opacity: 0.85;
  animation: girarLuzBorde 3.2s linear infinite reverse;
  z-index: 0;
}

.logo-centro-inner {
  position: relative;
  z-index: 2;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #ffffff;
}

@keyframes girarLuzBorde {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.logo-centro-inner svg {
  width: 92px;
  height: 92px;
  animation: girarRuletaLogo 5s linear infinite;
}

@keyframes girarRuletaLogo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

header h1 {
  margin: 0 0 10px 0;
  font-size: 2.05rem;
  font-weight: 900;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
  letter-spacing: -0.3px;
}

header p {
  margin: 0 auto;
  font-size: 0.98rem;
  opacity: 0.96;
  max-width: 500px;
  line-height: 1.55;
}

main {
  flex: 1;
  padding: 0 18px 44px 18px;
  max-width: 510px;
  width: 100%;
  margin: -46px auto 0 auto;
  position: relative;
  z-index: 5;
}

.tarjeta-panel {
  background: #ffffff;
  padding: 34px 24px;
  border-radius: 36px;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.1);
  border: 2px solid #fed7aa;
  position: relative;
}

.panel-icono {
  width: 74px;
  height: 74px;
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  color: var(--dark-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.22);
  border: 3px solid #ffffff;
}

.tarjeta-panel h2 {
  margin: 0 0 8px 0;
  text-align: center;
  font-size: 1.65rem;
  font-weight: 900;
}

.tarjeta-panel .subtitulo {
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 24px 0;
  line-height: 1.45;
}

.form-group {
  margin-bottom: 18px;
}

.input-wrapper {
  position: relative;
  background: #f8fafc;
  border-radius: 50px;
  border: 2px solid #cbd5e1;
  transition: all 0.25s ease;
}

.input-wrapper:focus-within {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
  background: #ffffff;
}

.input-icon-left {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
}

input[type="text"] {
  width: 100%;
  padding: 18px 22px 18px 54px;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--text-dark);
  font-weight: 700;
  outline: none;
  border-radius: 50px;
}

.btn-ingresar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
  color: #ffffff;
  border: none;
  width: 100%;
  padding: 19px 26px;
  font-size: 1.08rem;
  font-weight: 900;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.btn-ingresar::after,
.btn-girar-demo::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: skewX(-25deg);
  animation: reflejoBoton 3s infinite;
}

@keyframes reflejoBoton {
  0% { left: -75%; }
  45%, 100% { left: 135%; }
}

.btn-ingresar:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 32px rgba(22, 163, 74, 0.48);
}

.btn-ingresar:active {
  transform: scale(0.97);
}

.btn-tv-acceso {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  border: 2px solid #fb923c;
  width: 100%;
  padding: 16px 22px;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.22s ease;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.14);
}

.btn-tv-acceso:hover {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.22);
}

.btn-tv-acceso:active {
  transform: scale(0.98);
}

.historial-dispositivo-wrap {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1.5px dashed #fed7aa;
  text-align: center;
  display: none;
}

.historial-dispositivo-wrap.visible {
  display: block;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #9a3412;
  border: 1.5px solid #fdba74;
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.1);
  transition: all 0.2s ease;
  margin: 4px;
}

.quick-chip-accion {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.quick-chip:hover {
  background: #fed7aa;
  transform: translateY(-2px);
}

.btn-borrar-chip {
  background: #fee2e2;
  border: none;
  color: #e11d48;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-dark);
  margin: 40px 0 18px 0;
  text-align: center;
}

.pasos-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.paso-card {
  background: #ffffff;
  padding: 20px 22px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1.5px solid #fed7aa;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.paso-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.12);
}

.paso-icono {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.p1 { background: #ffedd5; color: #ea580c; }
.p2 { background: #fef3c7; color: #d97706; }
.p3 { background: #dcfce7; color: #16a34a; }

.paso-contenido h3 {
  margin: 0 0 4px 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.paso-contenido p {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
}

.stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-card {
  background: #ffffff;
  padding: 24px 14px;
  border-radius: 28px;
  text-align: center;
  border: 1.5px solid #fed7aa;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--dark-blue);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-card {
  background: #ffffff;
  padding: 30px 20px;
  border-radius: 36px;
  border: 3px solid var(--gold-accent);
  text-align: center;
  box-shadow: 0 18px 36px rgba(250, 204, 21, 0.18);
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef08a;
  color: #854d0e;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 18px;
  border-radius: 50px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ruleta-demo-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 25px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ruleta-demo-aro {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: #1e293b;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.32), 0 0 20px rgba(249, 115, 22, 0.45), inset 0 0 0 4px var(--gold-accent);
  z-index: 1;
}

.bombilla-demo {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 10px #fde047, 0 0 16px #f59e0b;
  z-index: 3;
  transition: opacity 0.15s;
}

.bombilla-demo.apagada {
  background: #475569;
  box-shadow: none;
}

#canvas-ruleta-demo {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: grab;
}

.puntero-demo-container {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.3));
  transform-origin: 50% 100%;
  transition: transform 0.1s;
}

.puntero-demo-container.rebote {
  transform: translateX(-50%) rotate(-15deg);
}

.btn-centro-estrella {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1e293b, #090d16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), 0 0 14px rgba(250, 204, 21, 0.75), inset 0 0 0 3px #facc15;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease;
}

.btn-centro-estrella:active {
  transform: scale(0.92);
}

.btn-centro-estrella svg {
  filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.9));
  animation: girarRuletaLogo 7s linear infinite;
}

.btn-girar-demo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  border: none;
  width: 100%;
  max-width: 330px;
  padding: 18px 26px;
  border-radius: 50px;
  font-size: 1.08rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  margin-top: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-girar-demo:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.5);
}

.ruleta-icono-girando {
  animation: girarRuletaLogo 3.5s linear infinite;
}

.quienes-card {
  background: #ffffff;
  padding: 30px 24px;
  border-radius: 36px;
  border: 1.5px solid #fed7aa;
  text-align: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.quienes-icono {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  color: #ea580c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px auto;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #25d366, #16a34a);
  color: #ffffff;
  text-decoration: none;
  padding: 16px 30px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  margin-top: 20px;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-whatsapp:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.42);
}

.admin-wrapper {
  margin-top: 36px;
  text-align: center;
}

.btn-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1.5px solid #334155;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-admin:hover {
  transform: translateY(-2px);
  background: #0f172a;
}

.btn-admin.bloqueado {
  background: #991b1b;
  border-color: #ef4444;
  cursor: not-allowed;
  opacity: 0.85;
}

footer {
  text-align: center;
  padding: 32px 20px 42px;
  color: #64748b;
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-link {
  background: none;
  border: none;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--dark-orange);
}

.modal-legal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-legal-overlay.activo {
  display: flex;
}

.modal-legal-box {
  background: #ffffff;
  border-radius: 28px;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 24px;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.28);
  border: 2px solid #fed7aa;
  text-align: left;
}

.modal-legal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.modal-legal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark-blue);
}

.btn-cerrar-legal {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-legal-body p, .modal-legal-body li {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
}

.modal-legal-body h4 {
  margin: 14px 0 6px;
  font-size: 0.96rem;
  color: var(--dark-orange);
}