/* ===========================
   CSS VARIABLES
   =========================== */
:root {
  --bg-base: #0d0d0d;
  --bg-dark: #0a0a0a;
  --bg-card: #111111;
  --red: #c0392b;
  --red-light: #e74c3c;
  --gold: #c0a060;
  --text: #ffffff;
  --text-muted: #888888;
  --text-dim: #555555;
  --border: #1e1e1e;
  --border-light: #252525;
  --green: #27ae60;
  --font: 'Segoe UI', Arial, sans-serif;
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg-base); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.accent { color: var(--red); }
.gold { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }

/* ===========================
   NAV
   =========================== */
.nav {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo { font-size: 18px; font-weight: 900; letter-spacing: -0.5px; }

/* ===========================
   HERO
   =========================== */
.hero {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #120000 100%);
  padding: 40px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(192,57,43,0.2) 0%, transparent 65%);
  pointer-events: none;
}
.sorteo-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 4px 14px;
  border-radius: 2px;
  margin-bottom: 18px;
}
.hero-logo {
  width: 260px;
  height: auto;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  mix-blend-mode: lighten;
}
.hero-title {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.hero-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.hero-sub strong { color: var(--gold); }

/* COUNTDOWN */
.countdown { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.countdown-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: center;
  min-width: 58px;
}
.countdown-block .num {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  display: block;
}
.countdown-block .lbl {
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-top: 4px;
}
.countdown-sep {
  font-size: 22px;
  color: var(--red);
  font-weight: 900;
  align-self: center;
  margin-top: -10px;
}
.countdown-label {
  font-size: 9px;
  color: #444;
  letter-spacing: 2px;
  text-align: center;
}
#countdown.sorteo-hoy .num { color: var(--gold); }
.btn-instagram {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 8px 18px;
  border: 1px solid #444;
  border-radius: 20px;
  color: #888;
  font-size: 12px;
  letter-spacing: 1px;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.btn-instagram:hover { border-color: var(--red); color: #fff; }

/* ===========================
   SECTION LABEL
   =========================== */
.section-label {
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--red);
  text-align: center;
  margin-bottom: 18px;
  font-weight: 700;
}

/* ===========================
   PREMIOS
   =========================== */
.premios-section { padding: 32px 16px 28px; background: var(--bg-base); }
.premios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 12px;
}
.premio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: visible;
  text-align: center;
  position: relative;
}
.premio-card.gold-border { border-color: var(--red); }
.premio-num {
  position: absolute;
  top: 7px;
  left: 9px;
  font-size: 9px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1px;
}
.premio-img {
  height: 130px;
  background: var(--bg-dark);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.premio-img img {
  width: 100%;
  height: 130%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5));
}
/* TV más grande */
.premio-card:nth-child(2) .premio-img img {
  width: 120%;
  height: 145%;
}
.premio-body { padding: 10px 8px; }
.premio-name { font-size: 9px; font-weight: 700; color: var(--text); line-height: 1.4; }
.premio-detail { font-size: 8px; color: var(--text-dim); margin-top: 2px; }

