:root {
  --bg: #0b0b14;
  --bg-2: #12121f;
  --surface: #171728;
  --surface-2: #1e1e33;
  --border: #2a2a45;
  --text: #f4f4fa;
  --muted: #a8a8c0;
  --accent: #ff2d78;
  --accent-2: #7c3aed;
  --accent-grad: linear-gradient(135deg, #ff2d78, #7c3aed);
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #38bdf8;
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1080px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  font-size: 16px;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 18px; }
section { padding: 56px 0; }
h1 { font-size: 2.4rem; line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: 1.7rem; line-height: 1.2; margin-bottom: 10px; }
h3 { font-size: 1.15rem; }
p.lead, .section-sub { color: var(--muted); font-size: 1.08rem; max-width: 640px; }
.section-sub { margin-bottom: 28px; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 20, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { font-size: 1.35rem; font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
.logo span {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.main-nav a:hover { color: var(--text); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  padding: 12px 22px; border-radius: 999px;
  font-size: 1rem; font-weight: 700; text-decoration: none;
  background: var(--accent-grad); color: #fff;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { transform: translateY(-1px); opacity: .93; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--muted); }
.btn-block { width: 100%; text-align: center; }
.btn-danger { background: transparent; border: 1px solid var(--red); color: var(--red); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; text-align: center; }
.hero h1 { max-width: 720px; margin: 0 auto 16px; }
.hero h1 span {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: .9rem; }

/* ---------- Tarjetas genéricas ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }
.card .price { font-size: 2rem; font-weight: 800; margin: 8px 0 4px; }
.card .price small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.card ul { list-style: none; margin: 14px 0 20px; }
.card ul li { padding: 6px 0 6px 26px; position: relative; color: var(--muted); }
.card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.card.featured { border-color: var(--accent); position: relative; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; margin-bottom: 14px;
}
.tag {
  display: inline-block; font-size: .78rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  margin-bottom: 10px;
}
.tag-example { color: var(--amber); border-color: var(--amber); }
.example-thumb {
  height: 110px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2a1a4a, #3d1030);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin-bottom: 14px;
}
.example-meta { margin-top: 12px; font-size: .88rem; color: var(--muted); }
.example-meta strong { color: var(--text); }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--muted); margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 18px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.site-footer a { color: var(--muted); text-decoration: none; margin-right: 16px; }
.site-footer a:hover { color: var(--text); }

/* ---------- App / formularios ---------- */
.app-page { padding: 32px 0 64px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 22px;
}
.topbar .user-info { color: var(--muted); }
.topbar .user-info strong { color: var(--text); }
.plan-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .85rem; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border);
}
.plan-badge.pro { color: #fff; background: var(--accent-grad); border: none; }

.auth-wrap { max-width: 440px; margin: 40px auto; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; padding: 11px; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); cursor: pointer; font-weight: 700; font-size: 1rem;
}
.auth-tabs button.active { background: var(--accent-grad); color: #fff; border: none; }

form label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 6px; }
input[type="email"], input[type="password"], input[type="url"], input[type="text"],
select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-size: 1rem; font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.form-hint { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-row label { margin-top: 0; }

.alert {
  padding: 13px 16px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: .95rem; display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(239, 68, 68, .14); border: 1px solid var(--red); color: #fca5a5; }
.alert-success { background: rgba(34, 197, 94, .14); border: 1px solid var(--green); color: #86efac; }
.alert-info { background: rgba(56, 189, 248, .12); border: 1px solid var(--blue); color: #bae6fd; }

.usage-card { margin-bottom: 20px; }
.usage-card .big { font-size: 1.5rem; font-weight: 800; margin: 6px 0; }
.progress { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress-bar { height: 100%; background: var(--accent-grad); width: 0%; transition: width .3s ease; }

.paywall {
  display: none; margin-bottom: 20px;
  border: 1px solid var(--amber); background: rgba(245, 158, 11, .1);
}
.paywall.show { display: block; }
.paywall h3 { margin-bottom: 6px; }
.paywall p { color: var(--muted); margin-bottom: 14px; }
.card-pay-wrap { margin-top: 14px; }
.pay-note { color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* ---------- Trabajos ---------- */
.job {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.job-url { word-break: break-all; color: var(--muted); font-size: .92rem; }
.job-meta { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; white-space: nowrap;
}
.badge-pendiente { background: rgba(245, 158, 11, .16); color: var(--amber); }
.badge-procesando { background: rgba(56, 189, 248, .16); color: var(--blue); }
.badge-listo { background: rgba(34, 197, 94, .16); color: var(--green); }
.badge-fallido { background: rgba(239, 68, 68, .16); color: var(--red); }

.clip {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-top: 14px;
}
.clip h4 { margin-bottom: 6px; }
.clip p { color: var(--muted); font-size: .94rem; margin-bottom: 6px; }
.clip p strong { color: var(--text); }
.clip .hashtags { color: var(--blue); font-size: .9rem; }
.clip .btn { margin-top: 10px; }
.empty { color: var(--muted); text-align: center; padding: 28px 0; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.45rem; }
  section { padding: 40px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .main-nav a:not(.btn) { display: none; }
  .hero { padding: 52px 0 40px; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

/* ---------- Modal del anuncio (plan gratuito) ---------- */
.ad-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 5, 12, .82); padding: 16px;
}
.ad-modal[hidden] { display: none; }
.ad-modal-content {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; max-width: 560px; width: 100%;
}
.ad-modal-content h3 { margin-bottom: 6px; }
.ad-video-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--radius-sm); overflow: hidden;
  margin: 14px 0;
}
.ad-video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.ad-countdown {
  font-size: 1.1rem; font-weight: 800; text-align: center; margin: 12px 0;
}
#paypal-button-container { margin-top: 14px; }
#paypal-button-container:empty { display: none; }
