/* ============================================================
   Multi Downloader — Ethereal Glass
   OLED black · grano · double-bezel · acento lima de señal
   ============================================================ */

:root {
  /* Superficies (negro OLED tintado, una sola familia de grises) */
  --bg: #070708;
  --bg-2: #0c0c0e;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --hair: rgba(255, 255, 255, 0.09);
  --hair-strong: rgba(255, 255, 255, 0.14);

  /* Texto (blanco cálido, no #fff puro) */
  --text: #f4f3ef;
  --muted: #9a9a93;
  --faint: #6a6a64;

  /* Un solo acento: lima de señal (= acción / descarga) */
  --acc: #cdfd50;
  --acc-soft: rgba(205, 253, 80, 0.14);
  --acc-glow: rgba(205, 253, 80, 0.35);

  --danger: #ff6b5e;

  /* Sombras tintadas, nunca negro puro plano */
  --sh-1: 0 1px 1px rgba(255, 255, 255, 0.04) inset, 0 12px 30px -12px rgba(0, 0, 0, 0.8);
  --sh-2: 0 1px 1px rgba(255, 255, 255, 0.06) inset, 0 30px 60px -20px rgba(0, 0, 0, 0.85);

  /* Movimiento con masa */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.4, 0.1, 0, 1);

  /* Z-scale ordenada */
  --z-amb: 0;
  --z-content: 1;
  --z-nav: 40;
  --z-grain: 60;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Texturas de fondo ---- */
.ambient { position: fixed; inset: 0; z-index: var(--z-amb); pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.5; }
.orb-1 {
  width: 520px; height: 520px; top: -160px; left: -120px;
  background: radial-gradient(circle, var(--acc-glow), transparent 70%);
  opacity: 0.16;
}
.orb-2 {
  width: 620px; height: 620px; bottom: -260px; right: -180px;
  background: radial-gradient(circle, rgba(120, 170, 255, 0.18), transparent 70%);
  opacity: 0.12;
}

/* Grano sutil fijo: rompe la planitud digital */
.grain {
  position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Nav isla flotante
   ============================================================ */
.nav-island {
  position: sticky; top: 0; z-index: var(--z-nav);
  width: min(100% - 28px, 880px);
  margin: 18px auto 0;
  padding: 9px 9px 9px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.6);
  border: 1px solid var(--hair);
  box-shadow: var(--sh-1);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; color: var(--acc);
  background: var(--acc-soft);
  border: 1px solid rgba(205, 253, 80, 0.25);
}
.brand-mark svg { width: 17px; height: 17px; }

.brand-mark img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.brand-name {
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: 1rem; letter-spacing: -0.02em;
}
.brand-thin { color: var(--muted); font-weight: 400; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 8px 8px 16px;
  border: none; cursor: pointer;
  border-radius: 999px;
  background: var(--acc); color: #14160a;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.86rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  box-shadow: 0 8px 24px -10px var(--acc-glow);
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta:active { transform: scale(0.97); }
.cta-dot { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.14); transition: transform 0.4s var(--ease); }
.cta-dot svg { width: 14px; height: 14px; }
.nav-cta:hover .cta-dot { transform: translateX(2px); }

/* Estilos cuando la PWA está instalada: header compacto y marca refinada */
.pwa-installed .nav-island {
  width: min(100% - 28px, 560px);
  margin-top: 12px;
  padding: 10px 14px;
  height: 56px;
  background: rgba(8, 8, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6), 0 1px 1px rgba(255,255,255,0.02) inset;
}
.pwa-installed .brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: none; border: none; padding: 0;
}
.pwa-installed .brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.pwa-installed .brand-name { font-weight: 600; font-size: 1rem; }
.pwa-installed .brand-thin { color: rgba(244,243,239,0.86); font-weight: 400; opacity: 0.95; }
.pwa-installed .nav-cta { display: none; }

/* ============================================================
   Shell / layout
   ============================================================ */
.shell {
  position: relative; z-index: var(--z-content);
  width: min(100% - 36px, 760px);
  margin: 0 auto;
  padding: clamp(48px, 9vh, 96px) 0 40px;
}

