:root {
  --brand: #5b3df5;
  --brand-2: #8b5cf6;
  --brand-dark: #4327d4;
  --ink: #12131a;
  --muted: #646b7a;
  --line: #e6e8ef;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ok: #16a34a;
  --err: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(24, 20, 70, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hide-mobile { }
@media (max-width: 700px) { .hide-mobile { display: none !important; } }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { color: var(--ink); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.3rem; padding: 4px 10px; cursor: pointer; }
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
}

/* Hero */
.hero { background: radial-gradient(1200px 400px at 50% -100px, rgba(139, 92, 246, .35), transparent),
        linear-gradient(135deg, #5b3df5 0%, #7c3aed 55%, #9333ea 100%); color: #fff; padding: 56px 0 64px; }
.hero-inner { text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.9rem); line-height: 1.15; margin: 0 0 12px; font-weight: 800; letter-spacing: -.02em; }
.lead { font-size: clamp(1rem, 2.2vw, 1.15rem); opacity: .92; margin: 0 auto 28px; max-width: 680px; }
.grab { max-width: 760px; margin: 0 auto; }
.grab-box { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 16px; box-shadow: 0 18px 40px rgba(20, 10, 80, .25); }
.grab-box input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 1.02rem; padding: 12px 14px; color: var(--ink); }
.hint { font-size: .82rem; opacity: .8; margin: 12px 0 0; }
@media (max-width: 560px) {
  .grab-box { flex-wrap: wrap; }
  .grab-box input { flex-basis: 100%; }
  .grab-box .btn-ghost, .grab-box .btn-primary { flex: 1; }
}

/* Buttons */
.btn-primary, .btn-ghost, .btn-small { font: inherit; font-weight: 600; border: 0; border-radius: 11px; cursor: pointer; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 12px 26px; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: #f1efff; color: var(--brand-dark); padding: 12px 18px; }
.btn-small { padding: 8px 16px; font-size: .9rem; background: #f1efff; color: var(--brand-dark); }
.btn-small.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }

/* Status + results */
.results-wrap { margin-top: -28px; position: relative; }
.status { background: #fff; border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); margin-bottom: 16px; font-weight: 500; }
.status-error { border-left: 4px solid var(--err); color: #991b1b; }
.status-info { border-left: 4px solid var(--brand); }
.results-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.results-grid:has(.ad-result) { grid-template-columns: 1fr 300px; }
@media (max-width: 900px) { .results-grid:has(.ad-result) { grid-template-columns: 1fr; } }
.result { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.result-head { display: flex; gap: 18px; padding: 20px; border-bottom: 1px solid var(--line); }
.thumb { width: 220px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: #eee; flex-shrink: 0; }
.meta h2 { margin: 6px 0 4px; font-size: 1.2rem; line-height: 1.3; word-break: break-word; }
.badge { display: inline-block; background: #f1efff; color: var(--brand-dark); font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
@media (max-width: 640px) { .result-head { flex-direction: column; } .thumb { width: 100%; } }
.result-body { padding: 8px 20px 20px; }
.result-body h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.options { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.option { display: grid; grid-template-columns: 1fr 110px 130px; grid-template-areas: "label size action" "progress progress progress";
          align-items: center; gap: 4px 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.option:first-child { border-top: 0; }
.opt-label { grid-area: label; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt-size { grid-area: size; text-align: right; }
.opt-action { grid-area: action; text-align: right; }
.opt-progress { grid-area: progress; }
.ext { font-size: .72rem; font-weight: 700; background: var(--bg); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; color: var(--muted); }
@media (max-width: 520px) { .option { grid-template-columns: 1fr auto; grid-template-areas: "label action" "size size" "progress progress"; } .opt-size { text-align: left; } }
.progress { height: 8px; background: #eef0f6; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress .bar { height: 100%; width: 3%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .6s ease; }
.stage { font-size: .85rem; margin-top: 4px; }
.error-text { color: var(--err); }
.save-link { font-weight: 600; }
.playlist { margin: 0; padding: 0 0 0 22px; max-height: 520px; overflow: auto; }
.playlist li { padding: 8px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.pl-title { word-break: break-word; }

/* Content sections */
section h2 { font-size: 1.6rem; letter-spacing: -.01em; }
.features, .how, .sites, .faq-short { margin-top: 56px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature h3 { margin: 10px 0 6px; }
.feature p { margin: 0; color: var(--muted); }
.icon { font-size: 1.6rem; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { background: #fff; border-radius: var(--radius); padding: 22px 22px 22px 64px; box-shadow: var(--shadow); position: relative; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 50%;
                    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: #fff; border: 1px solid var(--line); padding: 8px 16px; border-radius: 99px; color: var(--ink); font-weight: 500; }
details { background: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 600; }
.page { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin: 32px auto; }
.page h1 { margin-top: 0; }

/* Notices and ads */
.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 12px 16px; border-radius: 12px; margin-top: 16px; }
.ad { display: flex; justify-content: center; margin: 16px auto; max-width: 100%; overflow: hidden; }
.ad-top_banner, .ad-footer_banner, .ad-below_form, .ad-in_content { max-width: 1080px; padding: 0 16px; }
.side-ad { position: fixed; right: 16px; top: 120px; width: 160px; z-index: 5; }
@media (max-width: 1440px) { .side-ad { display: none; } }
.wait-ad { margin: 16px auto; max-width: 1080px; }

/* Footer */
.footer { margin-top: 72px; background: #0f1020; color: #c9cbe0; padding: 36px 0 24px; }
.footer .muted { color: #8b8fae; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-inner p { max-width: 460px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: #c9cbe0; }
