:root {
  color-scheme: dark;
  --bg: #080c18;
  --panel: #11182a;
  --panel-2: #161e32;
  --text: #f7f8fc;
  --muted: #9ea8bd;
  --accent: #7c5cff;
  --accent-2: #d946ef;
  --green: #45e1a1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 8%, rgba(217, 70, 239, .18), transparent 28rem),
    radial-gradient(circle at 12% 25%, rgba(124, 92, 255, .14), transparent 24rem),
    var(--bg);
}

button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(100% - 32px, 720px); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 0 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 750; letter-spacing: -.4px; }
.brand strong { color: #a58eff; }
.logo { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 22px rgba(124, 92, 255, .3); }
.logo svg, .download svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero { padding: 68px 2px 32px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #b8c1d4; font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 15px var(--green); }
h1 { margin: 14px 0 16px; font-size: clamp(44px, 11vw, 72px); line-height: .97; letter-spacing: -.065em; }
h1 em { font-style: normal; color: transparent; background: linear-gradient(90deg, #a997ff, #ed64de); background-clip: text; -webkit-background-clip: text; }
.hero p { max-width: 520px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.card, .result { border: 1px solid rgba(255,255,255,.08); border-radius: 24px; background: linear-gradient(145deg, rgba(22,30,50,.94), rgba(14,20,35,.94)); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.card { padding: 22px; }
.card h2 { margin: 0 0 12px; font-size: 14px; color: #c8cfdd; }
.input-wrap { height: 58px; display: flex; align-items: center; gap: 11px; padding: 0 8px 0 16px; border: 1px solid rgba(255,255,255,.11); border-radius: 15px; background: #0b1120; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: #866cff; box-shadow: 0 0 0 3px rgba(124,92,255,.15); }
.input-wrap svg { width: 21px; flex: none; fill: none; stroke: #7f8aa2; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
input::placeholder { color: #68738a; }
.paste { padding: 9px 12px; border: 0; border-radius: 10px; color: #d4cfff; background: rgba(124,92,255,.14); cursor: pointer; }
.primary, .download { width: 100%; min-height: 56px; margin-top: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 15px; color: white; background: linear-gradient(100deg, #6749e9, #a43be2); box-shadow: 0 12px 28px rgba(111,65,224,.25); font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s, filter .15s; }
.primary:hover, .download:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary:disabled { opacity: .65; cursor: wait; transform: none; }
.primary svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.status { margin-top: 14px; padding: 12px 14px; border-radius: 12px; color: #ffb8c3; background: rgba(255,75,105,.09); font-size: 14px; line-height: 1.45; }
.status.loading { color: #d5d0ff; background: rgba(124,92,255,.1); }
.result { margin-top: 18px; padding: 18px; display: block; }
.result[hidden] { display: none; }
.result-head { margin-bottom: 14px; }
.success-pill { display: inline-block; padding: 6px 9px; border-radius: 999px; color: var(--green); background: rgba(69,225,161,.1); font-size: 12px; font-weight: 700; }
.result-head h2 { margin: 10px 0 0; overflow: hidden; display: -webkit-box; color: #e9ecf4; font-size: 15px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.media-item { min-width: 0; padding: 8px; border: 1px solid rgba(255,255,255,.07); border-radius: 17px; background: #0b1120; }
.media-frame { overflow: hidden; aspect-ratio: 4 / 5; border-radius: 12px; background: #05070e; }
.media-frame video, .media-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.download { width: auto; min-height: 48px; margin-top: 16px; padding: 0 14px; font-size: 14px; }
.media-item .download { margin-top: 8px; }
.download svg { width: 19px; }
.steps { margin: 38px 0; display: grid; gap: 10px; }
.steps article { display: flex; align-items: center; gap: 15px; padding: 14px; border-radius: 15px; background: rgba(255,255,255,.025); }
.steps b { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #c3b9ff; background: rgba(124,92,255,.13); }
.steps h3, .steps p { margin: 0; }
.steps h3 { font-size: 14px; }
.steps p { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
footer { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.07); text-align: center; color: #68738a; font-size: 11px; line-height: 1.5; }
footer p { margin: 4px; }

@media (max-width: 520px) {
  .shell { width: min(100% - 24px, 720px); }
  .hero { padding-top: 54px; }
  .card { padding: 16px; border-radius: 20px; }
  .result { padding: 12px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .download { font-size: 11px; padding: 0 8px; }
}

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