:root {
  --bg: #0b0d12;
  --bg-2: #10131a;
  --card: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #eef1f7;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(120deg, #4f8cff, #22d3ee);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 320px at 20% 10%, rgba(79,140,255,0.16), transparent 60%),
    radial-gradient(700px 380px at 80% 5%, rgba(34,211,238,0.12), transparent 60%);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 18, 0.72);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  max-width: 1060px; margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; background: var(--accent-grad); color: #071018; font-size: 17px;
  box-shadow: 0 4px 18px rgba(79,140,255,0.4);
}
.brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.brand-name em { font-style: normal; color: var(--accent-2); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .15s; }
.nav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */
main { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.hero { text-align: center; padding: 84px 0 40px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 6px 14px; font-size: 12.5px; color: var(--muted);
  background: var(--card);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.live .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.pill.down .dot { background: var(--err); box-shadow: 0 0 10px var(--err); }

h1 {
  margin: 26px 0 14px;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 1.08; letter-spacing: -0.03em; font-weight: 800;
}
.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--muted); max-width: 620px; margin: 0 auto 34px; font-size: 16.5px; }

/* ---------- grabber ---------- */
.grabber {
  display: flex; gap: 12px; max-width: 760px; margin: 0 auto;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 10px; backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  transition: border-color .2s, box-shadow .2s;
}
.grabber:focus-within {
  border-color: rgba(79,140,255,0.55);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 0 0 4px rgba(79,140,255,0.12);
}
.input-wrap { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; }
.link-icon { color: var(--muted); flex-shrink: 0; }
#urlInput {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--text); font-size: 15.5px; padding: 14px 0; min-width: 0;
}
#urlInput::placeholder { color: #5d6675; }
#grabBtn {
  border: 0; cursor: pointer; border-radius: 11px; padding: 0 26px;
  background: var(--accent-grad); color: #071018; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .12s ease, box-shadow .2s;
  box-shadow: 0 8px 24px rgba(79,140,255,0.35);
}
#grabBtn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(79,140,255,0.45); }
#grabBtn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(7,16,24,0.35); border-top-color: #071018;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.quick-row {
  margin-top: 16px; display: flex; gap: 10px; align-items: center;
  justify-content: center; flex-wrap: wrap; color: #5d6675; font-size: 13px;
}
.chip {
  background: var(--card); border: 1px solid var(--card-border); color: var(--muted);
  border-radius: 999px; padding: 5px 13px; font-size: 12.5px; cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: rgba(79,140,255,0.5); }

/* ---------- output ---------- */
.output { max-width: 760px; margin: 26px auto 0; text-align: left; }
.steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.step-line {
  font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center;
  animation: fadeUp .3s ease;
}
.step-line.done::before { content: '✓'; color: var(--ok); }
.step-line.active::before { content: '▹'; color: var(--accent); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px);
}
.result-card { animation: fadeUp .35s ease; border-color: rgba(52,211,153,0.35); }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.badge {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-2); background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.3); border-radius: 999px; padding: 4px 12px;
}
.elapsed { font-size: 12px; color: #5d6675; }
.result-url-box {
  background: rgba(0,0,0,0.35); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
  word-break: break-all;
}
.result-url-box code { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 13.5px; color: #cfe3ff; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; padding: 11px 20px; font-weight: 700; font-size: 14px;
  text-decoration: none; cursor: pointer; transition: all .15s; border: 1px solid transparent;
}
.btn.primary { background: var(--accent-grad); color: #071018; box-shadow: 0 6px 20px rgba(79,140,255,0.35); }
.btn.primary:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--card-border); }
.btn.ghost:hover { border-color: rgba(79,140,255,0.5); }
.paste-note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.paste-note a { color: var(--accent-2); }

.error-card { border-color: rgba(248,113,113,0.35); animation: fadeUp .35s ease; }
.error-card h3 { color: var(--err); margin-bottom: 8px; font-size: 16px; }
.error-card p { color: var(--muted); font-size: 14px; }
.error-card .hint { margin-top: 10px; font-size: 12.5px; color: #5d6675; }

/* ---------- sections ---------- */
.section { padding: 46px 0 10px; }
.section h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.site { display: flex; gap: 14px; align-items: flex-start; }
.site-ico {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #071018;
}
.site-ico.lv { background: linear-gradient(135deg, #4f8cff, #7aa7ff); }
.site-ico.rk { background: linear-gradient(135deg, #22d3ee, #6ee7f9); }
.site-ico.bi { background: linear-gradient(135deg, #a78bfa, #c4b5fd); }
.site-ico.sh { background: linear-gradient(135deg, #34d399, #6ee7b7); }
.site-ico.ll { background: linear-gradient(135deg, #fbbf24, #fcd34d); }
.site-ico.gw { background: linear-gradient(135deg, #9aa3b2, #c3cad4); }
.site strong { display: block; font-size: 15px; }
.site small { color: var(--muted); font-size: 12.5px; line-height: 1.5; display: block; margin-top: 2px; }
.tag { margin-left: auto; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; align-self: flex-start; }
.tag.ok { color: var(--ok); background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3); }
.tag.warn { color: var(--warn); background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.3); }

.step { position: relative; padding-top: 24px; }
.step .num {
  position: absolute; top: -12px; left: 18px;
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent-grad);
  color: #071018; font-weight: 800; display: grid; place-items: center; font-size: 14px;
}
.step strong { display: block; margin: 6px 0 4px; }
.step p { color: var(--muted); font-size: 13.5px; }

/* ---------- history ---------- */
.history { list-style: none; }
.history li {
  display: flex; align-items: center; gap: 12px; padding: 10px 2px;
  border-bottom: 1px solid var(--card-border); font-size: 13.5px;
}
.history li:last-child { border-bottom: 0; }
.history .h-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.history a { color: var(--accent-2); text-decoration: none; font-size: 12.5px; }
.history .h-time { color: #5d6675; font-size: 11.5px; }

/* ---------- faq ---------- */
details {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 10px;
}
details summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
details p { margin-top: 10px; color: var(--muted); font-size: 14px; }

footer {
  text-align: center; color: #5d6675; font-size: 12.5px;
  padding: 46px 20px 34px;
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .grabber { flex-direction: column; }
  #grabBtn { padding: 14px; justify-content: center; }
  .nav-links { display: none; }
  .hero { padding-top: 56px; }
}
