/* NubeGamer — sitio público. Identidad: dark space-blue, acentos violeta→cyan, glass sutil.
   Coherente con public/admin/style.css. Fuentes de sistema (CSP no permite webfonts externas). */
:root {
  --bg: #070b14;
  --bg-2: #0a0e17;
  --panel: #111726;
  --panel-2: #161d30;
  --line: #223049;
  --line-soft: rgba(124, 58, 237, .18);
  --text: #e7ecf5;
  --muted: #8a97b1;
  --dim: #5b6884;
  --cyan: #22d3ee;
  --violet: #7c3aed;
  --green: #22c55e;
  --amber: #f59e0b;
  --grad: linear-gradient(135deg, var(--violet), var(--cyan));
  --radius: 16px;
  --maxw: 1120px;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Atmósfera: mesh de gradientes + grid diagonal + aurora animada */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(124, 58, 237, .28), transparent 60%),
    radial-gradient(760px 480px at 8% 12%, rgba(34, 211, 238, .16), transparent 55%),
    radial-gradient(1100px 700px at 50% 110%, rgba(124, 58, 237, .12), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed; inset: -50%; z-index: -1;
  background-image:
    linear-gradient(rgba(124, 58, 237, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(600px) rotateX(58deg) translateY(-8%);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, transparent 60%);
  pointer-events: none;
  opacity: .7;
}

a { color: var(--cyan); text-decoration: none; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.accent { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }

/* Marca / logo */
.logo {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 11px; font-weight: 800; font-size: 15px;
  color: #fff; letter-spacing: -.5px;
  background: var(--grad);
  box-shadow: 0 6px 20px rgba(124, 58, 237, .45), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-weight: 700; letter-spacing: .2px; font-size: 19px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 650; cursor: pointer; border: none; border-radius: 12px;
  padding: 13px 22px; color: #fff; background: var(--grad);
  box-shadow: 0 10px 30px rgba(124, 58, 237, .38);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(124, 58, 237, .5); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: rgba(255,255,255,.03); color: var(--text);
  border: 1px solid var(--line); box-shadow: none; backdrop-filter: blur(6px);
}
.btn.ghost:hover { border-color: var(--cyan); background: rgba(34, 211, 238, .06); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 28px; font-size: 16px; }
.btn .ver { font-size: 11px; font-weight: 600; opacity: .7; }

/* Header */
header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px); background: rgba(7, 11, 20, .72);
  border-bottom: 1px solid var(--line-soft);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a.link { color: var(--muted); font-weight: 550; font-size: 15px; transition: color .15s; }
.nav-links a.link:hover { color: var(--text); }
.header-cta { display: flex; align-items: center; gap: 14px; }

/* Hero */
.hero { position: relative; padding: 96px 0 84px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: var(--cyan); padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: rgba(34, 211, 238, .06);
}
.eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .4; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
.hero h1 {
  font-size: clamp(42px, 7vw, 82px); line-height: 1.02; letter-spacing: -2.5px;
  font-weight: 800; margin: 26px 0 20px;
}
.hero p.lead { font-size: clamp(17px, 2.4vw, 21px); color: var(--muted); max-width: 620px; margin: 0 auto 38px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .fineprint { margin-top: 22px; font-size: 13px; color: var(--dim); }

/* Reveal en carga (staggered) */
.reveal { opacity: 0; transform: translateY(22px); animation: reveal .8s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal.d1 { animation-delay: .05s; }
.reveal.d2 { animation-delay: .15s; }
.reveal.d3 { animation-delay: .25s; }
.reveal.d4 { animation-delay: .35s; }
.reveal.d5 { animation-delay: .45s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .eyebrow .pulse { animation: none; }
}

/* Secciones */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .kicker { font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--violet); }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -1px; margin: 12px 0 12px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* Tarjetas glass */
.card {
  position: relative; background: linear-gradient(180deg, rgba(22, 29, 48, .7), rgba(17, 23, 38, .5));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  backdrop-filter: blur(8px); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, .4); box-shadow: 0 22px 50px rgba(0,0,0,.4); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* "Qué es" — layout de features */
.feature .ficon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; margin-bottom: 16px;
  background: rgba(124, 58, 237, .14); border: 1px solid var(--line-soft);
}
.feature h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.3px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Cómo funciona — pasos numerados */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num {
  font-size: 15px; font-weight: 800; color: #fff; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--grad); margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(124, 58, 237, .4);
}
.step h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.3px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* Planes */
.plans { display: flex; justify-content: center; }
.plan {
  position: relative; width: 380px; max-width: 100%; text-align: center; padding: 38px 34px;
  border: 1px solid rgba(124, 58, 237, .4);
  background: linear-gradient(180deg, rgba(124, 58, 237, .1), rgba(17, 23, 38, .55));
  overflow: hidden;
}
.plan::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; pointer-events: none;
}
.plan .badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--amber); border: 1px solid rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .1);
  padding: 5px 13px; border-radius: 999px; margin-bottom: 20px;
}
.plan .price { font-size: 58px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.plan .price .per { font-size: 18px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .price-sub { color: var(--cyan); font-weight: 600; margin: 10px 0 24px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.plan li { display: flex; gap: 11px; align-items: flex-start; color: var(--text); font-size: 15px; }
.plan li .chk { color: var(--green); font-weight: 800; flex-shrink: 0; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px;
  background: rgba(17, 23, 38, .5); overflow: hidden; transition: border-color .2s;
}
.faq details[open] { border-color: rgba(34, 211, 238, .35); }
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 650; font-size: 16px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-size: 22px; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

/* CTA final */
.cta-band { text-align: center; }
.cta-inner {
  border: 1px solid var(--line-soft); border-radius: 24px; padding: 60px 32px;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(124, 58, 237, .22), transparent 70%),
    linear-gradient(180deg, rgba(22, 29, 48, .6), rgba(17, 23, 38, .4));
  backdrop-filter: blur(8px);
}
.cta-inner h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -1px; margin: 0 0 14px; font-weight: 800; }
.cta-inner p { color: var(--muted); font-size: 17px; margin: 0 auto 30px; max-width: 480px; }

/* Footer */
footer { border-top: 1px solid var(--line-soft); padding: 44px 0 34px; margin-top: 40px; }
footer .foot-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
footer .foot-brand { max-width: 300px; }
footer .foot-brand p { color: var(--dim); font-size: 14px; margin: 14px 0 0; }
footer .foot-cols { display: flex; gap: 60px; flex-wrap: wrap; }
footer .foot-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); margin: 0 0 14px; }
footer .foot-col a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 10px; transition: color .15s; }
footer .foot-col a:hover { color: var(--text); }
footer .foot-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* ── Auth (login / registro) ── */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card {
  width: 420px; max-width: 100%; padding: 40px 38px;
  background: linear-gradient(180deg, rgba(22, 29, 48, .82), rgba(17, 23, 38, .7));
  border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.auth-card .brand { justify-content: center; margin-bottom: 26px; }
.auth-card h1 { font-size: 26px; letter-spacing: -.6px; margin: 0 0 6px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 15px; margin: 0 0 28px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input {
  font: inherit; padding: 13px 15px; border-radius: 11px; color: var(--text);
  background: rgba(10, 14, 23, .8); border: 1px solid var(--line); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .14); }
.field .hint { font-size: 12px; color: var(--dim); }
.auth-card .err { color: #ff6b6b; min-height: 20px; font-size: 13.5px; margin: 4px 0 12px; text-align: center; }
.auth-card .btn { margin-top: 6px; }
.auth-alt { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
.cf-turnstile { margin: 4px 0 14px; display: flex; justify-content: center; }
.back-home { position: fixed; top: 24px; left: 24px; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.back-home:hover { color: var(--text); }

/* ── Área de usuario (app.html) ── */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-bar { border-bottom: 1px solid var(--line-soft); background: rgba(7, 11, 20, .7); backdrop-filter: blur(12px); }
.app-bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.app-user { display: flex; align-items: center; gap: 16px; }
.app-user .email { color: var(--muted); font-size: 14px; }
.app-main { flex: 1; display: grid; place-items: center; padding: 60px 20px; }
.app-hero { text-align: center; max-width: 620px; }
.app-hero .orb {
  width: 96px; height: 96px; border-radius: 26px; margin: 0 auto 28px; display: grid; place-items: center;
  font-size: 42px; background: var(--grad); box-shadow: 0 20px 50px rgba(124, 58, 237, .45);
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.app-hero h1 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -1px; margin: 0 0 14px; }
.app-hero p { color: var(--muted); font-size: 17px; margin: 0 0 8px; }
.app-hero .welcome { color: var(--cyan); font-weight: 600; }
.app-chips { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.app-chips .chip {
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); background: rgba(17, 23, 38, .5);
}

/* Responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 520px) {
  .hero { padding: 64px 0 56px; }
  .hero-cta .btn { width: 100%; }
  section { padding: 54px 0; }
  footer .foot-grid { flex-direction: column; }
}
