/* 基础重置 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 背景 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0a0e17;
  color: #c8d6e5;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(16, 185, 129, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(56, 189, 248, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px 40px;
}

/* 头部 */
header {
  text-align: center;
  margin-bottom: 48px;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.05em;
}

.subtitle {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #64748b;
}

/* 节点卡片网格 */
.nodes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .nodes-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* 卡片样式 */
.node-card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 16px;
  padding: 28px 24px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.node-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.06);
}

.node-card .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.node-card .node-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: #e2e8f0;
}

.node-card .node-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-item .label {
  font-size: 0.75rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-item .value {
  font-size: 0.95rem;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.info-item .value.online-text {
  color: #10b981;
}

.info-item .value.offline-text {
  color: #ef4444;
}

.node-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #64748b;
  font-style: italic;
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 60px 0;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(56, 189, 248, 0.15);
  border-top-color: #38bdf8;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

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

.loading p {
  color: #64748b;
  font-size: 0.9rem;
}

/* 错误提示 */
.error-msg {
  text-align: center;
  padding: 40px 20px;
  color: #ef4444;
  font-size: 0.95rem;
}

/* 底部声明 */
footer {
  margin-top: 60px;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(56, 189, 248, 0.08);
}

footer p {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.6;
}

/* 移动端微调 */
@media (max-width: 380px) {
  .container {
    padding: 40px 14px 30px;
  }
  h1 {
    font-size: 1.6rem;
  }
  .node-card {
    padding: 22px 18px;
  }
}
