/**
 * Video Downloader Pro — mobile funnel.
 * Removable: public/vd-assets + views/pages/video-downloader + layouts/video-downloader
 * + VideoDownloaderController + Support/VideoDownloaderCatalog
 */

:root {
  --vd-ink: #111111;
  --vd-mute: #5c5c5c;
  --vd-line: #ececec;
  --vd-paper: #ffffff;
  --vd-wash: #f4f4f4;
  --vd-ad: #f0f2f5;
  --vd-green: #22c55e;
  --vd-blue: #3b82f6;
  --vd-pink: #ec4899;
  --vd-purple: #8b5cf6;
  --vd-orange: #f59e0b;
  --vd-ig: #e1306c;
  --vd-fb: #1877f2;
  --vd-wa: #25d366;
  --vd-radius: 18px;
  --vd-pad: 16px;
  --vd-max: 430px;
  --vd-tab: 64px;
  --vd-sans: Inter, "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.vd-body {
  min-height: 100dvh;
  background: #d9dde3;
  color: var(--vd-ink);
  font-family: var(--vd-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.vd-skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.vd-skip:focus {
  left: 8px;
  z-index: 40;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
}

.vd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vd-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 650;
}

.vd-nav-overlay[hidden],
.vd-dialog[hidden],
[hidden] {
  display: none !important;
}

.vd-nav-overlay p {
  margin: 0;
  padding: 14px 22px;
  border-radius: 12px;
  background: #111;
}

.vd-frame {
  width: 100%;
  max-width: var(--vd-max);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--vd-paper);
  position: relative;
  overflow-x: hidden;
}

.vd-shell {
  padding: 0 0 calc(var(--vd-tab) + env(safe-area-inset-bottom, 0px) + 12px);
  min-height: 100dvh;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.vd-shell-platforms {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.vd-hub-head,
.vd-select-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--vd-pad) 8px;
}

.vd-hub-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.vd-select-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.vd-select-title::after {
  content: "";
  display: block;
  width: 4.6rem;
  height: 5px;
  margin-top: 6px;
  background: #111;
  border-radius: 4px;
}

.vd-select-sub {
  margin: 10px 0 0;
  color: var(--vd-mute);
  font-size: 14px;
  max-width: 18rem;
}

.vd-topbar {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: env(safe-area-inset-top, 0px) 10px 0;
}

.vd-topbar-title {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.vd-icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #111;
  text-decoration: none;
  border-radius: 12px;
}

.vd-icon-btn:focus-visible,
.vd-btn:focus-visible,
.vd-tab:focus-visible,
.vd-feature:focus-visible,
.vd-social:focus-visible,
.vd-platform-btn:focus-visible,
.vd-switch:focus-visible,
.vd-explore a:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.vd-icon-btn-ghost {
  visibility: hidden;
}

.vd-sponsor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
}

.vd-sponsor-round {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #111;
  display: grid;
  place-items: center;
}

.vd-sponsor-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 3px 7px;
}

.vd-sponsor-round .vd-sponsor-badge {
  background: transparent;
  padding: 0;
}

.vd-sponsor-text {
  font-size: 10px;
  color: var(--vd-mute);
}

.vd-first-fold {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: calc(100svh - var(--vd-tab) - env(safe-area-inset-bottom, 0px));
  height: calc(100dvh - var(--vd-tab) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100svh - var(--vd-tab) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - var(--vd-tab) - env(safe-area-inset-bottom, 0px));
  padding: 0 var(--vd-pad) 8px;
  box-sizing: border-box;
  overflow: hidden;
}

.vd-first-fold .vd-hub-head,
.vd-first-fold .vd-topbar {
  flex-shrink: 0;
  padding-left: 0;
  padding-right: 0;
}

.vd-ad {
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 12px var(--vd-pad) 20px;
  background: var(--vd-ad);
  border: 1px solid #e2e5ea;
  border-radius: 14px;
  overflow: hidden;
}

.vd-ad-fold {
  flex: 1 1 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 8px 0 0;
  overflow: hidden;
}

.vd-shell-hub > .vd-ad,
.vd-first-fold .vd-ad {
  margin-left: 0;
  margin-right: 0;
}

.vd-ad-native,
.vd-ad-infeed {
  min-height: 100px;
}

.vd-ad-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: #444;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  padding: 2px 6px;
}

.vd-ad ins.adsbygoogle {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto;
}

.vd-ad-fold ins.adsbygoogle {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
}

.vd-ad iframe {
  max-width: 100% !important;
  max-height: 100% !important;
}

.vd-feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.08);
  min-height: 128px;
}

.vd-feature-wide {
  flex-direction: row;
  align-items: center;
  margin: 4px var(--vd-pad) 12px;
  min-height: 92px;
}

.vd-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 var(--vd-pad);
  margin-bottom: 12px;
}

