/* IshakMonitoring — Minecraft server monitor */
:root {
  --bg: #060a08;
  --bg-2: #0a110d;
  --panel: #0d1611;
  --panel-2: #111e17;
  --line: rgba(126, 224, 90, 0.12);
  --line-strong: rgba(126, 224, 90, 0.3);
  --text: #e9f4ec;
  --muted: #8ba396;
  --muted-2: #657b6e;
  --green: #7ee05a;
  --green-2: #4ade80;
  --lime: #c8f87a;
  --cyan: #5eead4;
  --red: #fb7185;
  --amber: #fbbf24;
  --radius: 20px;
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Inter", sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "Consolas", ui-monospace, monospace;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }

button, input, select { font: inherit; color: inherit; }

button { cursor: pointer; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(126, 224, 90, 0.13), transparent 60%),
    radial-gradient(800px 480px at 95% 5%, rgba(94, 234, 212, 0.08), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(76, 175, 80, 0.08), transparent 60%),
    var(--bg);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(126, 224, 90, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 224, 90, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(126, 224, 90, 0.08);
  background: rgba(6, 10, 8, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.18rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 6px 16px rgba(126, 224, 90, 0.25));
}

.brand-text span { color: var(--green); }

.brand-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  border: 1px solid var(--line-strong);
  background: rgba(126, 224, 90, 0.08);
  padding: 3px 7px;
  border-radius: 999px;
  transform: translateY(-6px);
}

.nav {
  display: flex;
  gap: 26px;
  margin-inline: auto;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav a { transition: color 0.2s; }
.nav a:hover { color: var(--text); }

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 7px;
}

.btn-auth {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  gap: 6px;
}

.btn-auth .icon { width: 15px; height: 15px; }

.auth-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: 0.18s;
}

.auth-user-btn:hover {
  border-color: var(--line-strong);
  background: rgba(126, 224, 90, 0.07);
}

.auth-user-btn .icon { width: 15px; height: 15px; color: var(--green); }

.auth-avatar,
.account-avatar {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--green), #3aa35f);
  color: #06140a;
  font-weight: 800;
}

.auth-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.76rem;
}

.auth-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 700;
}

.api-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}

.api-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 4px rgba(101, 123, 110, 0.12);
}

.api-pill[data-state="ok"] { color: var(--green); border-color: rgba(126, 224, 90, 0.25); }
.api-pill[data-state="ok"] i { background: var(--green); box-shadow: 0 0 0 4px rgba(126, 224, 90, 0.14); animation: pulse 2s infinite; }
.api-pill[data-state="warn"] { color: var(--amber); border-color: rgba(251, 191, 36, 0.25); }
.api-pill[data-state="warn"] i { background: var(--amber); }
.api-pill[data-state="down"] { color: var(--red); border-color: rgba(251, 113, 133, 0.3); }
.api-pill[data-state="down"] i { background: var(--red); }

/* ---------- Hero ---------- */
.hero { padding: 78px 0 36px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(126, 224, 90, 0.5);
  animation: live 2s infinite;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 1.3rem + 4.2vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(115deg, var(--green) 10%, var(--lime) 48%, var(--cyan) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 22px 0 28px;
  max-width: 540px;
  color: var(--muted);
  font-size: 1.04rem;
}

.search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 30, 23, 0.95), rgba(11, 18, 14, 0.95));
  box-shadow: 0 20px 50px -28px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding-left: 10px;
  color: var(--muted-2);
}

.search-field > .icon { width: 19px; height: 19px; }

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 13px 4px;
  font-size: 0.97rem;
  color: var(--text);
}

.search-field input::placeholder { color: var(--muted-2); }

.search-field select {
  border: 0;
  outline: none;
  background: rgba(126, 224, 90, 0.08);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 8px;
  border-radius: 10px;
  cursor: pointer;
}

