:root {
  --bg: #fbfaff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-soft: #f4f1ff;
  --text: #181525;
  --muted: #716c80;
  --line: rgba(31, 24, 55, 0.1);
  --primary: #6d4aff;
  --primary-dark: #4f2fe5;
  --primary-soft: #ede8ff;
  --accent: #ff5b83;
  --success: #16a677;
  --warning: #e39722;
  --shadow-sm: 0 10px 30px rgba(50, 35, 97, 0.08);
  --shadow-lg: 0 30px 90px rgba(50, 35, 97, 0.18);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --container: min(1180px, calc(100% - 40px));
}

[data-theme="dark"] {
  --bg: #0e0c16;
  --surface: rgba(25, 21, 37, 0.88);
  --surface-solid: #191525;
  --surface-soft: #221d31;
  --text: #f6f3ff;
  --muted: #aaa3bb;
  --line: rgba(255, 255, 255, 0.1);
  --primary: #8a70ff;
  --primary-dark: #7659ff;
  --primary-soft: rgba(109, 74, 255, 0.16);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.container { width: var(--container); margin-inline: auto; }

.ambient {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .32;
  pointer-events: none;
}
.ambient-one { width: 330px; height: 330px; background: #ae96ff; top: 90px; right: -120px; }
.ambient-two { width: 280px; height: 280px; background: #ff9bb7; top: 560px; left: -150px; opacity: .18; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-color: var(--line);
  box-shadow: 0 8px 30px rgba(20, 15, 40, .05);
}
.nav-wrap { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 45px; height: 45px; border-radius: 15px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--primary), #9c7cff 60%, #ff6a9b);
  box-shadow: 0 12px 28px rgba(109, 74, 255, .28);
}
.brand-mark svg { width: 27px; height: 27px; stroke-width: 2.3; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 1.28rem; font-weight: 900; letter-spacing: -.035em; }
.brand-copy small { color: var(--muted); font-weight: 600; font-size: .69rem; letter-spacing: .07em; margin-top: 4px; }
.desktop-nav { display: flex; align-items: center; gap: 30px; color: var(--muted); font-size: .95rem; font-weight: 600; }
.desktop-nav a { position: relative; transition: color .2s ease; }
.desktop-nav a::after { content: ""; position: absolute; inset-inline: 50%; bottom: -8px; height: 2px; border-radius: 99px; background: var(--primary); transition: inset-inline .2s ease; }
.desktop-nav a:hover { color: var(--text); }
.desktop-nav a:hover::after { inset-inline: 5%; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
.icon-button:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.icon-button svg { width: 20px; height: 20px; }
.moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }
.header-cta { padding: 11px 19px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 800; font-size: .92rem; transition: transform .2s ease, opacity .2s ease; }
.header-cta:hover { transform: translateY(-2px); opacity: .88; }

.hero { position: relative; padding: 84px 0 118px; min-height: 700px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; width: 680px; height: 680px; right: 55%; top: -250px; z-index: -1;
  background: radial-gradient(circle, rgba(109,74,255,.13), transparent 67%); border-radius: 50%;
}
.hero-grid { display: grid; grid-template-columns: .87fr 1.13fr; gap: 70px; align-items: center; }
.hero-copy { padding-inline-start: 6px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line)); border-radius: 99px; background: color-mix(in srgb, var(--surface-solid) 76%, transparent); color: var(--primary-dark); font-size: .82rem; font-weight: 800; }
.eyebrow.soft { background: var(--primary-soft); border-color: transparent; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(22,166,119,.1); }
.hero h1 { margin: 22px 0 20px; font-size: clamp(3.2rem, 6vw, 6.1rem); line-height: .98; letter-spacing: -.075em; font-weight: 900; }
.hero h1 span { color: var(--primary); position: relative; }
.hero h1 span::after { content: ""; position: absolute; right: 3px; left: 4px; height: 10px; bottom: 2px; z-index: -1; border-radius: 99px; background: rgba(255,91,131,.18); transform: rotate(-1.5deg); }
.hero-lead { max-width: 530px; margin: 0; color: var(--muted); font-size: 1.12rem; line-height: 1.9; }
.trust-line { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.trust-line span { display: inline-flex; align-items: center; gap: 6px; }
.trust-line svg { width: 17px; height: 17px; color: var(--success); stroke-width: 2.4; }

.downloader-shell { position: relative; }
.shell-glow { position: absolute; inset: 9% 5% -5%; z-index: -1; background: linear-gradient(145deg, rgba(109,74,255,.34), rgba(255,91,131,.18)); filter: blur(52px); border-radius: 45px; }
.downloader-card { position: relative; padding: 30px; border: 1px solid rgba(255,255,255,.45); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface-solid) 91%, transparent); box-shadow: var(--shadow-lg); backdrop-filter: blur(24px); overflow: hidden; }
.downloader-card::before { content: ""; position: absolute; width: 210px; height: 210px; top: -125px; left: -80px; border-radius: 50%; background: rgba(109,74,255,.1); filter: blur(6px); pointer-events: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.mini-label { color: var(--primary); font-size: .72rem; font-weight: 900; letter-spacing: .03em; }
.card-head h2 { margin: 5px 0 0; font-size: 1.32rem; line-height: 1.35; letter-spacing: -.025em; }
.engine-status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 99px; background: var(--surface-soft); color: var(--muted); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.engine-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 4px rgba(227,151,34,.1); }
.engine-status.online i { background: var(--success); box-shadow: 0 0 0 4px rgba(22,166,119,.1); }
.engine-status.demo i { background: var(--primary); box-shadow: 0 0 0 4px rgba(109,74,255,.1); }
.url-field { height: 62px; display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface-soft); padding: 0 12px 0 8px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.url-field:focus-within { border-color: var(--primary); background: var(--surface-solid); box-shadow: 0 0 0 5px rgba(109,74,255,.09); }
.url-field.invalid { border-color: #e54862; box-shadow: 0 0 0 5px rgba(229,72,98,.08); }
.link-icon { color: var(--primary); width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto; }
.link-icon svg { width: 21px; height: 21px; }
.url-field input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); direction: ltr; text-align: right; font-size: .94rem; }
.url-field input::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); direction: rtl; }
.paste-button { border: 0; border-radius: 11px; background: var(--surface-solid); color: var(--primary); padding: 8px 12px; font-size: .78rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 15px rgba(30,20,60,.06); }
.field-meta { min-height: 29px; display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 0; color: var(--muted); }
.field-meta small { font-size: .72rem; }
.detected-platform { color: var(--primary); font-size: .72rem; font-weight: 800; }
.analyze-button { width: 100%; height: 58px; margin-top: 8px; border: 0; border-radius: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; background: linear-gradient(135deg, var(--primary-dark), var(--primary) 58%, #8b68ff); box-shadow: 0 15px 28px rgba(109,74,255,.27); font-weight: 900; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.analyze-button:hover { transform: translateY(-2px); box-shadow: 0 19px 34px rgba(109,74,255,.33); filter: saturate(1.08); }
.analyze-button:disabled { opacity: .72; cursor: wait; transform: none; }
.analyze-button svg { width: 20px; height: 20px; }
.button-loader { width: 20px; height: 20px; display: none; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.analyze-button.loading .button-loader { display: block; }
.analyze-button.loading svg { display: none; }
.supported-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 20px; color: var(--muted); font-size: .72rem; }
.supported-row > span { margin-inline-end: 2px; font-weight: 700; }
.platform-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 99px; background: color-mix(in srgb, var(--surface-solid) 82%, transparent); color: var(--muted); font-weight: 700; }
.platform-pill b { font-size: .9rem; line-height: 1; }
.platform-pill.instagram b { color: #d93781; }
.platform-pill.tiktok b { color: var(--text); }
.platform-pill.facebook b { color: #1877f2; font-family: Arial; }
.platform-pill.youtube b { color: #ff0033; font-family: Arial; }
.notice-box { display: flex; gap: 9px; margin-top: 18px; padding: 12px 13px; border-radius: 14px; background: color-mix(in srgb, var(--surface-soft) 86%, transparent); color: var(--muted); }
.notice-box svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; color: var(--primary); }
.notice-box p { margin: 0; font-size: .7rem; line-height: 1.65; }

.result-panel { margin-top: 21px; padding-top: 21px; border-top: 1px solid var(--line); animation: panelIn .35s ease both; }
.result-top { display: grid; grid-template-columns: 132px 1fr; gap: 15px; align-items: center; }
.video-thumb { position: relative; height: 84px; border-radius: 15px; overflow: hidden; background: linear-gradient(135deg, #3b2d78, #8b5cff 60%, #f45c8d); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: none; }
.video-thumb.has-image img { display: block; }
.video-thumb.has-image .thumb-fallback { display: none; }
.thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.thumb-fallback svg { width: 33px; height: 33px; fill: rgba(255,255,255,.14); }
.duration { position: absolute; bottom: 6px; left: 6px; z-index: 2; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.72); color: #fff; font-size: .64rem; direction: ltr; }
.video-info { min-width: 0; }
.result-badge { display: inline-flex; margin-bottom: 5px; padding: 3px 8px; border-radius: 99px; color: var(--primary); background: var(--primary-soft); font-size: .64rem; font-weight: 900; }
.video-info h3 { margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.video-info p { margin: 4px 0 0; color: var(--muted); font-size: .77rem; }
.quality-title { display: flex; justify-content: space-between; gap: 10px; margin: 20px 0 10px; }
.quality-title span { font-size: .82rem; font-weight: 900; }
.quality-title small { color: var(--muted); font-size: .66rem; }
.quality-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.quality-option { position: relative; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); color: var(--text); cursor: pointer; text-align: right; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.quality-option:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); background: var(--surface-solid); }
.quality-option strong { display: block; font-size: .8rem; }
.quality-option small { display: block; margin-top: 2px; color: var(--muted); font-size: .64rem; direction: ltr; }
.quality-option svg { width: 19px; height: 19px; color: var(--primary); flex: 0 0 auto; }
.new-link-button { width: 100%; margin-top: 11px; border: 0; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 800; cursor: pointer; }

.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 62px; background: var(--surface-solid); clip-path: polygon(0 65%, 14% 44%, 30% 68%, 48% 35%, 66% 60%, 82% 39%, 100% 58%, 100% 100%, 0 100%); opacity: .55; }
.logo-strip { position: relative; background: color-mix(in srgb, var(--surface-solid) 76%, transparent); border-block: 1px solid var(--line); }
.logo-strip .container { min-height: 120px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.logo-strip p { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 700; }
.brand-marquee { display: flex; align-items: center; justify-content: flex-end; gap: 35px; color: var(--text); font-weight: 800; }
.brand-marquee span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-marquee i { width: 9px; height: 9px; border-radius: 50%; }
.ig-dot { background: linear-gradient(135deg, #f99b4a, #d23286, #6855d9); }
.tt-dot { background: #111; box-shadow: 3px 0 #2dd4d8, -3px 0 #f44f7b; }
[data-theme="dark"] .tt-dot { background: #fff; }
.fb-dot { background: #1877f2; }
.yt-dot { background: #ff0033; box-shadow: 0 0 0 3px rgba(255,0,51,.12); }
.brand-marquee .muted { color: var(--muted); font-weight: 600; }
.brand-marquee .muted i { border: 1px dashed var(--muted); background: transparent; }

.section { padding: 110px 0; }
.section-heading { max-width: 650px; margin: 0 auto 55px; text-align: center; }
.section-heading.align-start { margin: 0; text-align: right; }
.section-heading h2, .feature-copy h2 { margin: 17px 0 12px; font-size: clamp(2rem, 3.5vw, 3.2rem); line-height: 1.2; letter-spacing: -.045em; }
.section-heading p, .feature-copy > p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.85; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { position: relative; min-height: 280px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.step-card:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--primary) 28%, var(--line)); box-shadow: 0 20px 50px rgba(50,35,97,.12); }
.step-card.featured { background: linear-gradient(145deg, var(--primary-dark), var(--primary)); color: #fff; border-color: transparent; box-shadow: 0 25px 60px rgba(109,74,255,.25); }
.step-card.featured::after { content: ""; position: absolute; width: 180px; height: 180px; left: -70px; bottom: -90px; border-radius: 50%; background: rgba(255,255,255,.09); }
.step-number { position: absolute; left: 22px; top: 18px; font-size: 2.8rem; font-weight: 900; color: color-mix(in srgb, var(--muted) 18%, transparent); line-height: 1; }
.featured .step-number { color: rgba(255,255,255,.15); }
.step-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 30px; border-radius: 17px; color: var(--primary); background: var(--primary-soft); }
.featured .step-icon { color: #fff; background: rgba(255,255,255,.14); }
.step-icon svg { width: 25px; height: 25px; }
.step-card h3 { margin: 0 0 9px; font-size: 1.25rem; }
.step-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.8; }
.featured p { color: rgba(255,255,255,.75); }

.features-section { position: relative; background: color-mix(in srgb, var(--surface-soft) 55%, transparent); overflow: hidden; }
.features-section::after { content: ""; position: absolute; width: 440px; height: 440px; border: 1px solid var(--line); border-radius: 50%; left: -180px; top: 40px; }
.feature-layout { display: grid; grid-template-columns: 1fr .9fr; gap: 85px; align-items: center; }
.feature-copy > p { max-width: 590px; }
.feature-list { display: grid; gap: 18px; margin-top: 32px; }
.feature-list > div { display: flex; gap: 13px; align-items: flex-start; }
.feature-list > div > span { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--success); background: rgba(22,166,119,.1); }
.feature-list svg { width: 17px; height: 17px; stroke-width: 2.4; }
.feature-list p { margin: 0; display: grid; }
.feature-list strong { font-size: .94rem; }
.feature-list small { margin-top: 2px; color: var(--muted); font-size: .79rem; }
.privacy-visual { position: relative; min-height: 390px; display: grid; place-items: center; isolation: isolate; }
.orbit { position: absolute; border: 1px dashed color-mix(in srgb, var(--primary) 35%, transparent); border-radius: 50%; animation: rotate 22s linear infinite; }
.orbit-a { width: 340px; height: 340px; }
.orbit-b { width: 260px; height: 260px; animation-direction: reverse; animation-duration: 18s; }
.shield-card { position: relative; z-index: 2; width: 235px; height: 230px; display: grid; place-items: center; align-content: center; padding: 24px; text-align: center; border: 1px solid rgba(255,255,255,.5); border-radius: 40px; background: color-mix(in srgb, var(--surface-solid) 92%, transparent); box-shadow: var(--shadow-lg); backdrop-filter: blur(20px); }
.shield-icon { width: 78px; height: 78px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 27px; color: #fff; background: linear-gradient(145deg, var(--primary), #9275ff); box-shadow: 0 18px 35px rgba(109,74,255,.28); }
.shield-icon svg { width: 38px; height: 38px; stroke-width: 2; }
.shield-card strong { font-size: 1.17rem; }
.shield-card span { margin-top: 5px; color: var(--muted); font-size: .75rem; }
.floating-chip { position: absolute; z-index: 3; padding: 9px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); box-shadow: var(--shadow-sm); color: var(--muted); font-size: .72rem; font-weight: 800; animation: float 4s ease-in-out infinite; }
.chip-one { top: 60px; right: 20px; }
.chip-two { left: 5px; top: 160px; animation-delay: -1.2s; }
.chip-three { right: 5px; bottom: 55px; animation-delay: -2.3s; }

.faq-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 85px; align-items: start; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 22px rgba(40,25,75,.04); overflow: hidden; }
.faq-list summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; font-weight: 800; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-size: 1.1rem; line-height: 1; transition: transform .2s ease; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { margin: -2px 22px 20px; color: var(--muted); font-size: .87rem; line-height: 1.8; }

.final-cta { padding: 20px 0 100px; }
.cta-card { min-height: 200px; display: flex; align-items: center; justify-content: space-between; gap: 35px; padding: 45px 55px; border-radius: 30px; color: #fff; background: radial-gradient(circle at 15% 10%, rgba(255,255,255,.16), transparent 30%), linear-gradient(135deg, #4e2ed9, #7553ff 55%, #a457e2); box-shadow: 0 28px 70px rgba(81,48,218,.27); overflow: hidden; position: relative; }
.cta-card::after { content: ""; position: absolute; width: 260px; height: 260px; left: -60px; bottom: -160px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.cta-card span { color: rgba(255,255,255,.75); font-weight: 700; }
.cta-card h2 { margin: 5px 0 0; font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.25; }
.cta-card a { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 9px; padding: 14px 20px; border-radius: 15px; background: #fff; color: #4e2ed9; font-weight: 900; white-space: nowrap; transition: transform .2s ease; }
.cta-card a:hover { transform: translateY(-3px); }
.cta-card a svg { width: 19px; height: 19px; }

footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 72%, transparent); }
.footer-grid { min-height: 170px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 35px; padding-block: 35px; }
.footer-brand p { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.footer-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.footer-links button { border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; }
.footer-links a:hover, .footer-links button:hover { color: var(--primary); }
.copyright { grid-column: 1 / -1; margin: -20px 0 0; color: color-mix(in srgb, var(--muted) 78%, transparent); font-size: .7rem; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; max-width: min(440px, calc(100% - 32px)); transform: translate(-50%, 30px); padding: 12px 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; font-size: .82rem; font-weight: 700; transition: opacity .22s ease, transform .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #c93852; color: #fff; }

.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,8,17,.62); backdrop-filter: blur(7px); }
.modal-card { position: relative; z-index: 1; width: min(670px, 100%); max-height: min(78vh, 720px); overflow: auto; padding: 34px; border: 1px solid var(--line); border-radius: 25px; background: var(--surface-solid); box-shadow: var(--shadow-lg); }
.modal-card h2 { margin: 0 0 18px; font-size: 1.8rem; }
.modal-card h3 { margin: 24px 0 7px; font-size: 1rem; }
.modal-card p { color: var(--muted); font-size: .85rem; line-height: 1.9; }
.modal-close { position: absolute; top: 16px; left: 16px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--surface-soft); color: var(--text); font-size: 1.4rem; cursor: pointer; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .hero { padding-top: 55px; }
  .hero-grid { grid-template-columns: 1fr; gap: 52px; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .trust-line { justify-content: center; }
  .downloader-shell { width: min(680px, 100%); margin-inline: auto; }
  .logo-strip .container { flex-direction: column; justify-content: center; padding-block: 28px; }
  .brand-marquee { justify-content: center; flex-wrap: wrap; gap: 20px 28px; }
  .feature-layout, .faq-layout { grid-template-columns: 1fr; gap: 60px; }
  .feature-copy { text-align: center; }
  .feature-copy > p { margin-inline: auto; }
  .feature-list { width: min(600px,100%); margin-inline: auto; text-align: right; }
  .faq-layout .section-heading { text-align: center; margin-inline: auto; }
}

@media (max-width: 720px) {
  :root { --container: min(100% - 26px, 1180px); }
  .nav-wrap { height: 70px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
  .brand-copy strong { font-size: 1.1rem; }
  .header-cta { display: none; }
  .hero { padding: 46px 0 95px; }
  .hero h1 { font-size: clamp(3.15rem, 16vw, 4.7rem); }
  .hero-lead { font-size: 1rem; }
  .downloader-card { padding: 21px; border-radius: 25px; }
  .card-head { align-items: center; }
  .card-head h2 { font-size: 1.12rem; }
  .engine-status { padding: 6px 8px; }
  .engine-status span { display: none; }
  .url-field { height: 58px; }
  .url-field input { font-size: .82rem; }
  .paste-button { padding: 7px 10px; }
  .supported-row { justify-content: center; }
  .result-top { grid-template-columns: 110px 1fr; }
  .video-thumb { height: 75px; }
  .quality-grid { grid-template-columns: 1fr; }
  .logo-strip p { text-align: center; }
  .brand-marquee { gap: 13px 20px; font-size: .82rem; }
  .brand-marquee .muted { width: 100%; justify-content: center; }
  .section { padding: 82px 0; }
  .section-heading { margin-bottom: 38px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 235px; }
  .privacy-visual { min-height: 350px; transform: scale(.9); }
  .cta-card { flex-direction: column; align-items: flex-start; padding: 34px 27px; }
  .cta-card a { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .copyright { grid-column: auto; margin: 0; }
}

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

/* Download progress component */
.download-progress {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface-solid));
  animation: panelIn .3s ease both;
}
.progress-head,
.progress-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.progress-head > div { display: grid; gap: 2px; }
.progress-head strong { font-size: .88rem; color: var(--text); }
.progress-head small,
.progress-actions span { color: var(--muted); font-size: .72rem; }
.progress-head > span { color: var(--primary); font-size: .9rem; font-weight: 900; direction: ltr; }
.progress-track {
  height: 9px;
  margin: 13px 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 11%, var(--surface-soft));
  overflow: hidden;
}
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #8c62ff, #ef78c4);
  box-shadow: 0 0 18px rgba(109,74,255,.25);
  transition: width .35s ease;
}
.progress-actions button {
  border: 0;
  padding: 6px 10px;
  border-radius: 9px;
  color: #c93852;
  background: rgba(201,56,82,.09);
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}
.progress-actions button:hover { background: rgba(201,56,82,.15); }
.quality-option[disabled] { cursor: wait; opacity: .52; }
.engine-status.partial i { background: var(--warning); box-shadow: 0 0 0 4px rgba(227,151,34,.1); }
@media (max-width: 600px) {
  .progress-actions { align-items: flex-start; }
  .progress-actions span { max-width: 75%; }
}

/* v0.6.0 — TikTok priority engine and clean-only download policy */
.privacy-promise {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--success) 28%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--success) 7%, var(--surface));
  box-shadow: 0 10px 25px rgba(18, 126, 89, .06);
}
.privacy-promise > span:last-child { display: grid; gap: 2px; }
.privacy-promise strong { color: var(--text); font-size: .8rem; }
.privacy-promise small { color: var(--muted); font-size: .7rem; line-height: 1.45; }
.privacy-shield {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, var(--surface-solid));
}
.privacy-shield svg { width: 19px; height: 19px; stroke-width: 2; }
.field-actions { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.clear-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.clear-button:hover { color: var(--text); background: var(--surface-solid); }
.clear-button[hidden] { display: none; }

@media (max-width: 980px) {
  .privacy-promise { margin-inline: auto; text-align: right; }
}

@media (max-width: 720px) {
  .privacy-promise { width: 100%; align-items: flex-start; }
  .privacy-promise small { font-size: .66rem; }
  .field-actions { gap: 3px; }
  .clear-button { width: 28px; height: 28px; }
}


/* TikTok clean-source indicators */
.platform-pill.tiktok.clean { border-color: color-mix(in srgb, var(--success) 32%, var(--line)); }
.platform-pill.tiktok.clean em {
  padding: 2px 5px;
  border-radius: 99px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 9%, var(--surface-solid));
  font-size: .55rem;
  font-style: normal;
  font-weight: 900;
}
.result-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 5px; }
.result-badges .result-badge { margin-bottom: 0; }
.clean-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--success) 27%, transparent);
  border-radius: 99px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 9%, var(--surface-solid));
  font-size: .61rem;
  font-weight: 900;
}
.clean-badge[hidden] { display: none; }
