:root {
    --ink: #211a22;
    --muted: #77727d;
    --line: #eee1e9;
    --accent: #d73578;
    font-family: Inter, system-ui, sans-serif;
    color: var(--ink);
    background: #fff8fb;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 82% 0, #fce8f2 0, transparent 44%), #fffafd; }
.download-wrap { width: min(940px, calc(100% - 32px)); margin-inline: auto; }
.download-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Platform strip communicates supported sources before the input step. */
.platform-strip { margin: clamp(35px, 7vw, 72px) auto 20px; text-align: center; }
.platform-strip .tag { color: #ad316b; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.platform-strip h1 { max-width: 14ch; margin: 10px auto 12px; font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: .98; letter-spacing: -.065em; }
.platform-strip > p { max-width: 62ch; margin: 0 auto; color: var(--muted); line-height: 1.65; }
.platform-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-top: 24px; }
.platform-badge { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 14px; background: #ffffffd9; box-shadow: 0 9px 25px #50213a0a; }
.platform-badge i { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: var(--brand-bg, #f7eaf1); color: var(--brand, #a82c63); font-size: .78rem; font-style: normal; font-weight: 800; }
.platform-badge span { font-size: .68rem; font-weight: 750; }

/* Downloader work area. */
.download-box { margin: 0 auto 70px; padding: clamp(20px, 4vw, 34px); border: 1px solid var(--line); border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 20px 55px #51223a0d; }
.download-box h2 { margin: 0 0 8px; font-size: clamp(1.35rem, 3vw, 1.85rem); }
.download-box > p { color: var(--muted); line-height: 1.6; }
.download-row { display: flex; gap: 10px; margin: 24px 0; }
.download-row input { flex: 1; min-width: 0; min-height: 50px; border: 1px solid #eadfe7; border-radius: 11px; padding: 14px; font: 16px Inter, sans-serif; }
.download-row input:focus { outline: 3px solid #d7357830; border-color: var(--accent); }
.download-button { min-height: 50px; border: 0; border-radius: 11px; padding: 0 20px; background: linear-gradient(45deg, #f77737, #e1306c 52%, #833ab4); color: white; font: 700 13px Inter, sans-serif; cursor: pointer; }
.download-button:hover { filter: saturate(1.12); }
.download-status { color: #625b65; font-size: 13px; }
.download-loading { display: none; justify-items: center; gap: 8px; padding: 28px 10px; }
.download-loading.show { display: grid; animation: download-fade .3s; }
.download-loading strong { font-size: 14px; }
.download-loading small { color: var(--muted); font-size: 11px; }
.download-spinner { width: 36px; height: 36px; margin-bottom: 4px; border: 3px solid #f4dbe8; border-top-color: var(--accent); border-radius: 50%; animation: download-spin .8s linear infinite; }
.download-result { margin-top: 22px; text-align: center; animation: download-fade .45s; }
.download-result[hidden], .download-loading[hidden] { display: none; }
.download-result h2 { margin-bottom: 14px; font-size: 18px; }
.video-preview { display: block; width: min(100%, 480px); max-height: 560px; margin: 0 auto 14px; border-radius: 14px; background: #16131a; }
.download-links { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 20px auto 0; }
.download-link { display: flex; width: min(100%, 420px); min-height: 48px; align-items: center; justify-content: center; padding: 10px; border: 1px solid #f2dce7; border-radius: 9px; background: #fff1f7; color: #a72f68; font-size: 12px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.download-again { margin-top: 16px; }
.download-fine { margin-bottom: 0; font-size: 11px; }

@keyframes download-spin { to { transform: rotate(360deg); } }
@keyframes download-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
    .platform-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .download-wrap { width: calc(100% - 24px); }
    .platform-strip { margin-top: 30px; }
    .platform-strip h1 { font-size: clamp(2.3rem, 11vw, 3.2rem); }
    .platform-strip > p { font-size: .86rem; }
    .platform-badge { padding: 10px 5px; }
    .download-box { margin-bottom: 35px; padding: 20px 14px; border-radius: 18px; }
    .download-row { flex-direction: column; gap: 9px; margin: 18px 0; }
    .download-row .download-button { width: 100%; }
    .video-preview { width: min(100%, 360px); max-height: min(60dvh, 520px); border-radius: 13px; }
    .download-links { align-items: stretch; gap: 10px; }
    .download-link { width: 100%; min-height: 50px; padding: 12px; font-size: 13px; }
    .download-fine { font-size: 12px; }
}

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