/* ---- Hero ---- */
.hero { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--muted);
  padding: 7px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hair);
}
.display {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 22px 0 0;
  text-wrap: balance;
}
.accent-text {
  color: var(--acc);
  text-shadow: 0 0 40px var(--acc-glow);
}
.lede {
  max-width: 52ch; margin: 20px auto 0;
  color: var(--muted); font-size: 1.02rem; line-height: 1.6;
  text-wrap: pretty;
}

/* ---- Buscador double-bezel ---- */
.search-bezel {
  margin: 34px auto 0;
  max-width: 600px;
  padding: 6px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--hair);
  box-shadow: var(--sh-2);
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.search-bezel:focus-within {
  border-color: rgba(205, 253, 80, 0.4);
  box-shadow: var(--sh-2), 0 0 0 4px var(--acc-soft);
}
.search-core {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 7px 7px 16px;
  border-radius: 16px;
  background: var(--bg-2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}
.search-icon { color: var(--faint); display: grid; place-items: center; flex-shrink: 0; }
.search-icon svg { width: 20px; height: 20px; }
.search-core input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem; letter-spacing: -0.01em;
  padding: 12px 0;
}
.search-core input::placeholder { color: var(--faint); }

.island-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 11px 11px 20px;
  border: none; cursor: pointer;
  border-radius: 12px;
  background: var(--acc); color: #14160a;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 10px 26px -12px var(--acc-glow);
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
}
.island-btn:hover { filter: brightness(1.05); }
.island-btn:active { transform: scale(0.97); }
.island-btn:disabled { opacity: 0.55; cursor: wait; }
.btn-dot {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(0, 0, 0, 0.16);
  transition: transform 0.45s var(--ease);
}
.btn-dot svg { width: 15px; height: 15px; }
.island-btn:hover .btn-dot { transform: translateX(3px) translateY(-1px); }

/* ---- Plataformas ---- */
.sources {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center;
}
.sources li {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint);
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--hair);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.sources li:hover { color: var(--text); border-color: var(--hair-strong); }
.sources li:last-child { color: var(--acc); border-color: rgba(205, 253, 80, 0.3); }

/* ---- Estado / mensajes ---- */
.status {
  margin: 22px auto 0; max-width: 520px;
  font-size: 0.92rem; color: var(--muted);
  padding: 13px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--hair);
}
.status.error {
  color: #ffb9b2; background: rgba(255, 107, 94, 0.08);
  border-color: rgba(255, 107, 94, 0.25);
}
.status.loading::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
  border-radius: 50%; background: var(--acc);
  animation: pulse 1s var(--ease-soft) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.3); } }

/* ============================================================
   Resultado
   ============================================================ */
.result { margin-top: 40px; }

.media-bezel {
  padding: 6px; border-radius: 26px;
  background: var(--surface); border: 1px solid var(--hair);
  box-shadow: var(--sh-2);
}
.media-core {
  display: flex; gap: 18px; align-items: center;
  padding: 14px; border-radius: 20px;
  background: var(--bg-2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}
.thumb-wrap { position: relative; flex-shrink: 0; }
.thumb {
  width: 168px; height: 100px; object-fit: cover; display: block;
  border-radius: 14px; background: #161618;
  border: 1px solid var(--hair);
}
.duration {
  position: absolute; bottom: 8px; right: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem; font-variant-numeric: tabular-nums;
  color: var(--text); padding: 3px 8px; border-radius: 7px;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px);
  border: 1px solid var(--hair);
}
.meta { min-width: 0; }
.source {
  display: inline-block;
  font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--acc); padding: 4px 9px; border-radius: 999px;
  background: var(--acc-soft); border: 1px solid rgba(205, 253, 80, 0.2);
}
.meta h2 {
  font-family: "Space Grotesk", sans-serif; font-weight: 500;
  font-size: 1.12rem; line-height: 1.3; letter-spacing: -0.02em;
  margin: 10px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.uploader { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* ---- Tabs ---- */
.tabs {
  display: inline-flex; gap: 4px; margin: 24px 0 16px; padding: 5px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--hair);
}
.tab {
  padding: 9px 18px; border: none; cursor: pointer;
  border-radius: 999px; background: transparent; color: var(--muted);
  font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 0.88rem;
  transition: color 0.4s var(--ease), background 0.4s var(--ease);
}
.tab.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06); }
.tab:not(.active):hover { color: var(--text); }

