/* style.css —— 复刻参考站排版的轻量样式 */
* { box-sizing: border-box; }

:root {
  --primary: #4a7bf7;
  --primary-hover: #3a6be7;
  --border: #e3e6eb;
  --text: #1f2329;
  --muted: #8a919f;
  --req: #f56c6c;
  --row-alt: #fafbfc;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 14px;
}

.page { max-width: 1280px; margin: 0 auto; padding: 24px 28px 60px; }
.title { font-size: 20px; font-weight: 600; margin: 4px 0 20px; }

/* 参数表单：四列网格 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 14px; color: var(--text); }
.label em { color: var(--req); font-style: normal; margin-right: 2px; }

.field input, .field select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  background: #fff;
  transition: border-color .15s;
}
.field input:focus, .field select:focus { border-color: var(--primary); }

/* 按钮 */
.actions { display: flex; gap: 12px; margin: 22px 0 18px; }
.btn {
  height: 38px; padding: 0 20px;
  border-radius: 6px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; transition: background .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: #eef2fd; color: var(--primary); }
.btn-ghost:hover { background: #e2e9fc; }

/* 网格表 */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
.grid-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.grid-table th, .grid-table td {
  padding: 14px 12px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.grid-table th { color: var(--muted); font-weight: 500; }
.grid-table tbody tr:nth-child(even) { background: var(--row-alt); }
.grid-table td.empty, .grid-table tr.empty td { color: var(--muted); text-align: left; }

/* 压力测试 */
.stress { margin-top: 26px; }
.stress h2 { font-size: 17px; font-weight: 600; margin: 0 0 16px; }
.stress-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px 24px; font-size: 15px;
}
.stress-grid .k { color: var(--text); }
.stress-grid .v { font-weight: 600; }
.hint {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border: 1px solid var(--muted); border-radius: 50%;
  font-size: 10px; font-style: normal; color: var(--muted); cursor: help;
  vertical-align: middle;
}
/* tooltip 气泡：悬停(桌面)或 .show(手机点按)时显示 */
.hint::after {
  content: attr(data-tip);
  position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%);
  min-width: 180px; max-width: 320px; width: max-content;
  background: #303133; color: #fff; text-align: left; font-size: 12.5px;
  line-height: 1.6; font-style: normal; white-space: normal;
  padding: 8px 10px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.15);
  opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 20;
  pointer-events: none;
}
.hint::before {  /* 小三角 */
  content: ""; position: absolute; bottom: 140%; left: 50%;
  transform: translate(-50%, 100%);
  border: 5px solid transparent; border-top-color: #303133;
  opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 20;
}
.hint:hover::after, .hint:hover::before,
.hint.show::after, .hint.show::before { opacity: 1; visibility: visible; }

@media (max-width: 960px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .stress-grid { grid-template-columns: repeat(2, 1fr); }
}
