/* =========================================================================
   VPNSort · home.css
   首页专属:SVG 精灵容器、线路参考状态组件、区块辅助类。
   所有颜色 / 圆角 / 阴影一律引用 base.css 的 :root 令牌。
   ========================================================================= */

/* ---------- sprite 容器 ---------- */

.sprite{
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}

/* ---------- 线路参考状态(servers.js 注入的内容容器) ---------- */

.server-status{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 12px;
  padding:14px;
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--r-card);
  box-shadow:var(--shadow-soft);
}

.server-status:empty{display:none}

/* 若脚手架把行包在一层容器里,让容器撑满并自行分两列 */
#server-status > div:not(.srv-row){
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 12px;
  min-width:0;
}

.srv-row{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  padding:8px 10px;
  border-radius:var(--r-sm);
  background:var(--bg-panel2);
  border:1px solid var(--border-soft);
}

.srv-dot{
  width:6px;
  height:6px;
  flex:0 0 auto;
  border-radius:50%;
  background:var(--success);
  box-shadow:0 0 0 3px var(--success-a14);
  animation:srvBreath 3.4s ease-in-out infinite;
}

@keyframes srvBreath{
  0%,100%{opacity:1}
  50%{opacity:.42}
}

.srv-flag{
  width:20px;
  height:14px;
  flex:0 0 auto;
  border-radius:3px;
  box-shadow:0 0 0 1px var(--ink-a12);
}

.srv-name{
  min-width:0;
  font-size:12.5px;
  font-weight:600;
  color:var(--text);
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.srv-type{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  height:20px;
  padding:0 7px;
  border-radius:var(--r-pill);
  background:var(--accent-a08);
  color:var(--accent);
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.04em;
  white-space:nowrap;
}

.srv-ms{
  margin-left:auto;
  flex:0 0 auto;
  font-family:var(--font-mono);
  font-size:11px;
  font-variant-numeric:tabular-nums;
  color:var(--text);
  white-space:nowrap;
}

.srv-bw{
  flex:0 0 auto;
  font-family:var(--font-mono);
  font-size:11px;
  font-variant-numeric:tabular-nums;
  color:var(--text-muted);
  white-space:nowrap;
}

/* ---------- 区块辅助 ---------- */

.route-note{
  margin:var(--space-5) 0 0;
  max-width:var(--reading-max);
  font-size:14px;
  line-height:1.75;
  color:var(--text-muted);
}

.status-block{margin-top:var(--space-6)}
.status-block h3{margin:0}

.status-note{
  margin:0;
  max-width:72ch;
  font-size:12.5px;
  line-height:1.7;
  color:var(--text-muted);
}

.traffic-block{margin-top:var(--space-6)}
.traffic-block h3{margin:0 0 var(--space-2)}

.traffic-note{
  margin:0 0 var(--space-4);
  font-size:13px;
  line-height:1.7;
  color:var(--text-muted);
}

.section-foot{
  margin:var(--space-5) 0 0;
}

.more-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:24px;
  font-size:13.5px;
  font-weight:600;
  color:var(--accent);
  text-decoration:none;
}

.more-link:hover{
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
}

/* ---------- 响应式 ---------- */

@media (max-width:900px){
  .server-status,
  #server-status > div:not(.srv-row){
    grid-template-columns:minmax(0,1fr);
  }
}

@media (max-width:480px){
  .srv-bw{display:none}
  .server-status{padding:10px}
  .srv-row{padding:7px 8px;gap:6px}
}

@media (prefers-reduced-motion:reduce){
  .srv-dot{animation:none}
}