/* ---- Bento de calidad rápida (asimétrico, no grid igual) ---- */
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-areas: "audio v1 v1" "audio v2 v3";
  gap: 12px;
}
.opt {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 20px; cursor: pointer; text-align: left;
  border-radius: 18px;
  background: var(--surface); border: 1px solid var(--hair);
  color: var(--text);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.opt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.opt:hover { transform: translateY(-2px); border-color: var(--hair-strong); background: var(--surface-2); }
.opt:active { transform: scale(0.985); }
.opt:disabled { opacity: 0.5; cursor: wait; transform: none; }
.opt strong { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.5rem; letter-spacing: -0.03em; }
.opt small { color: var(--muted); font-size: 0.78rem; }

.opt-audio {
  grid-area: audio;
  background:
    radial-gradient(120% 90% at 0% 0%, var(--acc-soft), transparent 60%),
    var(--surface);
  border-color: rgba(205, 253, 80, 0.22);
}
.opt-audio:hover { border-color: rgba(205, 253, 80, 0.4); }
.opt-audio .opt-ico { color: var(--acc); margin-bottom: auto; }
.opt-ico svg { width: 26px; height: 26px; }
.opt-text { display: flex; flex-direction: column; gap: 3px; margin-top: 14px; }
.opt-go {
  position: absolute; top: 18px; right: 18px;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; color: #14160a; background: var(--acc);
  font-size: 0.95rem; font-weight: 700;
  transition: transform 0.5s var(--ease);
}
.opt-audio:hover .opt-go { transform: translateY(2px); }
.opt[data-quality="1080"] { grid-area: v1; }
.opt[data-quality="720"] { grid-area: v2; }
.opt[data-quality="480"] { grid-area: v3; }

/* ---- Lista de formatos ---- */
.format-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.format-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--hair);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.format-row:hover { border-color: var(--hair-strong); background: var(--surface-2); }
.fmt-info { min-width: 0; }
.fmt-title { font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 0.94rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fmt-sub { color: var(--faint); font-size: 0.78rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.format-row button {
  flex-shrink: 0; padding: 9px 18px; cursor: pointer;
  border: 1px solid var(--hair-strong); border-radius: 10px;
  background: var(--surface-2); color: var(--text);
  font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 0.84rem;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}
.format-row button:hover { background: var(--acc); color: #14160a; border-color: var(--acc); }
.format-row button:active { transform: scale(0.96); }
.tag {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 2px 7px; border-radius: 5px;
}
.tag.v { background: rgba(120, 170, 255, 0.14); color: #a8c5ff; }
.tag.a { background: var(--acc-soft); color: var(--acc); }

/* ============================================================
   Descargas en curso
   ============================================================ */
.downloads { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.dl-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--hair);
  animation: rise 0.6s var(--ease) both;
}
.dl-item .spinner {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2px solid var(--hair-strong); border-top-color: var(--acc);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.dl-item.done .spinner, .dl-item.error .spinner { display: none; }
.dl-item .check { display: none; flex-shrink: 0; font-size: 1rem; }
.dl-item.done .check { display: inline; color: var(--acc); }
.dl-item.error .check { display: inline; color: var(--danger); }
.dl-name { flex: 1; min-width: 0; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-state { font-size: 0.72rem; color: var(--faint); font-family: "Space Grotesk", sans-serif; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative; z-index: var(--z-content);
  width: min(100% - 36px, 760px); margin: 60px auto 0;
  padding: 28px 0 40px; text-align: center;
  border-top: 1px solid var(--hair);
}
.footer-note { color: var(--muted); font-size: 0.8rem; margin: 0; }
.footer-mark { color: var(--faint); font-size: 0.72rem; margin: 8px 0 0; letter-spacing: 0.04em; }

/* ============================================================
   Reveals (entrada escalonada con masa)
   ============================================================ */
.reveal { animation: rise 0.9s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  margin-top: clamp(56px, 10vh, 96px);
  padding-top: clamp(40px, 7vh, 72px);
  border-top: 1px solid var(--hair);
}
.faq-head {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
  margin: 0 0 28px;
}
.faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--hair);
}
.faq-item:first-of-type { border-top: 1px solid var(--hair); }
.faq-item h3 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--text);
}
.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 68ch;
  text-wrap: pretty;
}
.faq-item strong { color: var(--text); font-weight: 600; }

