:root {
  color-scheme: dark;
  --bg: #07131a;
  --panel: rgba(14, 32, 39, 0.86);
  --panel-2: rgba(18, 42, 50, 0.72);
  --line: rgba(120, 184, 174, 0.18);
  --text: #dff4ef;
  --muted: #8fb3ad;
  --accent: #38d9a9;
  --accent-2: #22b8cf;
  --danger: #ff7a93;
  --warn: #ffd166;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(56, 217, 169, 0.18), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(34, 184, 207, 0.15), transparent 38%),
    var(--bg);
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 19, 26, 0.72);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 650; letter-spacing: .01em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04231d;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(56, 217, 169, .22);
}
.pill {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.nav { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.nav-item { padding: 6px 11px !important; border: 1px solid transparent !important; border-radius: 8px !important; background: transparent !important; color: var(--muted) !important; font-size: 12px !important; text-decoration: none; }
.nav-item:hover { color: var(--text) !important; background: rgba(56,217,169,.08) !important; }
.nav-item.active { color: var(--text) !important; border-color: rgba(56,217,169,.3) !important; background: rgba(56,217,169,.1) !important; }
.nav-item:disabled { opacity: .45; cursor: not-allowed; }

.health { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(255, 209, 102, .12); }
.health-dot.ok { background: var(--accent); box-shadow: 0 0 0 4px rgba(56, 217, 169, .12); }
.health-dot.bad { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 122, 147, .12); }

.shell { position: relative; max-width: 1180px; margin: 0 auto; padding: 46px clamp(18px, 4vw, 32px) 80px; }

.hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .22em; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.06; letter-spacing: -.03em; }
.lede { max-width: 680px; margin: 14px 0 0; color: var(--muted); line-height: 1.7; }

.active-card {
  min-width: 240px;
  padding: 18px 20px;
  border: 1px solid rgba(56, 217, 169, .28);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(56,217,169,.12), rgba(34,184,207,.06));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.active-label { color: var(--muted); font-size: 12px; }
.active-card strong { font-size: 24px; letter-spacing: -.02em; }
.active-meta { color: var(--muted); font-size: 12px; }

.grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 20px; margin-bottom: 20px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(18px);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
h2 { margin: 0; font-size: 18px; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.tag { padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px;
  border: 1px dashed rgba(56, 217, 169, .42);
  border-radius: 14px;
  background: rgba(56, 217, 169, .045);
  cursor: pointer;
  transition: .18s ease;
}
.drop:hover, .drop.dragover { border-color: var(--accent); background: rgba(56, 217, 169, .1); transform: translateY(-1px); }
.drop-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(56,217,169,.15); color: var(--accent); font-weight: 800; }
.drop small { color: var(--muted); }

.view.hidden { display: none !important; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { margin-top: 16px; }
.field label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
input, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 16, 21, .55);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: .18s ease;
}
input:focus, textarea:focus { border-color: rgba(56,217,169,.65); box-shadow: 0 0 0 3px rgba(56,217,169,.08); }
textarea { resize: vertical; }

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--text);
  background: rgba(255,255,255,.03);
  transition: .16s ease;
}
button:hover { border-color: rgba(56,217,169,.5); background: rgba(56,217,169,.08); }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary {
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  border: 0;
  color: #04231d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 750;
  box-shadow: 0 12px 28px rgba(56,217,169,.18);
}
.primary:hover { filter: brightness(1.06); }

.progress { height: 4px; margin-top: 12px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .12s linear; }

.endpoint {
  display: block;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 16, 21, .6);
  color: #9ff0d8;
  font-size: 12px;
  word-break: break-all;
}
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.releases-card { padding-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:hover { background: rgba(255,255,255,.025); }
.version { font-weight: 700; }
.sha { color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.thumb { width: 52px; height: 36px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.035); }
.no-thumb { color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 11px; }
.badge.active { color: #04231d; background: var(--accent); font-weight: 700; }
.badge.idle { color: var(--muted); background: rgba(255,255,255,.06); }
.actions-col { text-align: right; }
.actions { display: flex; justify-content: flex-end; gap: 7px; }
.mini { padding: 6px 9px; font-size: 11px; }
.danger { color: var(--danger); }
.empty { color: var(--muted); text-align: center; padding: 30px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: 360px;
  padding: 12px 16px;
  border: 1px solid rgba(56,217,169,.35);
  border-radius: 12px;
  background: #0c242b;
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.bad { border-color: rgba(255,122,147,.45); }

@media (max-width: 860px) {
  .hero, .grid, .two-fields { grid-template-columns: 1fr; }
  .active-card { min-width: 0; }
  .nav { display: none; }
}
