:root {
  --ink: #0c0e14;
  --panel: #141824;
  --panel-2: #1a1f30;
  --line: #262c40;
  --text: #edebe4;
  --muted: #8a8fa3;
  --coral: #ff6e5e;
  --violet: #8b6cff;
  --mint: #4ade9c;
  --danger: #ff5e7a;
  --radius: 14px;
  --dusk: linear-gradient(100deg, var(--coral), var(--violet));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  min-height: 100vh;
  background-image:
    radial-gradient(900px 420px at 85% -10%, rgba(139,108,255,.10), transparent 60%),
    radial-gradient(700px 380px at 8% -6%, rgba(255,110,94,.08), transparent 60%);
}
.wrap { max-width: 760px; margin: 0 auto; padding: 30px 20px 90px; }

/* ---------- header / nav ---------- */
.topnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 34px; flex-wrap: wrap; }
.brand { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 22px; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand .dot { background: var(--dusk); -webkit-background-clip: text; background-clip: text; color: transparent; }
.navlinks { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.navlinks a, .navlinks button {
  color: var(--muted); text-decoration: none; font: 500 13.5px "Inter Tight", sans-serif;
  padding: 7px 11px; border-radius: 8px; border: 0; background: transparent; cursor: pointer;
}
.navlinks a:hover, .navlinks button:hover { color: var(--text); background: var(--panel-2); }
.navlinks .pro-badge { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .06em; border: 1px solid var(--line); }
body.pro .navlinks .pro-badge { color: var(--mint); border-color: rgba(74,222,156,.4); }
.langs { display: flex; gap: 2px; }
.langs a { padding: 7px 8px; font-family: "JetBrains Mono", monospace; font-size: 11.5px; text-transform: uppercase; }
.langs a[aria-current="true"] { color: var(--text); background: var(--panel-2); }

h1 { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: clamp(22px, 4.6vw, 32px); line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 10px; }
.tagline { color: var(--muted); margin-bottom: 26px; max-width: 56ch; }

/* ---------- tabs ---------- */
.modes { display: flex; gap: 6px; margin-bottom: 12px; }
.modes button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: 600 13px "Inter Tight", sans-serif; padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.modes button[aria-selected="true"] { color: var(--text); background: var(--panel-2); border-color: #3a4260; }
.modes .lock { font-size: 11px; opacity: .8; }

/* ---------- paste bar ---------- */
.pastebar { position: relative; border-radius: var(--radius); padding: 2px; background: var(--line); }
.pastebar.busy { background: var(--dusk); background-size: 220% 220%; animation: sweep 1.6s linear infinite; }
@keyframes sweep { 0% { background-position: 0% 50%; } 100% { background-position: 220% 50%; } }
@media (prefers-reduced-motion: reduce) { .pastebar.busy { animation: none; } }
.pastebar-inner {
  display: flex; gap: 10px; align-items: center;
  background: var(--panel); border-radius: calc(var(--radius) - 2px); padding: 10px 10px 10px 18px;
}
.pastebar input, .pastebar textarea {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text);
  font: 500 15.5px/1.5 "Inter Tight", sans-serif; resize: vertical;
}
.pastebar input::placeholder, .pastebar textarea::placeholder { color: #565c72; }
.pastebar textarea { min-height: 96px; padding-top: 4px; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; cursor: pointer;
  font: 600 14px/1 "Inter Tight", sans-serif; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 16px; display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .15s, background .15s, transform .05s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #3a4260; background: #202641; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--dusk); border: 0; color: #12060c; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }
.btn .sub { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); font-weight: 600; }
.btn.primary .sub { color: rgba(0,0,0,.55); }

.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.error {
  margin-top: 14px; padding: 12px 16px; border: 1px solid rgba(255,94,122,.4);
  border-radius: 10px; background: rgba(255,94,122,.08); color: #ffb9c6; font-size: 14px; display: none;
}
.error.show { display: block; }

/* ---------- ad slots ---------- */
/* Reserve the exact banner height so loading an ad never shifts content
   (layout shift is a Core Web Vitals penalty — matters for our SEO).
   Desktop slot = 300x250 unit, mobile slot = 320x50 unit. */
.ad-slot {
  margin: 22px 0;
  min-height: 250px;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 560px) {
  .ad-slot { min-height: 50px; }
}
.ad-slot:empty {
  border: 1px dashed var(--line); border-radius: 10px; position: relative;
}
.ad-slot:empty::after {
  content: "ad slot — paste your network tag in the HTML, or leave empty (Pro hides this)";
  font: 500 12px "JetBrains Mono", monospace; color: #464c62;
}
body.pro .ad-slot { display: none; }

/* ---------- result card ---------- */
.card { margin-top: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: none; }
.card.show { display: block; }
.card-head { display: flex; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); }
.cover { width: 96px; height: 128px; flex: none; border-radius: 8px; object-fit: cover; background: var(--panel-2); }
.meta { min-width: 0; }
.kind {
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink); background: var(--mint);
  display: inline-block; padding: 3px 8px; border-radius: 5px; margin-bottom: 8px;
}
.kind.video { background: var(--coral); }
.title { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.byline { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); }

.section { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section h3 {
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* contact-sheet slide grid */
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.frame { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-2); aspect-ratio: 3/4; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame .num {
  position: absolute; top: 6px; left: 6px; font-family: "JetBrains Mono", monospace;
  font-size: 10px; font-weight: 600; background: rgba(12,14,20,.75); color: var(--text);
  padding: 2px 6px; border-radius: 4px;
}
.frame button {
  position: absolute; right: 6px; bottom: 6px; border: 0; cursor: pointer;
  background: rgba(12,14,20,.8); color: var(--text); border-radius: 6px; padding: 5px 8px;
  font: 600 11px "JetBrains Mono", monospace;
}
.frame button:hover { background: var(--violet); }

/* export controls */
.export-opts { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-bottom: 14px; color: var(--muted); font-size: 13.5px; }
.export-opts label { display: flex; align-items: center; gap: 8px; }
.export-opts select, .export-opts input[type="range"], .export-opts input[type="checkbox"] { accent-color: var(--violet); }
.export-opts select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: 500 13.5px "Inter Tight", sans-serif; }
.secs-val { font-family: "JetBrains Mono", monospace; color: var(--text); }

.progress { margin-top: 14px; display: none; }
.progress.show { display: block; }
.bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.bar > div { height: 100%; width: 0%; background: var(--dusk); transition: width .2s; }
.plog { margin-top: 8px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); min-height: 1.4em; word-break: break-all; }

/* ---------- batch ---------- */
.batch-list { margin-top: 20px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.batch-list .batch-item { min-width: 0; max-width: 100%; overflow: hidden; }
.batch-list .btitle, .batch-list .bsub { overflow-wrap: anywhere; }
.batch-item {
  display: flex; gap: 12px; align-items: center; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.batch-item img { width: 44px; height: 58px; border-radius: 6px; object-fit: cover; background: var(--panel-2); flex: none; }
.batch-item .bmeta { min-width: 0; flex: 1; }
.batch-item .btitle { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-item .bsub { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); margin-top: 2px; }
.batch-item .brow { display: flex; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.batch-item.err { border-color: rgba(255,94,122,.4); }

/* ---------- history ---------- */
.history-list { margin-top: 20px; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
/* belt & suspenders against min-content blowout: grid items and their text can
   never force the row wider than the container, at any viewport */
.history-list .batch-item { min-width: 0; max-width: 100%; overflow: hidden; }
.history-list .btitle, .history-list .bsub { overflow-wrap: anywhere; }

/* ---------- pro panel ---------- */
.propanel {
  margin-top: 26px; border-radius: var(--radius); padding: 2px; background: var(--dusk); display: none;
}
.propanel.show { display: block; }
.propanel-inner { background: var(--panel); border-radius: calc(var(--radius) - 2px); padding: 22px; }
.propanel h2 { font-family: "Unbounded", sans-serif; font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.propanel ul { list-style: none; margin: 12px 0 18px; display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.propanel li::before { content: "✓ "; color: var(--mint); font-weight: 700; }
.keyrow { display: flex; gap: 10px; flex-wrap: wrap; }
.keyrow input {
  flex: 1; min-width: 200px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 14px; color: var(--text);
  font: 600 13.5px "JetBrains Mono", monospace; outline: 0;
}
.keyrow input:focus { border-color: var(--violet); }
.pronote { color: var(--muted); font-size: 12.5px; margin-top: 12px; }

/* ---------- SEO copy sections ---------- */
.copy { margin-top: 60px; }
.copy h2 { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 19px; margin: 42px 0 14px; }
.copy p { color: var(--muted); margin-bottom: 12px; max-width: 66ch; }
.copy strong { color: var(--text); font-weight: 600; }
.steps { display: grid; gap: 12px; margin: 18px 0; }
.step { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.step .n { font-family: "JetBrains Mono", monospace; font-weight: 600; color: var(--coral); flex: none; }
.step div { color: var(--muted); font-size: 14.5px; }
.step b { color: var(--text); font-weight: 600; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-family: "JetBrains Mono", monospace; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 16px 14px; color: var(--muted); font-size: 14.5px; max-width: none; }

footer { margin-top: 60px; color: #565c72; font-size: 12.5px; line-height: 1.8; border-top: 1px solid var(--line); padding-top: 22px; }
footer a { color: var(--muted); }
footer nav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }

@media (max-width: 560px) {
  .pastebar-inner { flex-direction: column; align-items: stretch; padding: 12px; }
  .row .btn { flex: 1 1 auto; justify-content: center; }
  .batch-item { flex-wrap: wrap; }
}

/* ---------- adblock notice ----------
   Slim, dismissible bottom bar. Deliberately NOT a modal or overlay:
   intrusive interstitials are a Google ranking penalty, and a hard ad-wall
   would contradict our own comparison content. Never shown to pro users. */
.ab-notice {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--panel); border-top: 1px solid var(--line);
  transform: translateY(100%); transition: transform .25s ease;
}
.ab-notice.in { transform: translateY(0); }
.ab-inner {
  max-width: 760px; margin: 0 auto; padding: 13px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.ab-copy { flex: 1; min-width: 220px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.ab-copy b { color: var(--text); font-weight: 600; }
.ab-btns { display: flex; gap: 8px; align-items: center; }
.ab-cta {
  background: var(--dusk); color: #12060c; text-decoration: none;
  font: 600 13px "Inter Tight", sans-serif; padding: 8px 14px; border-radius: 9px;
  white-space: nowrap;
}
.ab-x {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font: 500 13px "Inter Tight", sans-serif; padding: 8px 12px; border-radius: 9px; cursor: pointer;
}
.ab-x:hover { color: var(--text); border-color: #3a4260; }
body.pro .ab-notice { display: none; }
@media (max-width: 560px) {
  .ab-inner { padding: 11px 16px; gap: 10px; }
  .ab-copy { font-size: 12.5px; }
}
