/* Property Creator Studio · Reel (img2vid). Hoja propia y autónoma: mismos tokens de marca que la app (app.css). */
:root {
  --brand-gradient: linear-gradient(110deg, #ff3cac 0%, #22d3ee 100%);
  --bg: #f6f6f8;
  --surface: #ffffff;
  --border: #e2e3ea;
  --text: #15161d;
  --muted: #5d6070;
  --accent: #d01b7f;
  --accent-hover: #b8156f;
  --danger-bg: #fde8ec;
  --danger: #a3123a;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0f;
    --surface: #14151c;
    --border: #262836;
    --text: #ececf1;
    --muted: #9a9db0;
    --accent: #ff3cac;
    --accent-hover: #ff5ab9;
    --danger-bg: #3a0f1c;
    --danger: #ff8fa8;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; justify-content: center; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; max-width: 760px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 600; }
.brand b { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-cta { font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 32px; }
.hero { text-align: center; padding: 16px 0 8px; }
.hero h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); line-height: 1.15; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 auto 16px; max-width: 34em; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin: 16px 0; box-shadow: 0 8px 30px rgb(0 0 0 / 0.06);
}
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 28px 16px; border: 2px dashed var(--border); border-radius: var(--radius); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop-icon { font-size: 2rem; line-height: 1; color: var(--accent); }

.thumbs {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px;
}
.thumbs:empty { display: none; }
.thumbs li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--border); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .n {
  position: absolute; left: 6px; top: 6px; background: rgb(0 0 0 / 0.65); color: #fff;
  font-size: 0.75rem; border-radius: 999px; padding: 0 7px;
}
.thumbs .tools { position: absolute; inset: auto 4px 4px 4px; display: flex; justify-content: space-between; }
.thumbs .tools button {
  border: 0; border-radius: 999px; width: 28px; height: 28px; cursor: pointer;
  background: rgb(0 0 0 / 0.65); color: #fff; font-size: 0.9rem;
}
.thumbs .tools button:disabled { opacity: 0.3; cursor: default; }

.formats { border: 0; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.formats legend { font-weight: 600; margin-bottom: 8px; }
.formats label {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; font-size: 0.9rem;
}
.formats label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.formats small { display: block; color: var(--muted); font-size: 0.75rem; }
@media (max-width: 520px) { .formats { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); text-align: center;
  color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; margin-top: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.notice { background: var(--danger-bg); color: var(--danger); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; }
.notice.info { background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--text); }

.progress-head { display: flex; gap: 12px; align-items: center; }
.progress-head p { margin: 2px 0 0; }
.spinner {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 0.8s linear infinite;
}
.is-idle .spinner { animation: none; border-top-color: var(--border); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 14px; }
.bar span { display: block; height: 100%; width: 0; background: var(--brand-gradient); transition: width 0.4s ease; }

#result-video { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; display: block; }
.upsell {
  margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.upsell p { margin: 0 0 8px; }

.howto, .faq, .features { padding: 8px 4px; }
.howto h2, .faq h2 { font-size: 1.2rem; }
.howto ol { padding-left: 1.2em; }
.howto li { margin: 6px 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }
.features h2 { font-size: 1.2rem; }
.features ul { padding-left: 1.2em; }

/* Slots de anuncios: reservan su hueco solo cuando hay anuncio (sin saltos de diseño antes), nunca tapan contenido */
.ad-slot { margin-top: 16px; min-height: 0; overflow: hidden; }
.ad-slot:not([hidden]) { border-top: 1px solid var(--border); padding-top: 12px; }
.ad-slot::before { content: "Publicidad"; display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 4px; }

.foot { text-align: center; padding: 16px; }
.foot a { color: inherit; }
