/* Rupnar IPTV — web oficial. Colores y logo iguales que en la app. */
:root {
  --cyan: #00e5ff;
  --violet: #8a5cff;
  --text: #e9f1ff;
  --muted: #9aa8c6;
  --bg: #070b17;
  --panel: rgba(20, 28, 52, .72);
  --panel-solid: #141c34;
  --line: rgba(127, 143, 176, .28);
  --line-cyan: rgba(0, 229, 255, .35);
  --radius: 18px;
  --wrap: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  background:
    radial-gradient(900px 600px at 8% 0%, rgba(138, 92, 255, .26), transparent 70%),
    radial-gradient(900px 700px at 100% 40%, rgba(0, 229, 255, .12), transparent 70%),
    linear-gradient(rgba(0, 229, 255, .035) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(90deg, rgba(0, 229, 255, .035) 1px, transparent 1px) 0 0 / 60px 60px,
    var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #7ff2ff; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cyan); color: #04202a; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- Logo (igual que en la app) ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .2em; font-size: 1.25rem; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .rup { background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .tag { font-size: .62em; letter-spacing: .16em; color: var(--cyan); padding: 2px 7px; border: 2px solid var(--cyan); border-radius: 6px; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 11, 23, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: .95rem; }
.nav a:hover { color: var(--text); background: rgba(60, 80, 150, .3); }
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; margin-left: 8px; }
.lang a, .lang span { padding: 3px 10px; border-radius: 7px; font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--muted); }
.lang span { background: rgba(0, 229, 255, .18); color: var(--cyan); }
.lang a:hover { color: var(--text); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 42px; height: 40px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; margin: auto; display: block; }

