/* =====================================================
   RIFA MILLONARIA — CSS Principal
   Tema: Negro · Dorado · Verde WhatsApp
   ===================================================== */

/* ── Variables ── */
:root {
  --gold:        #D4AF37;
  --gold-light:  #f0d060;
  --gold-dim:    rgba(212,175,55,.15);
  --green-wa:    #25D366;
  --green-wa-d:  #1da851;
  --green-num:   #22c55e;
  --yellow-num:  #f59e0b;
  --red-num:     #ef4444;
  --bg:          #080808;
  --bg2:         #0f0f0f;
  --bg3:         #161616;
  --card:        #111111;
  --border:      rgba(255,255,255,.08);
  --text:        #f0f0f0;
  --text-muted:  #888;
  --radius:      14px;
  --shadow-gold: 0 0 40px rgba(212,175,55,.2);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Partículas decorativas ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: .4; }
  90%  { opacity: .1; }
  100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

/* ═══════════════════════════════════
   HERO
═══════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  overflow: hidden;
  z-index: 1;
}

.hero__glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(212,175,55,.18) 0%, transparent 65%);
  pointer-events: none;
}

.hero__content { position: relative; z-index: 2; max-width: 700px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37,211,102,.12);
  border: 1px solid rgba(37,211,102,.35);
  color: var(--green-wa);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 28px;
  animation: fadeDown .8s ease both;
}

.pulse-dot {
  width: 8px; height: 8px;
  background: var(--green-wa);
  border-radius: 50%;
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(37,211,102,0); }
}

.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  color: #fff;
  animation: fadeDown .9s .1s ease both;
}

.hero__amount {
  display: block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(212,175,55,.5));
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #aaa;
  margin: 20px 0 36px;
  animation: fadeDown 1s .2s ease both;
}
.hero__subtitle strong { color: var(--gold); }

/* Stats en vivo */
.hero__stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
  animation: fadeDown 1s .3s ease both;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 20px;
  min-width: 90px;
}
.stat-pill__value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-num);
  line-height: 1;
}
.stat-pill--yellow .stat-pill__value { color: var(--yellow-num); }
.stat-pill--red    .stat-pill__value { color: var(--red-num); }
.stat-pill__label  { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeDown 1s .4s ease both;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: .8rem;
  animation: bounce 2s ease infinite;
}
.hero__scroll-hint svg { width: 20px; height: 20px; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform .15s, box-shadow .2s, opacity .2s;
  text-decoration: none;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }

.btn--lg { padding: 16px 32px; font-size: 1.05rem; }

.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
  box-shadow: 0 4px 20px rgba(212,175,55,.4);
}
.btn--gold:hover { box-shadow: 0 6px 30px rgba(212,175,55,.6); }

.btn--whatsapp {
  background: linear-gradient(135deg, var(--green-wa), var(--green-wa-d));
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,.35);
}
.btn--whatsapp:hover { box-shadow: 0 6px 30px rgba(37,211,102,.55); }

.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

/* ═══════════════════════════════════
   SECTION COMMONS
═══════════════════════════════════ */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 40%, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ═══════════════════════════════════
   BENEFITS
═══════════════════════════════════ */
.benefits {
  background: var(--bg2);
  padding: 80px 0;
  position: relative;
  z-index: 1;
}
.benefits .section-title { margin-bottom: 48px; }

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.benefit-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color .25s, transform .25s;
}
.benefit-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}
.benefit-card__icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
}
.benefit-card h3 {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.benefit-card p { color: var(--text-muted); font-size: .9rem; }

/* ═══════════════════════════════════
   NÚMEROS
═══════════════════════════════════ */
.numbers-section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: var(--text-muted);
}
.legend__dot {
  width: 12px; height: 12px;
  border-radius: 3px;
}
.legend__dot--green  { background: var(--green-num); }
.legend__dot--yellow { background: var(--yellow-num); }
.legend__dot--red    { background: var(--red-num); }

