:root {
  --bg: #0b0b0d;
  --bg-2: #101013;
  --surface: #141418;
  --surface-2: #1b1b20;
  --surface-3: #232329;
  --line: #26262d;
  --line-2: #33333b;
  --text: #ededf0;
  --text-2: #b4b4bd;
  --muted: #7d7d88;
  --accent: #c8f04d;
  --accent-2: #b3dc36;
  --accent-soft: rgba(200, 240, 77, .12);
  --on-accent: #0b0b0d;
  --accent-text: #c8f04d;
  --danger: #ff6b5e;
  --danger-soft: rgba(255, 107, 94, .12);
  --ok: #5ee3a1;
  --info: #7cb4ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 50px -20px rgba(0,0,0,.6);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f6f3;
  --bg-2: #efefeb;
  --surface: #ffffff;
  --surface-2: #f3f3ef;
  --surface-3: #e9e9e4;
  --line: #e2e2dc;
  --line-2: #d3d3cc;
  --text: #141416;
  --text-2: #45454c;
  --muted: #74747c;
  --accent: #b6e23a;
  --accent-2: #a3cf2b;
  --accent-soft: rgba(140, 190, 20, .14);
  --on-accent: #111;
  --accent-text: #4f7a00;
  --danger: #d9412f;
  --danger-soft: rgba(217, 65, 47, .1);
  --ok: #1f9d63;
  --info: #2f6fd6;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 30px -16px rgba(0,0,0,.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--on-accent); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }

.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1180px; margin: 0 auto; height: 60px;
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.02em; font-size: 16.5px; white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-left: 8px; flex: 1; }
.nav a {
  padding: 7px 11px; border-radius: 9px; color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.on { color: var(--text); background: var(--surface-3); }
.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--text-2);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
:root[data-theme="dark"] .i-sun, :root[data-theme="light"] .i-moon { display: none; }
.acct {
  height: 36px; padding: 0 14px; display: flex; align-items: center; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.acct.in { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.menu-btn { display: none; }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px 80px; }
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 22px 20px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); }
.foot-in a { margin-left: auto; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }

