:root {
  color-scheme: dark;
}

body {
  background:
    radial-gradient(60rem 60rem at 110% -10%, rgba(16, 185, 129, 0.08), transparent 60%),
    radial-gradient(50rem 50rem at -10% 10%, rgba(6, 182, 212, 0.07), transparent 55%),
    #020617;
}

.card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
}

/* ---------- 表单元素 ---------- */
.input {
  width: 100%;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.6rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  color: #e2e8f0;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #64748b; }
.input:focus {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.label { display: block; font-size: 0.8rem; color: #94a3b8; margin-bottom: 0.35rem; font-weight: 500; }
.hint { font-size: 0.72rem; color: #64748b; margin-top: 0.35rem; line-height: 1.4; }

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff; font-weight: 600; font-size: 0.85rem;
  padding: 0.5rem 0.9rem; border-radius: 0.6rem;
  border: none; cursor: pointer; transition: filter 0.15s, transform 0.05s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1; font-weight: 500; font-size: 0.85rem;
  padding: 0.5rem 0.9rem; border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer; transition: background 0.15s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- 分段控件 ---------- */
.segmented {
  display: inline-flex; padding: 3px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.6rem;
}
.seg {
  padding: 0.3rem 0.7rem; font-size: 0.78rem; font-weight: 500;
  color: #94a3b8; border-radius: 0.4rem; border: none; background: transparent; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg:hover { color: #e2e8f0; }
.seg.active { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* ---------- 状态点 ---------- */
.dot { width: 0.6rem; height: 0.6rem; border-radius: 9999px; display: inline-block; flex-shrink: 0; }
.dot.up { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.dot.down { background: #f43f5e; box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18); }
.dot.unknown { background: #64748b; }

/* ---------- 状态条带 ---------- */
.bars { display: flex; align-items: flex-end; gap: 2px; height: 2.5rem; }
.bar {
  flex: 1; min-width: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.1s;
}
.bar.up { background: #10b981; }
.bar.partial { background: #f59e0b; }
.bar.down { background: #f43f5e; }
.bar:hover { transform: scaleY(1.12); filter: brightness(1.15); }

/* ---------- 代码 / 状态码徽章 ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.badge {
  font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.4rem; border-radius: 0.35rem;
}
.badge-ok { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-bad { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.badge-mute { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* ---------- 弹窗 ---------- */
.modal-backdrop { background: rgba(2, 6, 23, 0.75); backdrop-filter: blur(4px); }

/* ---------- 卡片头操作图标 ---------- */
.icon-btn {
  width: 1.7rem; height: 1.7rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.45rem; color: #64748b; cursor: pointer; transition: background 0.15s, color 0.15s;
  border: none; background: transparent;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); color: #cbd5e1; }
.icon-btn.danger:hover { background: rgba(244, 63, 94, 0.12); color: #fb7185; }

/* 折叠展开区 */
.detail { border-top: 1px solid rgba(255, 255, 255, 0.06); margin-top: 0.9rem; padding-top: 0.9rem; }

/* 动画 */
.fade-in { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