.vd-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.vd-theme-green .vd-feature-icon { background: linear-gradient(160deg, #34d399, #059669); }
.vd-theme-blue .vd-feature-icon { background: linear-gradient(160deg, #60a5fa, #2563eb); }
.vd-theme-pink .vd-feature-icon { background: linear-gradient(160deg, #f472b6, #db2777); }
.vd-theme-purple .vd-feature-icon { background: linear-gradient(160deg, #a78bfa, #7c3aed); }
.vd-theme-orange .vd-feature-icon { background: linear-gradient(160deg, #fbbf24, #d97706); }

.vd-feature strong {
  font-size: 15px;
}

.vd-feature span {
  color: var(--vd-mute);
  font-size: 12px;
}

.vd-feature-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.vd-view {
  margin-left: auto;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 44px;
  display: grid;
  place-items: center;
}

.vd-view-green { background: linear-gradient(90deg, #34d399, #10b981); }
.vd-view-orange { background: linear-gradient(90deg, #fb923c, #f59e0b); }

.vd-block {
  padding: 8px var(--vd-pad) 4px;
}

.vd-section-h {
  margin: 8px 0 12px;
  font-size: 1.05rem;
}

.vd-section-h-center {
  text-align: center;
}

.vd-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vd-social {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 16px;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  background: #f3f4f6;
}

.vd-social-ig { background: linear-gradient(135deg, #fce7f3, #ede9fe); }
.vd-social-fb { background: #dbeafe; }
.vd-social-wa { background: #dcfce7; }

.vd-social-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.vd-social-ig .vd-social-mark { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.vd-social-fb .vd-social-mark { background: #1877f2; }
.vd-social-wa .vd-social-mark { background: #25d366; }

.vd-explore {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
}

.vd-explore a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #222;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-height: 44px;
}

.vd-explore-ico {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.vd-ico-blue { background: #3b82f6; }
.vd-ico-pink { background: #ec4899; }
.vd-ico-green { background: #22c55e; }
.vd-ico-purple { background: #8b5cf6; }

.vd-platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px var(--vd-pad) 24px;
}

.vd-platform-btn {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 0;
  background: #f0f0f0;
  color: #111;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}

.vd-platform-btn.is-on {
  background: #111;
  color: #fff;
}

.vd-sticky-cta {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 8px var(--vd-pad) 16px;
  background: linear-gradient(180deg, transparent, #fff 28%);
}

.vd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
}

.vd-btn-dark {
  background: #111;
  color: #fff;
}

.vd-btn-ghost {
  background: #f3f4f6;
  color: #111;
}

.vd-btn-pill {
  border-radius: 999px;
}

.vd-btn-center {
  max-width: 280px;
  margin: 0 auto;
}

.vd-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 var(--vd-pad);
  margin-top: 12px;
}

.vd-private-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--vd-pad);
  font-weight: 600;
}

.vd-switch {
  width: 52px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #d4d4d4;
  padding: 3px;
  cursor: pointer;
}

.vd-switch[aria-checked="true"] {
  background: #22c55e;
}

.vd-switch-thumb {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
}

.vd-switch[aria-checked="true"] .vd-switch-thumb {
  transform: translateX(20px);
}

.vd-url-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 var(--vd-pad);
  padding: 4px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  min-height: 52px;
  background: #fff;
}

.vd-url-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  min-width: 0;
  background: transparent;
}

.vd-url-ico {
  color: #666;
}

.vd-private-panel {
  padding: 20px var(--vd-pad) 8px;
}

.vd-status {
  min-height: 1.4em;
  margin: 12px var(--vd-pad) 0;
  color: var(--vd-mute);
  font-size: 14px;
}

.vd-result,
.vd-card-plain,
.vd-empty {
  margin: 12px var(--vd-pad);
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--vd-line);
}

.vd-empty h2 {
  margin: 0 0 8px;
}

.vd-fine {
  margin: 10px var(--vd-pad) 0;
  color: var(--vd-mute);
  font-size: 12px;
}

.vd-lead {
  margin: 8px var(--vd-pad) 14px;
  color: #333;
}

.vd-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 var(--vd-pad);
}

.vd-text {
  min-height: 48px;
  border: 1px solid #d4d4d4;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.vd-player {
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  border-radius: 12px;
  background: #000;
  max-height: 240px;
}

.vd-player-portrait {
  max-height: 420px;
}

.vd-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--vd-max);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: #fff;
  border-top: 1px solid var(--vd-line);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
}

.vd-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  background: none;
  border: 0;
  color: #444;
  text-decoration: none;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.vd-tab.is-on {
  color: #111;
}

.vd-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  background: rgba(0, 0, 0, 0.4);
  padding: 16px;
}

.vd-dialog-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px 16px;
}

.vd-dialog-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.vd-dialog-card p {
  margin: 0 0 14px;
  color: var(--vd-mute);
}

.vd-dialog-actions {
  display: grid;
  gap: 8px;
}

.vd-desktop-gate {
  display: none;
}

body.vd-force-mobile .vd-desktop-gate {
  display: none !important;
}

body.vd-force-mobile .vd-app {
  display: block !important;
}

.vd-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.vd-canvas {
  display: block;
  margin: 12px auto;
  width: 180px;
  height: 180px;
  border-radius: 24px;
}

.vd-avatar-preview {
  margin: 16px;
  padding: 24px;
  border-radius: 16px;
  background: #111;
  color: #fff;
  text-align: center;
}

.vd-avatar-preview span {
  font-size: 3rem;
  font-weight: 800;
}

.vd-library {
  list-style: none;
  margin: 0;
  padding: 0 var(--vd-pad);
}

.vd-library li {
  padding: 12px 0;
  border-bottom: 1px solid var(--vd-line);
  word-break: break-all;
  font-size: 14px;
}

.vd-steps {
  margin: 0 16px 16px;
  padding-left: 20px;
}

.vd-btn,
.vd-tab,
.vd-feature,
.vd-social,
.vd-platform-btn,
.vd-switch {
  touch-action: manipulation;
}

@media (min-width: 768px) {
  body:not(.vd-force-mobile) .vd-app {
    display: none !important;
  }

  body:not(.vd-force-mobile) .vd-desktop-gate {
    display: flex;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: #eef1f5;
  }

  body:not(.vd-force-mobile) .vd-desktop-gate[hidden] {
    display: flex !important;
  }

  body:not(.vd-force-mobile) .vd-desktop-card {
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  }

  body:not(.vd-force-mobile) .vd-desktop-card h1 {
    margin: 0 0 10px;
    font-size: 1.6rem;
  }
}

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