.search-field select option { background: #0d1611; color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.16s, background 0.2s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, #8df06a, #5ccf45);
  color: #06140a;
  box-shadow: 0 12px 30px -12px rgba(126, 224, 90, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover { background: linear-gradient(180deg, #9bf77a, #6bdc52); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }

.btn-danger {
  background: rgba(251, 113, 133, 0.09);
  border-color: rgba(251, 113, 133, 0.25);
  color: var(--red);
}

.btn-danger:hover { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.4); }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.search-error {
  margin: 10px 4px 0;
  font-size: 0.84rem;
  color: var(--red);
}

.presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted-2);
}

.presets button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 5px 11px;
  border-radius: 999px;
  transition: 0.18s;
}

.presets button:hover {
  color: var(--green);
  border-color: var(--line-strong);
  background: rgba(126, 224, 90, 0.07);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .icon { width: 15px; height: 15px; color: var(--green); stroke-width: 3; }

.hero-visual {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 224, 90, 0.22), transparent 65%);
  filter: blur(14px);
}

.orbit {
  position: absolute;
  border: 1px dashed rgba(126, 224, 90, 0.14);
  border-radius: 50%;
}

.orbit-a { width: 330px; height: 330px; animation: spin 40s linear infinite; }
.orbit-b { width: 430px; height: 430px; border-color: rgba(94, 234, 212, 0.09); animation: spin 60s linear infinite reverse; }

.orbit-a::after,
.orbit-b::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(126, 224, 90, 0.9);
}

.orbit-b::after { background: var(--cyan); box-shadow: 0 0 14px rgba(94, 234, 212, 0.8); }

.block-float {
  position: relative;
  width: 250px;
  height: 250px;
  animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.55)) drop-shadow(0 18px 36px rgba(126, 224, 90, 0.18));
}

.block-float svg { width: 100%; height: 100%; }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 22, 17, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.76rem;
  color: var(--muted);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  animation: float 6s ease-in-out infinite;
}

.float-chip b { color: var(--green); font-weight: 700; }
.float-chip .icon { width: 15px; height: 15px; color: var(--green); }

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.chip-a { top: 12%; right: 2%; animation-delay: -1s; }
.chip-b { top: 38%; left: -4%; animation-delay: -2.5s; }
.chip-c { bottom: 25%; right: -2%; animation-delay: -4s; }
.chip-d { bottom: 6%; left: 6%; animation-delay: -3.2s; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(17, 30, 23, 0.75), rgba(10, 17, 13, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--green);
  background: rgba(126, 224, 90, 0.09);
  border: 1px solid rgba(126, 224, 90, 0.16);
}

.stat-icon .icon { width: 19px; height: 19px; }
.stat-icon-green { color: var(--lime); background: rgba(200, 248, 122, 0.08); border-color: rgba(200, 248, 122, 0.16); }
.stat-icon-cyan { color: var(--cyan); background: rgba(94, 234, 212, 0.08); border-color: rgba(94, 234, 212, 0.16); }
.stat-icon-amber { color: var(--amber); background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.16); }

.stat-body { display: flex; flex-direction: column; min-width: 0; }

.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 0.74rem; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Section head / toolbar ---------- */
.monitor { padding-top: 72px; scroll-margin-top: 80px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.section-title .eyebrow { margin-bottom: 8px; }

.section-title h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.count {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(126, 224, 90, 0.09);
  border: 1px solid rgba(126, 224, 90, 0.2);
  padding: 3px 9px;
  border-radius: 999px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.18s;
}

.tab span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-2);
}

.tab:hover { color: var(--text); }

.tab.is-active {
  background: rgba(126, 224, 90, 0.13);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(126, 224, 90, 0.2);
}

.tab.is-active span { color: var(--green); }

.mini-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted-2);
}

.mini-search .icon { width: 16px; height: 16px; }

.mini-search input {
  width: 150px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.82rem;
  color: var(--text);
}

.mini-search input::placeholder { color: var(--muted-2); }

.select-sort {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0 10px;
  outline: none;
  cursor: pointer;
}

