/* IPv6 在线测试工具 - 页面专属样式 */

.result-section {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

/* 顶部状态栏 + 重测按钮 */
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-retry {
  padding: 8px 18px;
  font-size: 0.9rem;
}

/* 三栏测试卡片网格 */
.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.result-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.result-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}

.card-head h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-800);
}

/* 卡片顶部 IP 大字展示 */
.card-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  margin-bottom: 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

.hero-icon {
  font-size: 2rem;
  line-height: 1;
}

.hero-ip {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  word-break: break-all;
  text-align: center;
  line-height: 1.4;
}

/* 详情项网格 */
.result-detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 500;
}

.detail-value {
  font-size: 0.9rem;
  color: var(--gray-800);
  font-weight: 500;
  word-break: break-all;
  line-height: 1.4;
}

.detail-value.rtt-value {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* 状态徽标 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.loading {
  background: var(--gray-100);
  color: var(--gray-500);
}

.status-badge.loading .status-dot {
  animation: pulse 1.2s infinite ease-in-out;
}

.status-badge.success {
  background: #ecfdf5;
  color: var(--secondary);
}

.status-badge.error {
  background: #fef2f2;
  color: #ef4444;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* DNS 检测列表 */
.dns-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dns-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  gap: 12px;
}

.dns-info {
  flex: 1;
  min-width: 0;
}

.dns-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-800);
}

.dns-desc {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* DNS 单项徽标更紧凑 */
.dns-item .status-badge {
  padding: 3px 10px;
  font-size: 0.75rem;
}

/* 错误详情 */
.error-detail {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #ef4444;
  line-height: 1.6;
}

/* 免责声明 */
.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.6;
}

/* 响应式 */
@media (max-width: 900px) {
  .test-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .result-section {
    padding: 16px;
  }

  .result-card {
    padding: 16px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-detail {
    grid-template-columns: 1fr;
  }

  .hero-ip {
    font-size: 0.95rem;
  }

  .dns-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
