:root {
  --vd-bg: #f7f7fb;
  --vd-card: #ffffff;
  --vd-text: #17171d;
  --vd-muted: #686b76;
  --vd-border: #e7e8ef;
  --vd-accent: #6c4df6;
  --vd-accent-dark: #5638e6;
  --vd-soft: #f2efff;
  --vd-danger: #a72a3a;
  --vd-danger-bg: #fff5f7;
  --vd-success: #176b46;
  --vd-success-bg: #f0fbf6;
  --vd-radius: 18px;
  --vd-shadow: 0 18px 60px rgba(31, 28, 58, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--vd-bg);
  color: var(--vd-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }

.vd-shell { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.vd-site-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--vd-border); }
.vd-header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.vd-brand { font-size: 21px; font-weight: 800; text-decoration: none; letter-spacing: -.03em; }
.vd-nav { display: flex; align-items: center; gap: 22px; }
.vd-nav a { color: #575965; font-size: 14px; font-weight: 650; text-decoration: none; }
.vd-nav a:hover { color: var(--vd-accent); }

.vd-hero { padding: 72px 0 44px; text-align: center; }
.vd-badge {
  display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px;
  background: var(--vd-soft); color: #5537d9; font-size: 13px; font-weight: 750;
}
.vd-hero h1 { margin: 18px auto 12px; max-width: 820px; font-size: clamp(38px, 6vw, 62px); line-height: 1.02; letter-spacing: -.045em; }
.vd-lead { max-width: 780px; margin: 0 auto; color: var(--vd-muted); font-size: 17px; line-height: 1.75; }

.vd-tool-card { max-width: 900px; margin: 32px auto 0; padding: 24px; border: 1px solid var(--vd-border); border-radius: 22px; background: var(--vd-card); box-shadow: var(--vd-shadow); text-align: left; }
.vd-label { display: block; margin-bottom: 8px; color: #333540; font-size: 14px; font-weight: 750; }
.vd-input-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
.vd-input-row input {
  width: 100%; min-width: 0; min-height: 54px; padding: 0 16px; border: 1px solid #d8dae4; border-radius: 13px; background: #fbfbfd; color: var(--vd-text); outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.vd-input-row input:focus { border-color: var(--vd-accent); background: #fff; box-shadow: 0 0 0 4px rgba(108,77,246,.12); }
.vd-input-row button {
  position: relative; min-width: 150px; min-height: 54px; border: 0; border-radius: 13px; padding: 0 22px; background: var(--vd-accent); color: #fff; font-weight: 800; cursor: pointer;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}
.vd-input-row button:hover:not(:disabled) { transform: translateY(-1px); background: var(--vd-accent-dark); }
.vd-input-row button:disabled { cursor: not-allowed; opacity: .68; }
.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.is-loading .button-label { display: none; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.vd-check-row { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; color: #5f626d; font-size: 13px; line-height: 1.55; cursor: pointer; }
.vd-check-row input { margin-top: 3px; accent-color: var(--vd-accent); }
.vd-help { margin: 10px 0 0; color: #858792; font-size: 12.5px; line-height: 1.6; }
.vd-status { margin-top: 16px; padding: 13px 14px; border-radius: 12px; border: 1px solid transparent; font-size: 14px; line-height: 1.55; }
.vd-status.is-error { border-color: #ffd5dc; background: var(--vd-danger-bg); color: var(--vd-danger); }
.vd-status.is-success { border-color: #c9efdc; background: var(--vd-success-bg); color: var(--vd-success); }

.vd-result { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 20px; margin-top: 18px; padding: 16px; border: 1px solid #e3e5ee; border-radius: 16px; background: #fafaff; }
.vd-thumb { width: 180px; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; background: #ececf2; }
.vd-result-body { min-width: 0; }
.vd-result-kicker { margin-bottom: 5px; color: var(--vd-success); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.vd-result h2 { margin: 0 0 6px; font-size: 19px; line-height: 1.35; }
.vd-result-meta { margin: 0 0 14px; color: #777a85; font-size: 13px; }
.vd-result-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.vd-primary-link, .vd-secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 15px; border-radius: 10px; font-size: 13px; font-weight: 800; text-decoration: none; }
.vd-primary-link { background: #19191f; color: #fff; }
.vd-secondary-button { border: 1px solid #d9dbe5; background: #fff; color: #33343a; cursor: pointer; }
.vd-expiry-note { margin: 11px 0 0; color: #8a8c96; font-size: 12px; }

.vd-trust-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; max-width: 900px; margin: 20px auto 0; }
.vd-trust-grid article { padding: 17px; border: 1px solid var(--vd-border); border-radius: 15px; background: #fff; text-align: left; }
.vd-trust-grid strong { display: block; margin-bottom: 5px; font-size: 14px; }
.vd-trust-grid span { color: #747681; font-size: 12.5px; line-height: 1.55; }

.vd-content { max-width: 900px; padding: 28px 0 72px; }
.vd-content h2 { margin: 38px 0 12px; font-size: 27px; letter-spacing: -.025em; }
.vd-content p, .vd-content li { color: #5f626d; line-height: 1.75; }
.vd-steps { padding-left: 22px; }
.vd-steps li { margin-bottom: 10px; }
.vd-faq { display: grid; gap: 10px; }
.vd-faq details { border: 1px solid var(--vd-border); border-radius: 13px; background: #fff; padding: 14px 16px; }
.vd-faq summary { cursor: pointer; font-weight: 750; }
.vd-faq p { margin: 10px 0 2px; }
.vd-legal-note { margin-top: 28px; padding: 18px; border-radius: 14px; background: #f0eff8; color: #565864; line-height: 1.65; }
.vd-legal-note strong { color: #2b2c34; }

.vd-footer { border-top: 1px solid var(--vd-border); background: #fff; }
.vd-footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #757782; font-size: 13px; }
.vd-footer-inner div { display: flex; gap: 16px; }
.vd-footer a { text-decoration: none; }
.vd-footer a:hover { color: var(--vd-accent); }

@media (max-width: 760px) {
  .vd-nav { display: none; }
  .vd-hero { padding-top: 48px; }
  .vd-input-row { grid-template-columns: 1fr; }
  .vd-input-row button { width: 100%; }
  .vd-trust-grid { grid-template-columns: 1fr; }
  .vd-result { grid-template-columns: 1fr; }
  .vd-thumb { width: 100%; max-height: 260px; }
  .vd-footer-inner { padding: 18px 0; align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* V1.2 Facebook authorization + multi-format UI */
.vd-page-alert { max-width: 900px; margin: 20px auto 0; padding: 13px 15px; border: 1px solid var(--vd-border); border-radius: 12px; background: #fff; color: #555864; font-size: 14px; text-align: left; }
.vd-page-alert.is-error { border-color: #ffd5dc; background: var(--vd-danger-bg); color: var(--vd-danger); }
.vd-page-alert.is-success { border-color: #c9efdc; background: var(--vd-success-bg); color: var(--vd-success); }

.vd-connect-card { max-width: 900px; margin: 26px auto 0; padding: 20px; border: 1px solid var(--vd-border); border-radius: 18px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; text-align: left; }
.vd-connect-card h2 { margin: 0 0 7px; font-size: 19px; letter-spacing: -.02em; }
.vd-connect-card p { margin: 0; max-width: 650px; color: var(--vd-muted); font-size: 13px; line-height: 1.65; }
.vd-connect-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 17px; border-radius: 11px; background: #1877f2; color: #fff; font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.vd-connect-button:hover { filter: brightness(.96); }
.vd-config-note code { background: #f2f2f6; border-radius: 6px; padding: 2px 5px; color: #33343a; }
.vd-account-controls { display: flex; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.vd-account-form { min-width: 240px; }
.vd-account-form label { display: block; margin-bottom: 6px; color: #555864; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.vd-account-form select { width: 100%; min-height: 42px; padding: 0 34px 0 11px; border: 1px solid #d9dbe5; border-radius: 10px; background: #fff; color: #30313a; font: inherit; font-size: 13px; }
.vd-text-button { min-height: 42px; padding: 0 12px; border: 1px solid #e0e1e8; border-radius: 10px; background: #fff; color: #6b6d77; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.vd-text-button:hover { border-color: #c8cad5; color: #2f3037; }

.vd-formats { display: grid; gap: 9px; margin: 14px 0; }
.vd-format-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid #e3e5ee; border-radius: 12px; background: #fff; }
.vd-format-row > div { min-width: 0; }
.vd-format-row strong { display: block; margin-bottom: 3px; font-size: 13px; }
.vd-format-row span { display: block; color: #777a85; font-size: 11.5px; line-height: 1.45; }
.vd-format-row .vd-primary-link { flex-shrink: 0; }

@media (max-width: 760px) {
  .vd-connect-card { align-items: stretch; flex-direction: column; }
  .vd-account-controls { align-items: stretch; flex-direction: column; }
  .vd-account-form { min-width: 0; width: 100%; }
  .vd-text-button, .vd-connect-button { width: 100%; }
  .vd-format-row { align-items: stretch; flex-direction: column; }
  .vd-format-row .vd-primary-link { width: 100%; }
}

/* V1.4 tabs */
.vd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.vd-tab {
  flex: 1 1 110px; padding: 11px 14px; border: 1px solid var(--vd-border); border-radius: 12px;
  background: #fff; color: #575965; font-weight: 700; font-size: 15px; cursor: pointer;
}
.vd-tab:hover { border-color: var(--vd-accent); color: var(--vd-accent); }
.vd-tab.is-active { background: var(--vd-accent); border-color: var(--vd-accent); color: #fff; }
.vd-tab:focus-visible { outline: 3px solid var(--vd-soft); outline-offset: 2px; }