@media (max-width: 1000px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: rgba(7, 11, 23, .97); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .lang { align-self: flex-start; margin: 8px 0 0; }
}

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 14px; font-weight: 700; font-size: 1.02rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { color: #fff; background: linear-gradient(90deg, #0a8fa8, #5b3fd1); box-shadow: 0 8px 30px rgba(0, 229, 255, .18); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 40px rgba(0, 229, 255, .32); }
.btn-ghost { color: var(--text); background: var(--panel); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--line-cyan); }
.btn-coffee { color: #1b1b1b; background: #ffdd00; }
.btn-coffee:hover { color: #1b1b1b; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 221, 0, .25); }
.btn-lg { padding: 18px 30px; font-size: 1.12rem; }
.btn-lg small { display: block; font-weight: 400; font-size: .8rem; opacity: .85; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; text-align: center; }
.hero-icon { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 24px; box-shadow: 0 0 60px rgba(138, 92, 255, .45); }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; max-width: 820px; margin: 0 auto 16px; }
.hero h1 .grad { background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.gp-badge { display: inline-block; border-radius: 12px; transition: transform .15s; }
.gp-badge:hover { transform: translateY(-2px); }
.gp-badge img { height: 58px; width: auto; }
.download-main .gp-badge img { height: 64px; }
.hero-meta { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.hero-shot { margin: 44px auto 0; max-width: 1040px; }

.frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-cyan); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 30px 80px rgba(0, 0, 0, .55), 0 0 90px rgba(138, 92, 255, .18); background: #000; }
.frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Secciones ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* Funciones */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: linear-gradient(135deg, rgba(0, 229, 255, .18), rgba(138, 92, 255, .22)); border: 1px solid var(--line-cyan); }
.feature .ico svg { width: 24px; height: 24px; stroke: var(--cyan); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* Recorrido con capturas */
.tour { display: grid; gap: 56px; }
.tour-item { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) {
  .tour-item { grid-template-columns: 1.5fr 1fr; gap: 44px; }
  .tour-item:nth-child(even) .frame { order: 2; }
}
.tour-item h3 { font-size: 1.45rem; }
.tour-item p { color: var(--muted); }
.tour-item ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.tour-item li { margin-bottom: 4px; }
.tour-item li::marker { color: var(--cyan); }
.frame button { all: unset; display: block; cursor: zoom-in; width: 100%; }

/* Galería */
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.gallery figure { flex: 0 1 calc((100% - 42px) / 4); min-width: 0; }
@media (max-width: 900px) { .gallery figure { flex-basis: calc((100% - 14px) / 2); } }
.gallery figure { margin: 0; }
.gallery button { all: unset; display: block; cursor: zoom-in; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.gallery button:hover { border-color: var(--cyan); transform: translateY(-2px); }
.gallery button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: #101830; }
.gallery figcaption { font-size: .88rem; color: var(--muted); padding: 8px 2px 0; }
.credit { margin-top: 20px; font-size: .82rem; color: var(--muted); text-align: center; }

/* Descarga */
.download { display: grid; gap: 20px; }
@media (min-width: 760px) { .download { grid-template-columns: 1fr 1fr; } .download .notice { grid-column: 1 / -1; } }
.download-main { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 24px; background: linear-gradient(160deg, rgba(30, 42, 78, .85), rgba(14, 20, 40, .9)); border-color: var(--line-cyan); }
.download-main .win { width: 56px; height: 56px; margin-bottom: 12px; }
.download-main h3 { font-size: 1.5rem; }
.download-main .req { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }
.download-main .alt { font-size: .9rem; margin-top: 8px; color: var(--muted); }
.download-main .alt a { color: var(--cyan); }
.notice { border-left: 4px solid #ffb547; }
.notice h3 { display: flex; align-items: center; gap: 10px; }
.notice h3 svg { width: 24px; height: 24px; stroke: #ffb547; fill: none; stroke-width: 2; flex: none; }
.notice p, .notice li { color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1em; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 229, 255, .16); color: var(--cyan); font-weight: 700; font-size: .9rem; display: grid; place-items: center; }
.steps strong, .notice strong { color: var(--text); }
.kbd { display: inline-block; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line); background: rgba(7, 11, 23, .7); color: var(--text); font-size: .9em; white-space: nowrap; }

/* Plataformas */
.platforms { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.platform { text-align: center; position: relative; }
.platform svg { width: 48px; height: 48px; stroke: var(--text); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin: 6px auto 12px; display: block; }
.platform p { color: var(--muted); font-size: .95rem; margin: 0; }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.badge-soon { color: var(--violet); background: rgba(138, 92, 255, .16); border: 1px solid rgba(138, 92, 255, .4); }
.badge-ok { color: var(--cyan); background: rgba(0, 229, 255, .14); border: 1px solid var(--line-cyan); }
.platform.available { border-color: var(--line-cyan); }

/* Donaciones */
.support { text-align: center; max-width: 760px; margin: 0 auto; padding: 40px 24px; background: linear-gradient(160deg, rgba(40, 32, 90, .6), rgba(14, 20, 40, .9)); }
.support p { color: var(--muted); }
.support .btn { margin-top: 8px; }
.support small { display: block; margin-top: 14px; color: var(--muted); font-size: .85rem; }

/* Aviso legal */
.legal { max-width: 820px; margin: 0 auto; border-left: 4px solid var(--cyan); }
.legal p { color: var(--muted); }
.legal p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq details[open] { border-color: var(--line-cyan); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin-bottom: 16px; }

/* Pie */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 32px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: grid; gap: 18px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--cyan); }
.site-footer p { margin: 6px 0 0; }
.site-footer .tm { font-size: .78rem; opacity: .8; }

/* ---------- Visor de capturas ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 56px 12px 20px; background: rgba(4, 8, 18, .94); }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 140px); width: auto; border-radius: 10px; border: 1px solid var(--line-cyan); }
.lightbox p { color: var(--text); margin: 0; text-align: center; padding: 0 56px; }
.lb-btn { position: absolute; background: rgba(20, 28, 52, .9); color: var(--text); border: 1px solid var(--line); border-radius: 50%; width: 46px; height: 46px; font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-btn[hidden] { display: none; }
.lb-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.lb-close { top: 10px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } .lightbox { padding-bottom: 76px; } .lightbox p { padding: 0 8px; } }
body.no-scroll { overflow: hidden; }

/* ---------- Páginas de texto (privacidad) ---------- */
.doc { max-width: 820px; margin: 0 auto; padding: 48px 0 24px; }
.doc h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; }
.doc h2 { font-size: 1.35rem; margin-top: 2em; }
.doc p, .doc li { color: #c9d4ea; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--cyan); }
.doc .updated { color: var(--muted); font-size: .92rem; }
.doc .summary { margin: 24px 0; border-left: 4px solid var(--cyan); }
.doc .summary ul { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .95rem; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: #c9d4ea; }
.doc th { color: var(--text); white-space: nowrap; }

/* Móvil: tarjetas de funciones más compactas (icono junto al título) */
@media (max-width: 600px) {
  section { padding: 48px 0; }
  .card { padding: 18px; }
  .feature { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
  .feature .ico { width: 40px; height: 40px; margin: 0; grid-row: span 2; }
  .feature h3 { margin: 0 0 4px; align-self: center; }
}
