* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background: #f2f5f9;
}

a { color: #1565c0; text-decoration: none; }
a:hover { color: #0d47a1; text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 12px; }

/* ===== 顶部导航 ===== */
.topbar {
  background: linear-gradient(135deg, #0d47a1, #1565c0 55%, #1976d2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner { display: flex; align-items: center; height: 56px; }
.logo { display: flex; align-items: center; color: #fff; margin-right: auto; }
.logo:hover { text-decoration: none; color: #fff; }
.logo-icon {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.18);
  width: 34px; height: 34px; line-height: 34px;
  text-align: center; border-radius: 8px; margin-right: 8px;
}
.logo-text { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.logo-sub { font-size: 13px; color: #b3d4fc; margin-left: 6px; }

.topbar-links a {
  color: #d9e8fb; margin-left: 18px; font-size: 14px; padding: 6px 2px;
}
.topbar-links a:hover { color: #fff; text-decoration: none; }
.topbar-links a.on { color: #fff; font-weight: 700; border-bottom: 2px solid #ffd54f; }

/* ===== 面包屑 ===== */
.crumb { padding: 14px 0 4px; color: #888; font-size: 13px; }
.crumb a { color: #666; }
.crumb span { color: #1565c0; }

.main { padding-top: 8px; }

/* ===== 卡片 ===== */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 22px;
  margin: 14px 0;
}

/* ===== 测速卡片 ===== */
.speed-card { text-align: center; padding: 30px 22px 26px; }
.speed-title { font-size: 20px; color: #0d47a1; margin-bottom: 14px; }
.speed-status { color: #888; font-size: 15px; min-height: 22px; margin-bottom: 16px; }
.speed-status.running { color: #1565c0; }

.speed-buttons { display: flex; justify-content: center; gap: 14px; }

.btn {
  display: inline-block;
  padding: 9px 26px;
  border: 1px solid #b0bec5;
  border-radius: 6px;
  background: #fff;
  color: #37474f;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn:hover { background: #f5f7fa; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #1565c0; border-color: #1565c0; color: #fff; }
.btn-primary:hover { background: #0d47a1; }
.btn-ghost { background: #eef3fa; border-color: #cfdcee; }

/* 加载动画 */
.speed-loading { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #1565c0; }
.spinner {
  width: 22px; height: 22px;
  border: 3px solid #c5d8ee;
  border-top-color: #1565c0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 测速报告 ===== */
.speed-report { text-align: left; margin-top: 22px; }
.report-title { font-size: 17px; color: #0d47a1; border-left: 4px solid #1565c0; padding-left: 10px; margin-bottom: 14px; }

.report-table { width: 100%; border-collapse: collapse; }
.report-table th {
  background: #f5f8fc;
  color: #555;
  width: 110px;
  padding: 10px 12px;
  border: 1px solid #e3ebf5;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.report-table td {
  padding: 10px 12px;
  border: 1px solid #e3ebf5;
  font-size: 14px;
  color: #1565c0;
  font-weight: 600;
  word-break: break-all;
}
.report-table td .unit { color: #999; font-weight: 400; font-size: 12px; }
.report-table td .mb { font-size: 18px; color: #0d47a1; }

.est-band { margin-top: 16px; background: #f0f6ff; border: 1px solid #d6e6fb; border-radius: 8px; padding: 14px 16px; }
.est-band h4 { color: #0d47a1; font-size: 15px; margin-bottom: 10px; }
.est-row { display: flex; gap: 40px; flex-wrap: wrap; }
.est-row span { font-size: 14px; color: #555; }
.est-row b { font-size: 20px; color: #e65100; }

.retest { margin-top: 16px; }
.retest-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.retest-table th { background: #f5f8fc; padding: 8px 10px; border: 1px solid #e3ebf5; color: #555; font-size: 13px; }
.retest-table td { padding: 8px 10px; border: 1px solid #e3ebf5; text-align: center; font-size: 13px; color: #37474f; }

/* ===== 指南 ===== */
.block-title {
  font-size: 17px;
  color: #0d47a1;
  border-left: 4px solid #1565c0;
  padding-left: 10px;
  margin-bottom: 14px;
}
.guide-body h4 { color: #37474f; margin: 10px 0 6px; font-size: 14px; }
.guide-body ol { margin: 0 0 12px 22px; line-height: 1.9; }
.guide-body ol li { color: #555; }
.guide-body dl dt { color: #37474f; font-weight: 600; margin: 8px 0 2px; line-height: 1.8; }
.guide-body dl dd { color: #666; margin-left: 0; line-height: 1.9; }
.guide-body .tip { background: #fff8e1; border: 1px solid #ffe082; color: #8d6e2e; padding: 10px 14px; border-radius: 6px; margin-top: 12px; line-height: 1.8; }

/* ===== 导航列表 ===== */
.province-list { list-style: none; display: flex; flex-wrap: wrap; }
.province-list li { margin: 0 14px 12px 0; }
.province-list a {
  display: inline-block;
  padding: 7px 16px;
  background: #eef3fa;
  border: 1px solid #d3e0f0;
  border-radius: 20px;
  color: #1565c0;
  font-size: 14px;
}
.province-list a:hover { background: #dbe9fb; text-decoration: none; }
.province-list a.current { background: #1565c0; color: #fff; border-color: #1565c0; }

.city-title { margin-top: 8px; }
.city-list a { background: #f5f8fc; }

/* ===== 推荐工具 ===== */
.tips-links { display: flex; flex-wrap: wrap; }
.tips-links a { margin: 0 16px 10px 0; color: #555; font-size: 13px; }
.tips-links a:hover { color: #1565c0; }

/* ===== 页脚 ===== */
.footer { background: #37474f; color: #b0bec5; margin-top: 20px; padding: 22px 0; text-align: center; font-size: 13px; }
.footer a { color: #cfd8dc; margin: 0 8px; }
.footer a:hover { color: #fff; }
.footer p { line-height: 1.9; }

/* ===== IPv6 页面 ===== */
.ipv6-card { text-align: center; }
.ipv6-result { font-size: 18px; margin: 16px 0; }
.ipv6-ok { color: #2e7d32; }
.ipv6-bad { color: #c62828; }

@media (max-width: 600px) {
  .topbar-links a { margin-left: 10px; font-size: 13px; }
  .logo-text { font-size: 17px; }
  .report-table th { width: 80px; }
  .est-row { gap: 18px; }
}