/* Grid de números */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 10px;
  margin-bottom: 40px;
}

.num-btn {
  aspect-ratio: 1;
  border: none;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s;
  position: relative;
  overflow: hidden;
}
.num-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.15);
  opacity: 0;
  transition: opacity .15s;
}
.num-btn:hover::after { opacity: 1; }

.num-btn--disponible {
  background: rgba(34,197,94,.18);
  border: 1.5px solid rgba(34,197,94,.5);
  color: var(--green-num);
  box-shadow: 0 0 12px rgba(34,197,94,.15);
}
.num-btn--disponible:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(34,197,94,.4);
}

.num-btn--apartado {
  background: rgba(245,158,11,.18);
  border: 1.5px solid rgba(245,158,11,.5);
  color: var(--yellow-num);
  cursor: not-allowed;
}

.num-btn--pagado {
  background: rgba(239,68,68,.18);
  border: 1.5px solid rgba(239,68,68,.4);
  color: var(--red-num);
  cursor: not-allowed;
  opacity: .7;
}

.num-btn:disabled { pointer-events: none; }

/* Animación al seleccionar */
.num-btn--selecting {
  animation: selectPulse .4s ease;
}
@keyframes selectPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); box-shadow: 0 0 30px rgba(239,68,68,.5); }
  100% { transform: scale(1); }
}

.numbers-section__cta {
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ═══════════════════════════════════
   GANADORES
═══════════════════════════════════ */
.winners {
  background: var(--bg2);
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.winners__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.winner-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color .2s;
}
.winner-card:hover { border-color: var(--gold-dim); }

.winner-card__avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
  font-weight: 900;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.winner-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.winner-card__info strong { color: #fff; font-size: .95rem; }
.winner-card__info span  { font-size: .82rem; color: var(--text-muted); }
.winner-card__prize { color: var(--gold) !important; font-weight: 600 !important; }
.winner-card__date  { font-size: .75rem !important; }

/* ═══════════════════════════════════
   CÓMO PARTICIPAR
═══════════════════════════════════ */
.how-to {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  text-align: center;
}
.step__num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
  font-weight: 900;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 0 20px rgba(212,175,55,.35);
}
.step h3 { font-size: 1rem; margin-bottom: 8px; color: var(--gold); }
.step p  { font-size: .85rem; color: var(--text-muted); }

.step__arrow {
  font-size: 1.8rem;
  color: var(--gold);
  opacity: .4;
  align-self: center;
  margin-top: -14px;
}

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
.footer {
  background: #000;
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.footer__logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.footer p { color: var(--text-muted); font-size: .9rem; margin-bottom: 10px; }
.footer__wa {
  display: inline-block;
  color: var(--green-wa);
  font-weight: 600;
  margin-bottom: 16px;
  transition: opacity .2s;
}
.footer__wa:hover { opacity: .8; }
.footer__legal {
  font-size: .75rem !important;
  color: #444 !important;
  max-width: 480px;
  margin: 0 auto !important;
}

/* ═══════════════════════════════════
   MODAL
═══════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--card);
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(212,175,55,.15);
  transform: scale(.9);
  transition: transform .25s;
}
.modal-overlay.active .modal { transform: scale(1); }

.modal__icon { font-size: 3rem; margin-bottom: 12px; }
.modal__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; color: var(--gold); }
.modal__text  { color: #aaa; margin-bottom: 28px; line-height: 1.6; }
.modal__text strong { color: var(--gold-light); font-size: 1.3rem; }

.modal__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════
   TOAST
═══════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transition: transform .3s, opacity .3s;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════
   ANIMACIONES
═══════════════════════════════════ */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 600px) {
  .numbers-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
  .num-btn { font-size: .95rem; }
  .steps { gap: 24px; }
  .step__arrow { display: none; }
  .step { min-width: 140px; }
  .hero__actions { flex-direction: column; align-items: center; }
  .btn--lg { width: 100%; justify-content: center; }
}
