/* 引入自定义字体（可选，若不需要可删除） */
@font-face {
  font-family: 'Noto Sans SC';
  src: url('https://fonts.gstatic.com/s/notosanssc/v26/NotoSansSC-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans SC';
  src: url('https://fonts.gstatic.com/s/notosanssc/v26/NotoSansSC-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 亮/暗主题样式 */
:root {
  --ui-scale: 0.95; /* 从 0.9 调整到 0.95，稍微放大整体比例 */
  --primary: #3fbf5a;
  --secondary: #2ea44f;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #ffffff;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --elev: #f8fafc;
  --neon: #27c46a;
  --soft: #f6f8fb;
  --soft-2: #eef2f7;
  --shadow: 0 12px 36px rgba(2,6,23,.05); /* 阴影更柔和 */
  --shadow-hover: 0 18px 48px rgba(2,6,23,.07); /* 悬停阴影更大 */
  --progress-bg: #e6f4ea;
  --progress-border: #e4f0e8;
  --scroll-track: #f1f5f9;
  --scroll-thumb: #cbd5e1;
  --scroll-thumb-hover: #94a3b8;
}

.theme-dark {
  --bg: #0f1310;
  --card: rgba(16,24,19,.78);
  --text: #e8f5ec;
  --muted: #d1d5db;
  --border: rgba(63,191,90,.28);
  --elev: #111a14;
  --soft: rgba(0,0,0,.22);
  --soft-2: rgba(63,191,90,.12);
  --shadow: 0 12px 36px rgba(0,0,0,.3);
  --shadow-hover: 0 18px 48px rgba(0,0,0,.4);
  --progress-bg: rgba(63,191,90,.18);
  --progress-border: rgba(63,191,90,.22);
  --scroll-track: rgba(0,0,0,.2);
  --scroll-thumb: rgba(255,255,255,.22);
  --scroll-thumb-hover: rgba(255,255,255,.35);
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  font-size: clamp(15px, 2.8vw, 18px);
  line-height: 1.6; /* 增加行高，增强可读性和呼吸感 */
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}

/* 优化中英文混排 */
:lang(en), .en, [lang="en"] {
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container {
  width: 100%;
  max-width: 1080px; /* 从 980px 增加到 1080px，增加页面宽度 */
  padding: 2.5rem 1.5rem; /* 增加内边距 */
  position: relative;
  z-index: 1;
  transform: scale(var(--ui-scale));
  transform-origin: top center;
}

header {
  text-align: center;
  margin-bottom: 2.2rem; /* 增加头部底部外边距 */
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem; /* 增加间距 */
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .6rem; /* 增加间距 */
  background: var(--card);
  border: 1px solid var(--border);
  padding: .45rem .6rem; /* 增加内边距 */
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.theme-toggle .icon {
  width: 20px; /* 图标放大 */
  height: 20px;
  display: grid;
  place-items: center;
}

.theme-toggle .label {
  font-size: .88rem;
  font-weight: 700;
  color: var(--muted);
}

.theme-toggle .sep {
  width: 1px;
  height: 18px; /* 增加分隔线高度 */
  background: var(--border);
  margin: 0 .25rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem; /* 增加间距 */
  margin-bottom: .6rem; /* 增加底部外边距 */
}

.logo-icon .icon-svg {
  fill: var(--primary);
  width: 32px; /* 图标放大 */
  height: 32px;
}

h1, h2 {
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: .8px; /* 增加字间距 */
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.2rem); /* 放大标题字体 */
}

.subtitle {
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  max-width: 800px; /* 增加最大宽度 */
  margin: .6rem auto 0; /* 增加顶部外边距 */
  line-height: 1.7; /* 增加行高 */
}

.stats {
  display: flex;
  justify-content: center;
  gap: 1.4rem; /* 增加间距 */
  margin: 1.4rem 0; /* 增加外边距 */
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  min-width: 110px; /* 增加宽度 */
  background: var(--elev);
  padding: .9rem 1rem; /* 增加内边距 */
  border-radius: 14px; /* 增加圆角 */
  border: 1px solid var(--border);
}

.stat-value {
  font-size: clamp(1.3rem, 3vw, 1.5rem); /* 放大字体 */
  color: var(--secondary);
  margin-bottom: .25rem; /* 增加间距 */
  font-weight: 700;
}

.stat-label {
  font-size: .9rem; /* 略微放大 */
  color: var(--muted);
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* 增加卡片间距 */
  margin-bottom: 1.5rem;
}

.card {
  background: var(--card);
  border-radius: 20px; /* 增加圆角 */
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem; /* 增加内边距 */
  margin: 0 .5rem; /* 增加外边距 */
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem; /* 增加间距 */
}

.card-title {
  display: flex;
  align-items: center;
  font-size: clamp(1.15rem, 3vw, 1.25rem); /* 放大字体 */
  font-weight: 700;
  color: var(--text);
}

.card-title .icon-svg {
  color: var(--primary);
  fill: currentColor;
  margin-right: .6rem; /* 增加间距 */
  width: 20px; /* 图标放大 */
  height: 20px;
}

.card-right {
  display: flex;
  align-items: center;
  gap: .6rem; /* 增加间距 */
}

.card-badge {
  padding: .4rem .9rem; /* 增加内边距 */
  border-radius: 999px;
  font-size: .8rem; /* 放大字体 */
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  letter-spacing: .8px;
}

.status {
  display: flex;
  align-items: center;
  font-size: 1.05rem; /* 放大字体 */
  margin-bottom: 1rem; /* 增加间距 */
  gap: .6rem;
  color: var(--text);
}

.progress-container {
  width: 100%;
  height: 10px; /* 增加进度条高度 */
  background: var(--progress-bg);
  border-radius: 999px;
  margin: .8rem 0 1.2rem; /* 增加外边距 */
  overflow: hidden;
  border: 1px solid var(--progress-border);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: width .28s;
}

.domain-list {
  background: var(--soft);
  border-radius: 14px; /* 增加圆角 */
  padding: .8rem; /* 增加内边距 */
  margin-top: .3rem;
  max-height: 260px; /* 增加高度 */
  overflow-y: auto;
  border: 1px solid var(--border);
}

.domain-item {
  padding: .7rem .8rem; /* 增加内边距 */
  border-bottom: 1px solid var(--soft-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem; /* 放大字体 */
}

.domain-item:last-child {
  border-bottom: none;
}

.domain-status {
  font-size: .9rem; /* 放大字体 */
  padding: .3rem .7rem; /* 增加内边距 */
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.status-success {
  background: #ecfdf5;
  color: var(--success);
  border-color: #d1fae5;
}

.status-fail {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fee2e2;
}

.status-testing {
  background: #fff7ed;
  color: #b45309;
  border-color: #ffedd5;
}

.register-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem; /* 增加外边距 */
  gap: .8rem; /* 增加间距 */
}

.register-btn {
  padding: 1rem 2.5rem; /* 增加内边距 */
  font-size: 1.15rem; /* 放大字体 */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.4rem; /* 降低垂直内边距 */
  border-radius: 14px;
  font-size: 1rem; /* 调整字体大小 */
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
  border: 0.5px solid transparent;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
}
.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.btn-disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

.btn-compact {
  padding: .6rem .9rem; /* 增加内边距 */
  font-size: .95rem; /* 放大字体 */
  border-radius: .8rem; /* 增加圆角 */
}

.mr-2 {
  margin-right: .3rem; /* 增加间距 */
}

.loading-spinner {
  display: inline-block;
  width: 18px; /* 放大加载图标 */
  height: 18px;
  border: 3px solid rgba(107,114,128,.25);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

.browser-warning {
  display: none;
  background: #fff8f0;
  border: 1px solid var(--warning);
  color: #92400e;
  border-radius: 12px; /* 增加圆角 */
  padding: 1.2rem; /* 增加内边距 */
  margin-bottom: 1.5rem; /* 增加外边距 */
  text-align: center;
  font-size: 1rem; /* 放大字体 */
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(63,191,90,.08);
  border-radius: 50%;
}

.footer {
  margin-top: 2rem; /* 增加外边距 */
  text-align: center;
  font-size: .95rem; /* 放大字体 */
  color: var(--muted);
}

.downloads-card .card-content {
  padding-top: .6rem; /* 增加内边距 */
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem; /* 增加间距 */
}

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

@media (max-width: 480px) {
  .download-grid {
    grid-template-columns: 1fr;
  }
}

.dl-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px; /* 增加圆角 */
  padding: 1.2rem; /* 增加内边距 */
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .6rem; /* 增加间距 */
}

.dl-icon {
  width: 56px; /* 放大图标 */
  height: 56px;
  border-radius: 14px; /* 增加圆角 */
  display: grid;
  place-items: center;
  background: var(--soft);
  border: 1px solid var(--border);
}

.dl-title {
  font-weight: 800;
  font-size: 1.15rem; /* 放大字体 */
  color: var(--text);
}

.dl-desc {
  font-size: .9rem; /* 放大字体 */
  color: var(--muted);
  min-height: 2.4em; /* 增加高度 */
}

.dl-btn {
  width: 100%;
  margin-top: .3rem; /* 增加外边距 */
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Latency dot style */
.domain-status {
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: .5rem; /* 增加间距 */
}

.lat-dot {
  width: 12px; /* 放大点 */
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  background: #d1d5db;
}

.lat-dot.green {
  background: #22c55e;
}

.lat-dot.red {
  background: #ef4444;
}

.lat-dot.amber {
  background: #f59e0b;
}

.lat-ms {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .2px;
}

/* QR popover */
.qr-popover {
  position: absolute;
  padding: 14px; /* 增加内边距 */
  border-radius: 14px; /* 增加圆角 */
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  pointer-events: none;
  box-sizing: border-box;
  overflow: visible;
}

.qr-popover .qr-head {
  font-size: 1rem; /* 放大字体 */
  color: var(--muted);
  margin: 6px 8px 8px 8px; /* 增加外边距 */
}

.qr-popover .qr-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-popover .qr-canvas, .qr-popover .qr-img {
  width: 140px; /* 放大二维码 */
  height: 140px;
  display: block;
  image-rendering: pixelated;
}