.select-sort option { background: #0d1611; color: var(--text); }

#refreshAll { height: 38px; padding: 0 13px; font-size: 0.82rem; }

#refreshAll .icon { width: 16px; height: 16px; }

#refreshAll.is-busy .refresh-icon { animation: spin 0.9s linear infinite; }

.countdown {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-2);
  border-left: 1px solid var(--line);
  padding-left: 9px;
}

.empty {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Grid & cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.server-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(126, 224, 90, 0.06), transparent 70%),
    linear-gradient(165deg, rgba(17, 30, 23, 0.82), rgba(9, 15, 11, 0.94));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.server-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(126, 224, 90, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.server-card:hover,
.server-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(126, 224, 90, 0.06) inset;
  outline: none;
}

.server-card:hover::before,
.server-card:focus-visible::before { opacity: 1; }

.server-card.enter { animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.server-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1a2b20, #0d1711);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.icon-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(145deg, hsl(var(--h) 60% 42%), hsl(calc(var(--h) + 34) 55% 24%));
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.server-id { min-width: 0; flex: 1; }

.server-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-addr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 0;
  margin-top: 2px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  transition: color 0.18s;
}

.server-addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-addr .icon { width: 12px; height: 12px; opacity: 0; transition: opacity 0.18s; flex: none; }
.server-addr:hover { color: var(--green); }
.server-addr:hover .icon { opacity: 1; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-online { color: var(--green); background: rgba(126, 224, 90, 0.09); border-color: rgba(126, 224, 90, 0.2); }
.status-online i { animation: pulse 2s infinite; }
.status-offline { color: var(--red); background: rgba(251, 113, 133, 0.08); border-color: rgba(251, 113, 133, 0.18); }
.status-error { color: var(--amber); background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.18); }
.status-loading { color: var(--muted); background: rgba(255, 255, 255, 0.04); border-color: var(--line); }
.status-loading i { animation: pulse 1.2s infinite; }

.motd {
  margin: 0;
  min-height: 42px;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
  white-space: pre-line;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.motd-empty { color: var(--muted-2); font-style: italic; }
.server-card.is-offline .motd { color: var(--muted-2); }

.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.chip-type { color: var(--cyan); border-color: rgba(94, 234, 212, 0.14); background: rgba(94, 234, 212, 0.06); }
.chip-version span { overflow: hidden; text-overflow: ellipsis; }
.chip-ping { color: var(--muted); padding-right: 7px; }

.ping {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.ping i {
  width: 2.5px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.22;
}

.ping i:nth-child(1) { height: 3px; }
.ping i:nth-child(2) { height: 5px; }
.ping i:nth-child(3) { height: 7px; }
.ping i:nth-child(4) { height: 9px; }

.ping-1 { color: var(--red); }
.ping-2 { color: var(--amber); }
.ping-3 { color: var(--lime); }
.ping-4 { color: var(--green); }

.ping-1 i:nth-child(-n+1),
.ping-2 i:nth-child(-n+2),
.ping-3 i:nth-child(-n+3),
.ping-4 i:nth-child(-n+4) { opacity: 1; }

.ping-ms { font-family: var(--mono); font-size: 0.66rem; }

.players { display: flex; flex-direction: column; gap: 6px; }

.players-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--muted-2);
}

.players-nums { font-variant-numeric: tabular-nums; color: var(--muted); }
.players-nums b { color: var(--text); font-size: 0.86rem; font-weight: 700; }
.players-nums span { color: var(--muted-2); }

.bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #58c944, var(--lime));
  box-shadow: 0 0 12px rgba(126, 224, 90, 0.4);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar-fill.is-empty { min-width: 0; background: transparent; box-shadow: none; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.checked {
  font-size: 0.68rem;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions { display: flex; gap: 2px; flex: none; }

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-2);
  transition: 0.16s;
}

.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.icon-btn.danger:hover { color: var(--red); background: rgba(251, 113, 133, 0.1); }
.icon-btn.is-busy .icon { animation: spin 0.9s linear infinite; }