.hero { padding: 64px 0 28px; max-width: 820px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.02; letter-spacing: -.045em; margin: 0 0 14px; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero p { color: var(--text-2); font-size: 17px; margin: 0 auto; max-width: 560px; }
.page-head { padding: 44px 0 22px; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.035em; margin: 0 0 6px; line-height: 1.1; }
.page-head p { margin: 0; color: var(--text-2); max-width: 640px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pad { padding: 20px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.label { font-size: 12.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }

.grab { max-width: 820px; margin: 0 auto; }
.urlbox {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.urlbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.urlbox input {
  flex: 1; min-width: 0; height: 46px; background: none; border: 0; outline: 0; font-size: 16.5px;
}
.urlbox input::placeholder { color: var(--muted); }
.fixnote { min-height: 22px; margin: 10px 4px 0; font-size: 13px; color: var(--ok); display: flex; gap: 6px; flex-wrap: wrap; }
.fixnote span { background: color-mix(in srgb, var(--ok) 12%, transparent); padding: 1px 8px; border-radius: 99px; }
.fixnote.err { color: var(--danger); }

.btn {
  height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2);
  font-weight: 600; font-size: 14.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, border-color .15s, transform .06s; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { background: var(--accent-2); }
.btn.big { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn.ghost { background: transparent; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.linkish { background: none; border: 0; padding: 0; color: var(--text-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); font-size: 13.5px; }

.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; gap: 2px; }
.seg button {
  border: 0; background: transparent; height: 34px; padding: 0 16px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 7px;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
:root[data-theme="light"] .seg button.on { background: #fff; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; font-weight: 550; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .12s, color .12s, background .12s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.chip:disabled { opacity: .35; cursor: not-allowed; }
.chip small { font-size: 11px; color: var(--muted); font-weight: 500; font-family: var(--mono); }
.chip .tag { font-size: 10px; padding: 1px 5px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-weight: 600; }

.options { display: grid; gap: 18px; margin-top: 22px; }
.opt-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.opt-row > .label { margin: 9px 0 0; }

.media {
  display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 14px; margin-top: 18px;
}
.thumb { aspect-ratio: 16/9; border-radius: 10px; background: var(--surface-3) center/cover no-repeat; position: relative; overflow: hidden; }
.thumb .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.78); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 5px; font-family: var(--mono); }
.media h3 { margin: 2px 0 4px; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.media .meta { font-size: 13.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.skel { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }

.progress { margin-top: 16px; }
.bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .25s ease; }
.bar.indet > i { width: 30% !important; animation: indet 1.1s infinite ease-in-out; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.progress-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); margin-top: 8px; font-variant-numeric: tabular-nums; }
.progress-meta .mono { color: var(--muted); }

.done-box { display: flex; align-items: center; gap: 14px; padding: 14px; margin-top: 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.done-box .grow b { display: block; overflow-wrap: anywhere; font-size: 14.5px; }
.done-box .grow span { font-size: 13px; color: var(--text-2); }
.err-box { padding: 12px 14px; margin-top: 16px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }

.playlist { margin-top: 18px; }
.pl-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pl-list { max-height: 520px; overflow: auto; }
.pl-item { display: grid; grid-template-columns: 22px 28px 96px 1fr auto; gap: 12px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.pl-item:last-child { border-bottom: 0; }
.pl-item .num { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
.pl-item .t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-item .thumb { aspect-ratio: 16/9; width: 96px; border-radius: 6px; }
.pl-item .st { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.pl-item.off { opacity: .45; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

.sites-strip { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 13px; }
.sites-strip span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 60px; }
.feat { padding: 18px; }
.feat b { display: block; margin-bottom: 4px; font-size: 15px; letter-spacing: -.01em; }
.feat p { margin: 0; color: var(--text-2); font-size: 14px; }
.feat a { display: block; height: 100%; }
.feat:hover { border-color: var(--line-2); }

.drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 42px 20px; text-align: center; cursor: pointer;
  background: var(--bg-2); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop b { display: block; font-size: 17px; margin-bottom: 4px; letter-spacing: -.01em; }
.drop span { color: var(--text-2); font-size: 14px; }
.drop .drop-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--surface-3); color: var(--text); }

.files { margin-top: 16px; display: grid; gap: 8px; }
.file {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px;
}
.ficon { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--text-2); overflow: hidden; background-size: cover; background-position: center; text-transform: uppercase; }
.fname { font-weight: 550; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsub { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fsub .where { font-family: var(--mono); font-size: 11px; padding: 0 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); }
.fsub .where.dev { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.fact { display: flex; gap: 8px; align-items: center; }
.file .bar { height: 4px; margin-top: 7px; }
.file.err .fsub { color: var(--danger); }

select, .input {
  height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 12px; outline: none; min-width: 0;
}
select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; cursor: pointer; }
select:focus, .input:focus { border-color: var(--accent); }
.input.wide { width: 100%; }
textarea.input { height: auto; padding: 12px; font-family: var(--mono); font-size: 13px; resize: vertical; width: 100%; }
input[type=range] { accent-color: var(--accent); width: 100%; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--line); }
.layout-2 { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.side { position: sticky; top: 76px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 12.5px; color: var(--muted); }

.compare { position: relative; border-radius: 12px; overflow: hidden; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface-3) 0 50%) 0 0/20px 20px; min-height: 220px; display: grid; place-items: center; }
.compare img { max-height: 520px; object-fit: contain; image-rendering: auto; }

.preview-frame { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-height: 300px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .t { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.badge { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-family: var(--mono); white-space: nowrap; }
.badge.acc { background: var(--accent-soft); color: var(--text); }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }

.auth { max-width: 420px; margin: 50px auto 0; }
.auth h1 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 4px; }
.captcha { display: flex; gap: 10px; align-items: center; }
.captcha img { height: 52px; border-radius: 9px; background: #fff; cursor: pointer; border: 1px solid var(--line); }
:root[data-theme="dark"] .captcha img { filter: invert(.92) hue-rotate(180deg); }

.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fmt-card h3 { margin: 0 0 4px; font-size: 16px; display: flex; justify-content: space-between; align-items: baseline; }
.fmt-card .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { padding: 16px 18px; min-width: 150px; }
.stat b { display: block; font-size: 28px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

.site-url { display: flex; align-items: center; height: 42px; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; background: var(--surface-2); }
.site-url .pre { padding: 0 2px 0 12px; color: var(--muted); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.site-url input { border: 0; background: none; outline: 0; height: 100%; flex: 1; min-width: 60px; font-family: var(--mono); font-size: 13.5px; }
.site-url .post { padding: 0 12px 0 0; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.site-url:focus-within { border-color: var(--accent); }
.name-state { font-size: 12.5px; min-height: 18px; }
.name-state.ok { color: var(--ok); }
.name-state.bad { color: var(--danger); }
.link-out { display: flex; gap: 8px; align-items: center; padding: 10px 10px 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; font-family: var(--mono); font-size: 13.5px; }
.link-out a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); }
:root[data-theme="light"] .link-out a { color: var(--text); text-decoration: underline; }

#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 100; max-width: calc(100vw - 40px); }
.toast { background: var(--surface-3); border: 1px solid var(--line-2); padding: 11px 15px; border-radius: 11px; font-size: 14px; box-shadow: var(--shadow); animation: tin .2s ease; max-width: 380px; }
.toast.err { border-color: var(--danger); }
.toast.ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }

.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

.kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; color: var(--text-2); }

@media (max-width: 1020px) {
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 14px 16px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; font-size: 15px; }
  .menu-btn { display: grid; }
  .layout-2 { grid-template-columns: 1fr; }
  .side { position: static; }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .top-in { padding: 0 16px; gap: 10px; }
  main { padding: 0 16px 60px; }
  .hero { padding: 40px 0 20px; }
  .media { grid-template-columns: 1fr; }
  .opt-row { grid-template-columns: 1fr; gap: 6px; }
  .opt-row > .label { margin: 0; }
  .features { grid-template-columns: 1fr; }
  .urlbox { padding-left: 14px; }
  .urlbox .btn { padding: 0 14px; }
  .pl-item { grid-template-columns: 22px 1fr auto; }
  .pl-item .num, .pl-item .thumb { display: none; }
  .file { grid-template-columns: 38px 1fr; }
  .file .fact { grid-column: 1 / -1; }
  .ficon { width: 38px; height: 38px; }
  .brand span { font-size: 15.5px; }
  .acct { padding: 0 11px; }
  .table .hide-sm { display: none; }
  .foot-in a { margin-left: 0; }
}