/* ============================================================
   Cuenta: botón de nav + modal de registro
   ============================================================ */
.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-account {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--hair-strong); cursor: pointer;
  border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 0.86rem;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav-account:hover { transform: translateY(-1px); background: var(--surface-2); border-color: var(--acc-glow); }
.nav-account:active { transform: scale(0.97); }
.nav-account .acc-ico { width: 17px; height: 17px; display: grid; place-items: center; color: var(--acc); }
.nav-account .acc-ico svg { width: 17px; height: 17px; }
.nav-account.is-loggedin { background: var(--acc-soft); border-color: rgba(205, 253, 80, 0.25); }

/* Overlay + tarjeta */
.auth-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.auth-modal[hidden] { display: none; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.auth-card {
  position: relative; width: min(100%, 400px); max-height: 92vh; overflow-y: auto;
  padding: 28px 26px 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--hair-strong);
  box-shadow: var(--sh-2);
}
.auth-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--hair);
  background: var(--surface); color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.auth-x:hover { color: var(--text); background: var(--surface-2); }
.auth-x svg { width: 16px; height: 16px; }

.auth-title { font-family: "Space Grotesk", sans-serif; font-size: 1.4rem; letter-spacing: -0.02em; margin: 2px 0 6px; }
.auth-sub { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 18px; }
.auth-setup {
  font-size: 0.82rem; line-height: 1.5; color: var(--text);
  background: var(--acc-soft); border: 1px solid rgba(205, 253, 80, 0.25);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 16px;
}
.auth-setup code { color: var(--acc); font-family: "Space Grotesk", monospace; }

.auth-socials { display: flex; flex-direction: column; gap: 9px; }
.auth-prov {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 14px; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--hair-strong);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-weight: 500; font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.auth-prov:hover { background: var(--surface-2); border-color: var(--hair-strong); transform: translateY(-1px); }
.auth-prov:active { transform: scale(0.98); }

.auth-div { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 0.78rem; }
.auth-div::before, .auth-div::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

.auth-form { display: flex; flex-direction: column; gap: 9px; }
.auth-form input {
  width: 100%; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--hair-strong);
  background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 0.92rem;
  transition: border-color 0.2s;
}
.auth-form input:focus { outline: none; border-color: var(--acc-glow); }
.auth-form input::placeholder { color: var(--faint); }

.auth-primary, .auth-secondary {
  width: 100%; padding: 12px 14px; cursor: pointer;
  border-radius: 12px; border: none;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.9rem;
  transition: filter 0.2s, transform 0.15s;
}
.auth-primary { background: var(--acc); color: #14160a; box-shadow: 0 8px 24px -12px var(--acc-glow); }
.auth-primary:hover { filter: brightness(1.05); }
.auth-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--hair-strong); }
.auth-secondary:hover { background: var(--surface); }
.auth-primary:active, .auth-secondary:active { transform: scale(0.98); }

.auth-otp { display: flex; gap: 8px; margin-top: 9px; }
.auth-otp[hidden] { display: none; }
.auth-otp input { flex: 1; }
.auth-otp .auth-primary { width: auto; padding: 12px 18px; }

