/* =============================================================================
   SinMarca — quitar marca de agua de TikTok
   Colores TikTok: negro #010101, cian #25F4EE, rosa #FE2C55.
   1. Tokens  2. Base  3. Cabecera y marca  4. Portada y herramienta  5. Editor
   6. Resultado  7. Contenido (índice, pasos, texto, FAQ)  8. Anuncios  9. Pie
   10. Responsive
============================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --tt-black: #010101;
  --tt-cyan: #25f4ee;
  --tt-pink: #fe2c55;
  --pink-ink: #d9003a;          /* rosa legible sobre blanco (texto y enlaces) */
  --cyan-ink: #00807c;          /* cian legible sobre blanco */

  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #f0f0f2;
  --ink: #121214;
  --ink-2: #45454d;
  --muted: #72727c;
  --line: #e3e3e8;
  --ok: #0a8a62;
  --ok-soft: #e1f6ee;
  --warn: #946000;
  --warn-soft: #fff3d6;
  --err: #c4002f;
  --err-soft: #ffe5eb;
  --radius: 20px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --pink-ink: #ff5c7c;
    --cyan-ink: #25f4ee;
    --bg: #0c0c0e;
    --surface: #17171a;
    --surface-2: #222226;
    --ink: #f4f4f6;
    --ink-2: #c8c8d0;
    --muted: #9696a2;
    --line: #2e2e34;
    --ok: #3fdca5;
    --ok-soft: rgba(63, 220, 165, 0.12);
    --warn: #f5b84a;
    --warn-soft: rgba(245, 184, 74, 0.12);
    --err: #ff6f8c;
    --err-soft: rgba(255, 111, 140, 0.12);
    color-scheme: dark;
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--pink-ink); }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 800; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--tt-cyan); outline-offset: 2px; }

/* ---------- 3. Cabecera y marca ---------- */
.site-header { background: var(--tt-black); border-bottom: 1px solid #1d1d21; }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.wordmark { font-weight: 800; font-size: 1.28rem; letter-spacing: -0.03em; color: #fff; }
.wordmark b { font-weight: 800; text-shadow: -1.5px -1px 0 var(--tt-cyan), 1.5px 1px 0 var(--tt-pink); }
.header-nav { display: flex; gap: 22px; }
.header-nav a { color: #d6d6dc; text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.header-nav a:hover { color: var(--tt-cyan); }

/* ---------- 4. Portada y herramienta ---------- */
.hero {
  position: relative;
  padding: 30px 0 34px;
  color: #fff;
  background:
    radial-gradient(520px 320px at 12% 12%, rgba(37, 244, 238, 0.2), transparent 70%),
    radial-gradient(560px 360px at 88% 20%, rgba(254, 44, 85, 0.22), transparent 70%),
    var(--tt-black);
}
.hero h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.2rem); font-weight: 800; text-align: center; margin-bottom: 10px; letter-spacing: -0.035em; }
.hero h1 .hl { color: var(--tt-pink); text-shadow: 2px 2px 0 rgba(37, 244, 238, 0.8); margin-left: 0.12em; white-space: nowrap; }
.lead { text-align: center; color: #c9c9d1; max-width: 660px; margin: 0 auto 22px; font-size: 1.06rem; }

.tool-card {
  position: relative;
  isolation: isolate;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 940px;
  margin: 0 auto;
}
.tool-card::before {                     /* borde degradado cian → rosa */
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(120deg, var(--tt-cyan), var(--tt-pink));
}
.tool-card::after {                      /* fondo de la tarjeta por encima del borde */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--radius); background: var(--surface);
}
.pane { display: none; }
.tool-card[data-state="idle"] .pane-idle,
.tool-card[data-state="loading"] .pane-loading,
.tool-card[data-state="edit"] .pane-edit,
.tool-card[data-state="working"] .pane-working,
.tool-card[data-state="done"] .pane-done,
.tool-card[data-state="error"] .pane-error { display: block; }
.noscript { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 240px; padding: 28px 16px;
  border: 2px dashed color-mix(in srgb, var(--tt-pink) 55%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(420px 200px at 20% 0%, rgba(37, 244, 238, 0.12), transparent 70%),
    radial-gradient(420px 200px at 80% 100%, rgba(254, 44, 85, 0.1), transparent 70%),
    var(--surface-2);
  cursor: pointer; text-align: center;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--tt-pink); box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.12); }
