:root {
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.6);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --accent: #3b82f6;
  --accent2: #1d4ed8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background-color: #05060b;
  background-image: url('/bj.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  min-height: 100vh;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.home .page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(106, 228, 255, 0.35), rgba(139, 92, 255, 0.35));
  border: 1px solid var(--border);
}

.title .name {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.title .sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.admin-link {
  text-decoration: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.admin-link:hover {
  background: rgba(255, 255, 255, 0.07);
}

.grid {
  margin-top: 18px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}

.home .grid {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 460px));
  justify-content: center;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .home .grid {
    grid-template-columns: minmax(0, 520px);
  }
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.card-click {
  cursor: pointer;
}

.card-click .list,
.card-click a,
.card-click button,
.card-click input,
.card-click select {
  cursor: auto;
}

.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.route-hd {
  justify-content: center;
}

.route-hd > div {
  width: 100%;
}

.card-title {
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  width: 100%;
}

.card-desc {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #05101a;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-full {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
}

.primary:hover {
  filter: brightness(1.05);
}

.list {
  padding: 14px 16px 12px;
  display: grid;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.row .left {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.row .name {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row .url {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.latency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1;
}

.latency svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.latency[data-level='good'] {
  color: rgba(34, 197, 94, 0.95);
}

.latency[data-level='mid'] {
  color: rgba(59, 130, 246, 0.95);
}

.latency[data-level='bad'] {
  color: rgba(239, 68, 68, 0.95);
}

.row a {
  text-decoration: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.14);
}

.row a:hover {
  background: rgba(0, 0, 0, 0.24);
}

.badge {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
}

.footer {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