/* Locked prizes */
.locked-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 24px;
}
.locked-card {
  background: var(--bg-dark);
  border: 1px dashed #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}
.locked-img {
  height: 90px;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;
}
.locked-img svg { width: 30px; height: 30px; }
.locked-text { font-size: 9px; color: #333; letter-spacing: 1px; padding: 10px 0; }

/* Precio */
.precio-info {
  text-align: center;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 300px;
  margin: 0 auto;
}
.precio-main { font-size: 24px; font-weight: 900; }
.precio-alt { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===========================
   GRILLA
   =========================== */
.grilla-section { padding: 28px 16px; background: var(--bg-dark); }
.grilla-stats { display: flex; justify-content: center; gap: 28px; margin-bottom: 18px; }
.stat { text-align: center; }
.stat-num { font-size: 20px; font-weight: 900; display: block; }
.stat-lbl { font-size: 8px; color: var(--text-dim); letter-spacing: 2px; display: block; margin-top: 2px; }

.grilla-legend { display: flex; gap: 14px; justify-content: center; margin-bottom: 14px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 9px; color: #666; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dot-free { background: #1e1e1e; border: 1px solid #333; }
.dot-selected { background: var(--red); }
.dot-sold { background: #1a1a1a; border: 1px solid #1a1a1a; }

/* Grid */
.grilla-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  max-width: 360px;
  margin: 0 auto 20px;
}
.num-cell {
  height: 30px;
  background: #1a1a1a;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #555;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  user-select: none;
  position: relative;
}
.num-cell:hover:not(.sold) { border-color: var(--red); color: #aaa; }
.num-cell.selected { background: var(--red); border-color: var(--red-light); color: #fff; }
.num-cell.sold {
  background: #0f0f0f;
  border-color: #161616;
  color: #222;
  text-decoration: line-through;
  cursor: not-allowed;
  pointer-events: none;
}

/* CTA Panel */
.cta-panel { max-width: 360px; margin: 0 auto; }
.cta-selected {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cta-label { font-size: 10px; color: var(--text-dim); margin-bottom: 4px; }
.cta-nums { font-size: 13px; font-weight: 700; color: var(--text); }
.cta-total { font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.btn-cta {
  display: block;
  width: 100%;
  background: linear-gradient(90deg, var(--red), var(--red-light));
  color: #fff;
  border-radius: 8px;
  padding: 18px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(192,57,43,0.35);
  transition: opacity 0.2s, transform 0.1s;
}
.btn-cta:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.btn-cta:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-random {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  text-align: center;
  margin-top: 10px;
  letter-spacing: 1px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-random:hover { border-color: #444; color: #888; }

/* ===========================
   CÓMO PARTICIPAR
   =========================== */
.how-section { padding: 32px 16px; background: var(--bg-base); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}
.step { text-align: center; padding: 16px 8px; }
.step-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--red);
}
.step-icon svg { width: 22px; height: 22px; }
.step-num { font-size: 8px; color: var(--red); font-weight: 700; letter-spacing: 2px; margin-bottom: 6px; }
.step-text { font-size: 10px; color: var(--text-muted); line-height: 1.5; }

/* ===========================
   VENDEDORES
   =========================== */
.vendedores-section {
  padding: 40px 20px;
  background: #080000;
  border-top: 1px solid #1a0000;
  text-align: center;
}
.vendedores-title { font-size: 22px; font-weight: 900; line-height: 1.2; margin-bottom: 10px; }
.vendedores-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }

/* ===========================
   SPONSORS
   =========================== */
.sponsors-section {
  padding: 40px 20px;
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  text-align: center;
}
.sponsors-title { font-size: 22px; font-weight: 900; line-height: 1.2; margin-bottom: 10px; }
.sponsors-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }

/* WhatsApp buttons */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}
.btn-whatsapp:hover { opacity: 0.85; }
.btn-whatsapp svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-whatsapp--outline {
  background: transparent;
  border: 1px solid #25d366;
  color: #25d366;
}
.btn-whatsapp--outline:hover { background: rgba(37,211,102,0.08); opacity: 1; }

/* ===========================
   FOOTER
   =========================== */
.footer {
  padding: 24px 20px;
  background: #080808;
  border-top: 1px solid #111;
  text-align: center;
}
.footer-logo { font-size: 15px; font-weight: 900; color: #333; margin-bottom: 8px; letter-spacing: -0.5px; }
.footer-text { font-size: 10px; color: #2a2a2a; line-height: 2; }
.footer-link { color: #333; text-decoration: underline; }
.footer-link:hover { color: #555; }

/* ===========================
   RESPONSIVE — Desktop
   =========================== */
@media (min-width: 768px) {
  .hero { padding: 60px 40px 50px; }
  .hero-title { font-size: 42px; }
  .hero-sub { font-size: 15px; }
  .premios-section,
  .grilla-section,
  .how-section,
  .vendedores-section,
  .sponsors-section { padding-left: 40px; padding-right: 40px; }
  .premios-grid, .locked-grid { max-width: 640px; }
  .grilla-grid {
    max-width: 600px;
    grid-template-columns: repeat(20, 1fr);
  }
  .num-cell { height: 26px; font-size: 7px; }
  .cta-panel { max-width: 480px; }
}