.dropzone.is-over { transform: scale(1.01); }
.dz-icon { width: 60px; height: 60px; color: var(--tt-pink); margin-bottom: 4px; filter: drop-shadow(-2px -2px 0 rgba(37, 244, 238, 0.7)); }
.dz-title { font-size: clamp(1.18rem, 1rem + 0.9vw, 1.5rem); font-weight: 800; }
.dz-sub { color: var(--ink-2); }
.dz-link { color: var(--pink-ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.perks li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.92rem; color: var(--ink-2); line-height: 1.45; }
.perks svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--pink-ink); }
.perks li:first-child svg { color: var(--cyan-ink); }

.file-line { font-weight: 800; margin-bottom: 12px; overflow-wrap: anywhere; }
.step { margin: 10px 0 0; color: var(--ink-2); }
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; position: relative; }
.progress.big { height: 14px; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--tt-cyan), var(--tt-pink)); border-radius: inherit; transition: width .25s ease; }
.pane-working { text-align: center; padding: 24px 0 8px; }
.pane-working .progress { max-width: 520px; margin: 0 auto; }
.pane-working .btn { margin-top: 8px; }

.notice { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.err { background: var(--err-soft); color: var(--err); }

.own-note { text-align: center; font-size: 0.88rem; color: #a9a9b3; margin: 16px 0 0; }
.own-note strong { color: #fff; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 800; font-size: 1.2rem; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--tt-pink); color: #fff; box-shadow: -3px -3px 0 var(--tt-cyan); }
.btn-primary:hover { background: #e81c47; box-shadow: -4px -4px 0 var(--tt-cyan); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); font-size: 1rem; }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--pink-ink); font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.btn-download { font-size: 1.2rem; min-height: 58px; padding: 0 28px; }

/* ---------- 5. Editor (antes / después) ---------- */
.compare { --ar: 0.5625; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare.is-landscape { grid-template-columns: 1fr; }
.view { margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.view figcaption { font-weight: 800; font-size: 0.9rem; margin-bottom: 6px; text-align: center; }
.view .hint { font-weight: 600; color: var(--muted); }
.stage {
  position: relative;
  width: min(100%, calc(58vh * var(--ar)));
  aspect-ratio: var(--ar);
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.stage-after { cursor: default; }
.stage canvas { width: 100%; height: 100%; }
.box {
  position: absolute;
  border: 2px solid #fff;
  outline: 2px solid var(--tt-cyan);
  background: rgba(37, 244, 238, 0.16);
  border-radius: 4px;
  cursor: move;
  touch-action: none;
}
.box.is-b { outline-color: var(--tt-pink); background: rgba(254, 44, 85, 0.16); }
.box-tag {
  position: absolute; left: -2px; bottom: calc(100% + 4px);
  background: var(--tt-cyan); color: #000; font-size: 11px; font-weight: 800; line-height: 1;
  padding: 4px 6px; border-radius: 6px; white-space: nowrap; pointer-events: none;
}
.box.is-b .box-tag { background: var(--tt-pink); color: #fff; }
.box.tag-below .box-tag { bottom: auto; top: calc(100% + 4px); }
.h { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--tt-cyan); border-radius: 3px; }
.box.is-b .h { border-color: var(--tt-pink); }
.h::after { content: ""; position: absolute; inset: -10px; }
.h.nw { left: -7px; top: -7px; cursor: nwse-resize; }
.h.ne { right: -7px; top: -7px; cursor: nesw-resize; }
.h.sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.h.se { right: -7px; bottom: -7px; cursor: nwse-resize; }

.timeline { margin-top: 14px; }
.segbar { position: relative; display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.seg-a { background: var(--tt-cyan); width: 50%; }
.seg-b { background: var(--tt-pink); flex: 1; }
.seg-mark { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--ink); left: 50%; }
.scrub { width: 100%; margin: 8px 0 0; accent-color: var(--tt-pink); }
.time-row { display: flex; justify-content: space-between; font-size: 0.85rem; font-variant-numeric: tabular-nums; }

.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 0.85rem; font-weight: 800; cursor: pointer; }
.chip::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--tt-cyan); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.chip-b::before { background: var(--tt-pink); }
.chip.is-active { border-color: var(--ink); background: var(--surface-2); }
.switch-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 0.9rem; }
.switch-ctl strong { font-variant-numeric: tabular-nums; }
.mini { min-width: 34px; height: 32px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 0.8rem; font-weight: 800; }
.mini:hover { border-color: var(--ink-2); }
.mini.text { font-size: 0.85rem; }
.endcut { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 0.92rem; }
.endcut[hidden] { display: none; }
.endcut input { accent-color: var(--tt-pink); }
.tip { margin: 12px 0 0; font-size: 0.9rem; color: var(--ink-2); }

/* ---------- 6. Resultado ---------- */
.compare.videos video { width: min(100%, calc(58vh * var(--ar))); aspect-ratio: var(--ar); background: #000; border-radius: 12px; }

/* ---------- 7. Contenido ---------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 8px 0 24px; }
.content-main { max-width: 780px; margin: 0 auto; width: 100%; }
.content-side { display: none; }
.content-main > section { padding: 28px 0 8px; }
.content-main h2 { position: relative; padding-top: 14px; }
.content-main h2::before {
  content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--tt-cyan) 0 50%, var(--tt-pink) 50% 100%);
}
.content-main p, .content-main li { color: var(--ink-2); }
.content-main strong { color: var(--ink); }
.content-main ol:not(.steps), .content-main ul { padding-left: 1.3em; margin: 0 0 1em; }
.content-main li { margin-bottom: 0.4em; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-top: 12px; }
.toc-title { font-weight: 800; margin: 0 0 6px; color: var(--ink); }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
.toc li { margin: 0 0 4px; break-inside: avoid; font-size: 0.93rem; }
.toc a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.toc a:hover { color: var(--pink-ink); text-decoration: underline; }

.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 0; }
.steps svg { width: 40px; height: 40px; color: var(--tt-pink); margin-bottom: 8px; filter: drop-shadow(-2px -2px 0 rgba(37, 244, 238, 0.75)); }
.steps p { margin: 0; font-size: 0.95rem; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2px 18px; margin-bottom: 10px; }
.faq details[open] { border-color: color-mix(in srgb, var(--tt-pink) 45%, var(--line)); }
.faq summary { cursor: pointer; font-weight: 800; padding: 13px 28px 13px 0; list-style: none; position: relative; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 8px; font-size: 1.45rem; color: var(--tt-pink); font-weight: 600; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; }

/* ---------- 8. Anuncios (huecos preparados, vacíos) ---------- */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  min-height: 100px; margin: 28px auto;
  border: 1px dashed var(--line); border-radius: 12px;
  width: 100%;
}
.ad-slot::before { content: "Publicidad"; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad-slot:has(ins, iframe)::before { display: none; }
.ad-slot:has(ins, iframe) { border: 0; }
.ad-leaderboard { min-height: 100px; }
.ad-incontent { min-height: 280px; margin: 20px auto; }
.ad-infaq { min-height: 250px; margin: 16px auto; }
.ad-inpane { min-height: 250px; margin: 28px auto 4px; max-width: 728px; }
.ad-sidebar { min-height: 600px; width: 300px; margin: 0; }
.ad-footer { min-height: 100px; }

/* ---------- 9. Pie ---------- */
.site-footer { background: var(--tt-black); color: #c9c9d1; padding: 32px 0 40px; margin-top: 16px; }
.footer-row { display: grid; gap: 10px; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-row a { color: #fff; font-weight: 700; }
.site-footer .brand { justify-self: start; }
.site-footer .muted { color: #8f8f9a; }

/* Páginas legales */
.legal { padding: 36px 0 20px; }
.legal h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); font-weight: 800; }

/* ---------- 10. Responsive ---------- */
@media (min-width: 1180px) {
  .content-layout { grid-template-columns: minmax(0, 780px) 300px; justify-content: center; gap: 48px; }
  .content-main { margin: 0; }
  .content-side { display: block; padding-top: 40px; }
  .ad-sidebar { position: sticky; top: 20px; }
}
@media (max-width: 760px) {
  .header-nav { gap: 12px; }
  .header-nav a { font-size: 0.82rem; }
  .header-nav a:nth-child(2) { display: none; }
  .hero { padding: 20px 0 26px; }
  .lead { font-size: 0.98rem; margin-bottom: 16px; }
  .tool-card { padding: 14px; border-radius: 16px; }
  .tool-card::before { border-radius: 18px; }
  .tool-card::after { border-radius: 16px; }
  .dropzone { min-height: 180px; }
  .perks { grid-template-columns: 1fr; gap: 6px; }
  .compare { gap: 8px; }
  .view .hint { display: none; }
  .steps { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .controls { flex-direction: column; align-items: stretch; }
  .actions .btn { flex: 1 1 auto; }
  .ad-incontent { min-height: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