.add-tile {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px dashed rgba(126, 224, 90, 0.22);
  border-radius: var(--radius);
  background: rgba(126, 224, 90, 0.02);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: 0.2s;
}

.add-tile span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(126, 224, 90, 0.25);
  background: rgba(126, 224, 90, 0.07);
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.add-tile:hover {
  border-color: rgba(126, 224, 90, 0.5);
  background: rgba(126, 224, 90, 0.05);
  color: var(--text);
}

/* ---------- How ---------- */
.how { padding: 88px 0 40px; }

.center { text-align: center; justify-content: center; }
.center .eyebrow { justify-content: center; }
.center h2 { justify-content: center; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.how-card {
  position: relative;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(15, 26, 20, 0.7), rgba(8, 13, 10, 0.6));
  overflow: hidden;
}

.how-num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--mono);
  font-size: 2.3rem;
  font-weight: 800;
  color: rgba(126, 224, 90, 0.09);
  line-height: 1;
}

.how-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--green);
  background: rgba(126, 224, 90, 0.08);
  border: 1px solid rgba(126, 224, 90, 0.16);
  margin-bottom: 16px;
}

.how-icon .icon { width: 18px; height: 18px; }

.how-card h3 { margin: 0 0 8px; font-size: 1.02rem; letter-spacing: -0.01em; }
.how-card p { margin: 0; font-size: 0.86rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(6, 10, 8, 0.5);
}

.footer-inner {
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted-2);
}

.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-brand strong { color: var(--text); font-size: 0.9rem; display: block; }
.footer-brand p { margin: 1px 0 0; }

.footer-data a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(126, 224, 90, 0.3); text-underline-offset: 3px; }
.footer-data a:hover { color: var(--green); }
.footer-copy { margin: 0; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 3, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease both;
}

