/* ===================== GanaRD — Estilos ===================== */
:root {
  --bg: #0b1020;
  --bg-2: #111833;
  --card: #151d3b;
  --card-2: #1b2550;
  --line: #26315e;
  --text: #eef1fb;
  --muted: #9aa4c7;
  --green: #22c55e;
  --green-dark: #16a34a;
  --gold: #fbbf24;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-title: "Bebas Neue", "Poppins", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, #1a2a6c55, transparent),
              radial-gradient(900px 500px at -10% 20%, #16a34a22, transparent),
              var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.hidden { display: none !important; }

/* ---------- Encabezado ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 2px; font-family: var(--font-title); font-size: 34px; letter-spacing: 1px; }
.logo .gana { color: var(--text); }
.logo .rd {
  background: linear-gradient(135deg, var(--green), var(--gold));
  color: #0b1020; padding: 0 8px; border-radius: 8px; margin-left: 4px; line-height: 1.2;
}
.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: .2s;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--card); }
.menu-btn { display: none; font-size: 26px; padding: 6px; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: #22c55e1f; color: var(--green); font-size: 13px; font-weight: 600; border: 1px solid #22c55e44;
}
.hero h1 {
  font-family: var(--font-title); font-size: clamp(44px, 8vw, 84px); line-height: 1; margin: 18px 0 14px; letter-spacing: 1px;
}
.hero h1 span { background: linear-gradient(135deg, var(--green), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; font-size: 17px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px; font-weight: 600; transition: .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff; box-shadow: 0 8px 24px #22c55e40; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; transform: none; cursor: not-allowed; }
.btn-ghost { border: 1px solid var(--line); background: var(--card); }
.btn-ghost:hover { border-color: var(--green); }
.btn-block { width: 100%; }

/* ---------- Secciones ---------- */
.section { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 32px; }
.section-title h2 { font-family: var(--font-title); font-size: clamp(34px, 5vw, 48px); letter-spacing: 1px; }
.section-title p { color: var(--muted); }

/* ---------- Estado vacío ---------- */
.empty {
  text-align: center; padding: 48px 24px; border: 1px dashed var(--line);
  border-radius: var(--radius); background: #151d3b80;
}
.empty .icon { font-size: 48px; margin-bottom: 8px; }
.empty h3 { font-size: 22px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto 20px; }

/* ---------- Tarjetas de dinámicas ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card-media { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, #1f2b5e, #0f1630); display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .placeholder { font-size: 64px; opacity: .8; }
.tag {
  position: absolute; top: 12px; right: 12px; background: var(--gold); color: #1a1300;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
}
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card-title { font-family: var(--font-title); font-size: 30px; line-height: 1.05; letter-spacing: .5px; text-align: center; }
.card-desc { color: var(--muted); font-size: 14px; text-align: center; }
.card-date { text-align: center; color: var(--gold); font-size: 14px; font-weight: 500; }

.countdown { display: flex; justify-content: center; gap: 8px; }
.countdown div {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  min-width: 58px; padding: 6px 4px; text-align: center;
}
.countdown b { display: block; font-family: var(--font-title); font-size: 28px; color: var(--gold); line-height: 1; }
.countdown small { font-size: 10px; color: var(--muted); letter-spacing: 1px; }

.extra { border: 1px solid #fbbf2444; border-radius: 12px; background: #fbbf240d; }
.extra summary { cursor: pointer; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--gold); list-style: none; }
.extra summary::-webkit-details-marker { display: none; }
.extra-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.extra-list span { font-family: monospace; font-size: 14px; padding: 4px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); }
.extra-list span.won { border-color: var(--green); color: var(--green); text-decoration: line-through; }

.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 999px; }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.price b { font-family: var(--font-title); font-size: 32px; color: var(--green); line-height: 1; }
.price small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step .num {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--green), var(--gold)); color: #0b1020; font-weight: 800; font-size: 20px;
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- Ganadores ---------- */
.winner { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.winner img, .winner .ph { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--card-2); display: grid; place-items: center; font-size: 48px; }
.winner div.info { padding: 14px; }
.winner h4 { font-size: 16px; }
.winner p { color: var(--muted); font-size: 13px; }

/* ---------- Preguntas ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin-top: 10px; font-size: 15px; }

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 28px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-bottom: 28px; }
.footer h4 { margin-bottom: 10px; font-size: 15px; }
.footer p, .footer a { color: var(--muted); font-size: 14px; display: block; margin-bottom: 6px; }
.footer a:hover { color: var(--green); }
.legal { border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; color: var(--muted); text-align: center; }
.legal p { margin-bottom: 6px; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px #25d36666;
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Modales ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 18, .75); backdrop-filter: blur(4px); }
.modal-box {
  width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 24px;
}
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 18px; }
.modal-head h3 { font-family: var(--font-title); font-size: 30px; line-height: 1; letter-spacing: .5px; }
.modal-head p { color: var(--muted); font-size: 14px; }
.close { font-size: 26px; line-height: 1; color: var(--muted); padding: 2px 8px; border-radius: 8px; }
.close:hover { background: var(--card); color: var(--text); }

.packages { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.package {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 10px; text-align: center; transition: .2s;
}
.package:hover { border-color: var(--green); transform: translateY(-2px); }
.package.featured { border-color: var(--gold); }
.package .ribbon { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #1a1300; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.package .pname { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.package .pqty { font-family: var(--font-title); font-size: 38px; line-height: 1.1; }
.package .pqty small { font-family: var(--font); font-size: 11px; color: var(--muted); display: block; }
.package .pprice { color: var(--green); font-weight: 700; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input[type=text], .field input[type=tel], .field input[type=number], .field input[type=password] {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit;
}
.field input:focus { outline: 2px solid var(--green); border-color: transparent; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error { font-size: 13px; color: var(--red); margin-top: 4px; }
.qty { display: flex; gap: 8px; }
.qty button { width: 48px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 22px; }
.qty input { text-align: center; font-weight: 700; font-size: 18px; }

.banks { display: grid; gap: 8px; }
.bank { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.bank:has(input:checked) { border-color: var(--green); background: #22c55e14; }
.bank input { accent-color: var(--green); }

.account { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.account .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.account .copy { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--card-2); color: var(--green); }

.upload { display: block; text-align: center; padding: 20px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; color: var(--muted); font-size: 14px; }
.upload:hover { border-color: var(--green); }
.upload b { color: var(--text); display: block; }
.check { display: flex; gap: 10px; align-items: start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--green); }
.check a { color: var(--green); text-decoration: underline; }

.total { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.total b { font-family: var(--font-title); font-size: 34px; color: var(--green); }
.note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }

.success { text-align: center; }
.success .big { font-size: 56px; }
.numbers { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0; max-height: 180px; overflow-y: auto; }
.numbers span { font-family: monospace; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.status { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status.pendiente { background: #fbbf2420; color: var(--gold); }
.status.aprobado { background: #22c55e20; color: var(--green); }
.alert { padding: 12px 14px; border-radius: 10px; background: #ef444418; border: 1px solid #ef444455; color: #fca5a5; font-size: 14px; margin: 12px 0; }
.demo-bar { background: var(--gold); color: #1a1300; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; }

/* ---------- Tablero para elegir números ---------- */
.tablero-box { width: min(760px, 100%); display: flex; flex-direction: column; }
.tablero-herramientas { display: flex; gap: 8px; margin-bottom: 10px; }
.tablero-herramientas input {
  flex: 1; min-width: 0; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit;
}
.tablero-herramientas .btn { padding: 10px 14px; white-space: nowrap; }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.leyenda .libre { background: var(--card); border: 1px solid var(--line); }
.leyenda .mio { background: var(--green); }
.leyenda .tomado { background: #3a2230; }
.tablero {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px;
  max-height: 46vh; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.tablero button {
  padding: 8px 0; border-radius: 7px; font-family: monospace; font-size: 13px; font-weight: 700;
  background: var(--card); border: 1px solid var(--line); color: var(--text); transition: background .12s;
}
.tablero button:hover:not(:disabled) { border-color: var(--green); }
.tablero button.mio { background: var(--green); border-color: var(--green); color: #052e14; }
.tablero button:disabled { background: #3a2230; color: #8a5a6c; text-decoration: line-through; cursor: not-allowed; border-color: transparent; }
.tablero button.oculto { display: none; }
.tablero-pie { margin-top: 12px; }
.seleccion { display: flex; flex-wrap: wrap; gap: 6px; max-height: 76px; overflow-y: auto; }
.seleccion button { font-family: monospace; font-weight: 700; font-size: 13px; padding: 4px 8px; border-radius: 7px; background: #22c55e22; color: var(--green); border: 1px solid #22c55e66; }
.seleccion button::after { content: " ×"; opacity: .7; }

@media (max-width: 720px) {
  .tablero { grid-template-columns: repeat(5, 1fr); }
  .tablero button { font-size: 14px; padding: 10px 0; }
}

/* ---------- Verificador ---------- */
.panel { max-width: 620px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.panel select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: inherit;
}
.step-label { font-size: 12px; color: var(--green); font-weight: 700; letter-spacing: 1px; }
.result { margin-top: 20px; }
.result-item { padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 12px; }

/* ---------- Páginas legales ---------- */
.doc { max-width: 780px; margin: 0 auto; }
.doc h1 { font-family: var(--font-title); font-size: 48px; margin-bottom: 8px; }
.doc h2 { font-size: 20px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--muted); margin-bottom: 10px; }
.doc ul { padding-left: 22px; }

/* ---------- Móvil ---------- */
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 12px 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--line); display: none;
  }
  .nav.open { display: flex; }
  .hero { padding-top: 40px; }
  .grid { grid-template-columns: 1fr; }
  .countdown div { min-width: 52px; }
}