.auth-toggle { text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
.auth-link { background: none; border: none; cursor: pointer; color: var(--acc); font: inherit; font-weight: 600; padding: 0 4px; }
.auth-link:hover { text-decoration: underline; }

.auth-msg { margin-top: 14px; font-size: 0.85rem; line-height: 1.45; padding: 10px 12px; border-radius: 10px; }
.auth-msg.loading { color: var(--muted); background: var(--surface); }
.auth-msg.ok { color: #14160a; background: var(--acc); }
.auth-msg.error { color: var(--danger); background: rgba(255, 107, 94, 0.12); border: 1px solid rgba(255, 107, 94, 0.3); }

/* ============================================================
   Espacio publicitario (banner discreto)
   ============================================================ */
.ad-slot { max-width: 760px; margin: 8px auto 0; text-align: center; }
.ad-tag {
  display: block; margin-bottom: 8px;
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint);
}
.ad-container {
  min-height: 90px; padding: 6px;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 16px; border: 1px dashed var(--hair); background: var(--surface);
}
.ad-placeholder { color: var(--faint); font-size: 0.85rem; }
/* Cuando entra un anuncio real (iframe/img/ins), quitar el aspecto de "hueco" */
.ad-container:has(iframe), .ad-container:has(img), .ad-container:has(ins) {
  border-style: solid; background: transparent;
}
.ad-container:has(iframe) .ad-placeholder,
.ad-container:has(img) .ad-placeholder,
.ad-container:has(ins) .ad-placeholder { display: none; }

/* Los usuarios Pro no ven anuncios */
body.is-pro .ad-slot { display: none; }

/* ============================================================
   Planes: barra de estado + modal de precios
   ============================================================ */
.plan-bar {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin: 14px auto 0; padding: 8px 8px 8px 16px;
  border-radius: 999px; border: 1px solid var(--hair);
  background: var(--surface); font-size: 0.85rem; color: var(--muted);
}
.plan-bar .pb-txt strong { color: var(--text); }
.plan-bar .pb-pro { color: var(--acc); font-weight: 600; }
.plan-bar .pb-cta {
  border: none; cursor: pointer; padding: 6px 14px; border-radius: 999px;
  background: var(--acc); color: #14160a;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.8rem;
  transition: filter 0.2s, transform 0.15s;
}
.plan-bar .pb-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Tarjeta del modal de precios (reutiliza overlay .auth-modal) */
.plan-card {
  position: relative; width: min(100%, 560px); max-height: 92vh; overflow-y: auto;
  padding: 30px 26px 24px; border-radius: 22px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--hair-strong); box-shadow: var(--sh-2);
}
.plan-reason {
  font-size: 0.85rem; line-height: 1.5; color: var(--text);
  background: var(--acc-soft); border: 1px solid rgba(205, 253, 80, 0.25);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 16px;
}
.plan-toggle {
  display: inline-flex; gap: 4px; padding: 4px; margin: 4px auto 20px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hair); width: fit-content;
}
.plan-card .plan-toggle { display: flex; }
.plan-per {
  border: none; cursor: pointer; padding: 8px 18px; border-radius: 999px;
  background: transparent; color: var(--muted);
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
.plan-per.active { background: var(--acc); color: #14160a; }
.plan-save { font-size: 0.72rem; opacity: 0.85; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan-col {
  position: relative; padding: 20px 18px; border-radius: 16px;
  border: 1px solid var(--hair); background: var(--surface);
}
.plan-col-pro { border-color: rgba(205, 253, 80, 0.4); background: var(--acc-soft); }
.plan-badge {
  position: absolute; top: -10px; right: 14px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--acc); color: #14160a; padding: 3px 10px; border-radius: 999px;
}
.plan-col h3 { font-family: "Space Grotesk", sans-serif; font-size: 1rem; margin-bottom: 6px; }
.plan-price { font-family: "Space Grotesk", sans-serif; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.plan-price small { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.plan-feats { list-style: none; margin: 14px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.plan-feats li { font-size: 0.86rem; color: var(--text); padding-left: 22px; position: relative; line-height: 1.4; }
.plan-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--acc); font-weight: 700; }
.plan-feats li.neg { color: var(--muted); }
.plan-feats li.neg::before { content: "•"; color: var(--faint); }
.plan-col-pro .auth-primary { margin-top: 4px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .nav-island { margin-top: 12px; }
  .nav-account { padding: 8px 12px; }
  .nav-account .acc-label { display: none; }
  .display { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .island-btn { padding: 10px; }
  .island-btn .btn-label { display: none; }
  .island-btn .btn-dot { background: rgba(0, 0, 0, 0.2); }
  .media-core { flex-direction: column; align-items: flex-start; }
  .thumb { width: 100%; height: 180px; }
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "audio audio" "v1 v1" "v2 v3";
  }
  .opt { padding: 16px; }
  .opt strong { font-size: 1.3rem; }
  .plan-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