.modal-card {
  position: relative;
  width: min(620px, 100%);
  max-height: min(86vh, 860px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(170deg, #101c15, #0a110d 70%);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95);
  animation: modalIn 0.26s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 224, 90, 0.25) transparent;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: 0.18s;
}

.modal-close:hover { color: var(--text); border-color: var(--line-strong); }
.modal-close .icon { width: 16px; height: 16px; }

body.modal-open { overflow: hidden; }

.detail-head { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.detail-head .server-icon { width: 62px; height: 62px; border-radius: 16px; }
.detail-head .status { margin-left: auto; }
.detail-title { min-width: 0; }
.detail-title h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-title p { margin: 2px 0 0; font-family: var(--mono); font-size: 0.78rem; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; }

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.fact {
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.fact span { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.fact b { display: block; margin-top: 3px; font-size: 0.88rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact b.mono { font-family: var(--mono); font-size: 0.82rem; }

.detail-block { margin-top: 20px; }
.detail-label { display: block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.detail-motd {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  max-height: 160px;
  overflow: auto;
}

.detail-players { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow: auto; }
.player-chip {
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-note { margin: 8px 0 0; font-size: 0.78rem; color: var(--muted-2); }

.eula-warning {
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.07);
  color: var(--amber);
  font-size: 0.8rem;
}

.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.detail-actions .btn { font-size: 0.84rem; padding: 10px 15px; }
.detail-actions .btn-danger { background: rgba(251, 113, 133, 0.09); border-color: rgba(251, 113, 133, 0.25); color: var(--red); }
.detail-actions .btn-danger:hover { background: rgba(251, 113, 133, 0.16); }

/* ---------- Auth ---------- */
.auth-card { width: min(500px, 100%); }

.auth-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-right: 38px;
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(126, 224, 90, 0.09);
  color: var(--green);
}

.auth-mark .icon { width: 24px; height: 24px; }

.auth-head .eyebrow { margin: 0 0 5px; }
.auth-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: -0.03em; }
.auth-head p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 0.84rem; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 22px 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.auth-tabs button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 10px;
  transition: 0.18s;
}

.auth-tabs button:hover { color: var(--text); }

.auth-tabs button.is-active {
  background: rgba(126, 224, 90, 0.1);
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.auth-form { display: grid; gap: 13px; }

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-form label span {
  margin-left: 4px;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-2);
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 11px 13px;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.auth-form input::placeholder { color: var(--muted-2); }

.auth-form input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(126, 224, 90, 0.08);
}

.auth-submit { width: 100%; margin-top: 2px; }

.auth-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 9px;
  background: rgba(251, 113, 133, 0.08);
  color: var(--red);
  font-size: 0.78rem;
}

.auth-note {
  margin: 15px 0 0;
  color: var(--muted-2);
  font-size: 0.72rem;
  line-height: 1.55;
}

.auth-bottom-note { margin-top: 18px; }

.account-panel { display: grid; gap: 16px; }

.account-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.account-avatar { width: 44px; height: 44px; font-size: 1.05rem; }
.account-summary strong { display: block; font-size: 1rem; }
.account-summary p { margin: 1px 0 0; color: var(--muted-2); font-size: 0.75rem; overflow-wrap: anywhere; }

.account-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.account-stats div {
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.account-stats span { display: block; color: var(--muted-2); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; }
.account-stats b { display: block; margin-top: 2px; font-size: 1.05rem; }

.account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-actions .btn { flex: 1; font-size: 0.82rem; padding: 10px 13px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(13, 22, 17, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  font-size: 0.82rem;
  color: var(--text);
  pointer-events: auto;
  animation: toastIn 0.24s ease both;
}

.toast p { margin: 0; flex: 1; min-width: 0; }
.toast button {
  border: 1px solid var(--line-strong);
  background: rgba(126, 224, 90, 0.08);
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
  flex: none;
}

.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.toast-error { border-color: rgba(251, 113, 133, 0.35); }
.toast-error .toast-dot { background: var(--red); }
.toast-warn { border-color: rgba(251, 191, 36, 0.35); }
.toast-warn .toast-dot { background: var(--amber); }
.toast-success .toast-dot { background: var(--green); }
.toast-out { animation: toastOut 0.3s ease both; }

.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 200;
  padding: 16px;
  border-radius: 12px;
  background: #3a1218;
  color: #ffd7dd;
  border: 1px solid #7a2632;
  font-size: 0.9rem;
}

/* ---------- Animations ---------- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(126, 224, 90, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(126, 224, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 224, 90, 0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-visual { min-height: 360px; order: -1; }
  .block-float { width: 200px; height: 200px; }
  .orbit-a { width: 270px; height: 270px; }
  .orbit-b { width: 340px; height: 340px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 62px; gap: 10px; }
  .brand { font-size: 1rem; gap: 7px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-badge { display: none; }
  .api-pill span { display: none; }
  .api-pill { padding: 8px; }
  .auth-area { gap: 5px; }
  .auth-register-btn { display: none; }
  .btn-auth { padding: 8px 10px; }
  .auth-name { display: none; }
  .auth-user-btn { padding: 4px; border-radius: 50%; }
  .auth-user-btn .icon { display: none; }
  .hero { padding-top: 44px; }
  .hero-visual { min-height: 300px; }
  .block-float { width: 170px; height: 170px; }
  .orbit-a { width: 220px; height: 220px; }
  .orbit-b { width: 290px; height: 290px; }
  .chip-a { right: 0; }
  .chip-b { left: 0; }
  .chip-c { right: 0; }
  .search { flex-direction: column; }
  .search-field { padding: 4px 8px; }
  .search .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-value { font-size: 1.25rem; }
  .stat-label { font-size: 0.67rem; }
  .toolbar { width: 100%; }
  .mini-search { flex: 1; }
  .mini-search input { width: 100%; }
  .select-sort { flex: 1; }
  #refreshAll { flex: 1; }
  .grid { grid-template-columns: 1fr; }
  .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-card { padding: 20px; }
  .detail-head .status { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
