:root {
  --bg: #060a14;
  --bg2: #0b1120;
  --card: #0f172aee;
  --border: #1e293b;
  --text: #e2e8f0;
  --muted: #64748b;
  --cyan: #22d3ee;
  --emerald: #34d399;
  --accent-grad: linear-gradient(135deg, #22d3ee, #0ea5e9);
}
[data-theme="light"] {
  --bg: #eef2f7;
  --bg2: #e2e8f0;
  --card: #ffffffee;
  --border: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(34,211,238,.10), transparent),
    radial-gradient(1000px 500px at 0% 110%, rgba(52,211,153,.08), transparent),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed;
  min-height: 100vh;
}
.mono { font-family: "JetBrains Mono", monospace; }

.app { max-width: 1240px; margin: 0 auto; padding: 16px; }

/* header */
.hdr {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 14px 18px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; backdrop-filter: blur(12px);
  position: sticky; top: 8px; z-index: 20;
}
.hdr-left { display: flex; align-items: center; gap: 14px; }
.title {
  font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -1px;
  background: linear-gradient(90deg, #22d3ee, #34d399);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { margin: 0; font-size: 12px; color: var(--muted); font-weight: 300; }
.hdr-right { display: flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); user-select: none;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.pill-online { color: var(--emerald); background: rgba(52,211,153,.1); }
.pill-online .dot { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.pill-demo { color: #fbbf24; background: rgba(251,191,36,.1); }
.pill-demo .dot { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.pill-checking { color: var(--muted); }
.pill-checking .dot { background: var(--muted); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  font-size: 16px; transition: .2s;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* radar */
.radar {
  width: 46px; height: 46px; border-radius: 50%; position: relative;
  border: 1px solid var(--cyan); overflow: hidden; flex: none;
  background: radial-gradient(circle, rgba(34,211,238,.15), transparent 70%);
}
.radar::before, .radar::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(34,211,238,.25);
}
.radar::after { inset: 25%; }
.radar-sweep {
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg, rgba(34,211,238,.5), transparent 60deg);
  animation: sweep 2.4s linear infinite;
}
.radar-dot {
  position: absolute; top: 30%; left: 62%; width: 5px; height: 5px;
  background: var(--emerald); border-radius: 50%; box-shadow: 0 0 6px var(--emerald);
  animation: blink 1.6s infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px; margin-bottom: 16px;
  backdrop-filter: blur(10px);
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.count-badge {
  font-size: 11px; color: var(--cyan); background: rgba(34,211,238,.1);
  padding: 4px 10px; border-radius: 999px; font-family: "JetBrains Mono", monospace;
}
.grid-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 880px) { .grid-top { grid-template-columns: 1fr; } }

/* inputs / buttons */
.row { display: flex; gap: 8px; align-items: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 120px; }
.inp {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  border-radius: 11px; padding: 9px 12px; font-size: 13px; outline: none; width: 100%;
  transition: .2s;
}
.inp:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.15); }
.lbl { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.hint { font-size: 11px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

.btn {
  border: 1px solid var(--border); border-radius: 11px; padding: 9px 16px;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text); background: var(--bg2); transition: .2s; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn-primary { background: var(--accent-grad); color: #05121a; border: none; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-ghost:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.btn-server {
  background: linear-gradient(135deg, #22d3ee, #06b6d4); color: #041018; border: none;
  box-shadow: 0 4px 20px rgba(34,211,238,.3); flex: 1;
}
.btn-server:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn-local {
  background: transparent; color: var(--emerald); border: 1px solid var(--emerald); flex: 1;
}
.btn-local:hover:not(:disabled) { background: rgba(52,211,153,.12); }
.btn-cancel { background: rgba(239,68,68,.15); color: #f87171; border-color: #7f1d1d; }
.actions { gap: 10px; }

.chip {
  border: 1px solid var(--border); background: var(--bg2); color: var(--muted);
  padding: 5px 12px; border-radius: 999px; font-size: 12px; cursor: pointer;
  font-family: inherit; transition: .15s;
}
.chip:hover { color: var(--text); border-color: var(--cyan); }
.chip-on { background: rgba(34,211,238,.15); color: var(--cyan); border-color: var(--cyan); }
.mini-actions { margin-top: 8px; }
.chips { margin-top: 4px; }

/* domain list */
.list-wrap { margin-top: 10px; }
.domain-scroll {
  max-height: 260px; overflow-y: auto; margin-top: 8px;
  border: 1px solid var(--border); border-radius: 11px; padding: 4px;
}
.domain-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px; border-radius: 8px;
}
.domain-item:hover { background: var(--bg2); }
.dl { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; flex: 1; overflow: hidden; }
.dl input { accent-color: var(--cyan); }
.dn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 9px; background: rgba(52,211,153,.15); color: var(--emerald); padding: 1px 6px; border-radius: 6px; flex: none; }
.x { background: none; border: none; color: #f87171; cursor: pointer; font-size: 16px; padding: 0 4px; }

/* progress */
.prog { margin-top: 12px; }
.prog-bar { height: 8px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent-grad); transition: width .3s ease; }
.prog-txt { font-size: 11px; color: var(--muted); margin-top: 6px; }
.status-msg { font-size: 12px; color: var(--cyan); margin-top: 2px; font-style: italic; }

/* best */
.best-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.best-chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--border); border-left-width: 3px;
  padding: 7px 12px; border-radius: 10px; font-size: 12px; color: var(--text);
  transition: .15s;
}
.best-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.medal { font-size: 13px; }
.chip-ping { font-family: "JetBrains Mono", monospace; font-size: 11px; }

/* table */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th {
  text-align: left; padding: 8px 10px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--card); font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
}
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--cyan); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid rgba(30,41,59,.5); }
.tbl tr:hover td { background: rgba(34,211,238,.04); }
.tbl tr.dead { opacity: .45; }
.tbl tr.dead td:first-child { border-left: 2px solid #ef4444; }
.rank { font-weight: 700; color: var(--muted); }
.tls { font-size: 10px; padding: 2px 7px; border-radius: 6px; background: var(--bg2); color: var(--muted); font-family: "JetBrains Mono", monospace; }
.tls13 { background: rgba(34,211,238,.15); color: var(--cyan); box-shadow: 0 0 8px rgba(34,211,238,.25); }
.cdn-chip { font-size: 10px; padding: 2px 7px; border-radius: 6px; font-weight: 600; }
.proto { display: flex; gap: 4px; }
.proto-b { font-size: 9px; padding: 1px 5px; border-radius: 5px; font-weight: 700; }
.proto-b.h2 { background: rgba(148,163,184,.2); color: #94a3b8; }
.proto-b.h3 { background: rgba(52,211,153,.2); color: var(--emerald); }

.ring-wrap { position: relative; width: 40px; height: 40px; }
.ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; font-family: "JetBrains Mono", monospace; }

/* empty */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-radar { display: flex; justify-content: center; margin-bottom: 12px; opacity: .7; }
.empty p { margin: 4px 0; }

/* mobile cards */
.mobile { display: none; }
.mcard {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; margin-bottom: 10px;
}
.mcard.dead { opacity: .5; border-left: 2px solid #ef4444; }
.mcard-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mcard-grid > div { display: flex; justify-content: space-between; font-size: 12px; }
.k { color: var(--muted); font-size: 11px; }

@media (max-width: 860px) {
  .desktop { display: none; }
  .mobile { display: block; }
  .title { font-size: 22px; }
  .subtitle { display: none; }
}

/* toast */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--cyan); color: var(--text);
  padding: 11px 20px; border-radius: 12px; font-size: 13px; z-index: 100;
  backdrop-filter: blur(12px); box-shadow: 0 8px 30px rgba(0,0,0,.4);
  animation: rise .3s ease;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 16px); } }

/* footer */
.ftr {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 10px; padding: 18px 6px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--border); margin-top: 8px;
}
.ftr a { color: var(--cyan); text-decoration: none; font-weight: 600; }
.ftr a:hover { text-decoration: underline; }

.settings .row { margin-top: 4px; }
</parameter>
</invoke>