/* ================================================================
   Earth API - 公开系统状态页样式
   明亮玻璃拟态风格，主色青色 #0EA5E9
   ================================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --st-bg: #f8fafc;
  --st-card-bg: rgba(255, 255, 255, 0.92);
  --st-card-border: rgba(226, 232, 240, 0.8);
  --st-card-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --st-card-shadow-hover: 0 8px 32px rgba(14, 165, 233, 0.12);
  --st-text: #0f172a;
  --st-text-secondary: #475569;
  --st-text-muted: #94a3b8;
  --st-primary: #0ea5e9;
  --st-primary-soft: rgba(14, 165, 233, 0.08);
  --st-success: #10b981;
  --st-warning: #f59e0b;
  --st-danger: #ef4444;
  --st-radius: 16px;
  --st-radius-sm: 12px;
  --st-transition: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  margin: 0;
  padding: 0;
}

.st-page {
  min-height: 100vh;
  background: var(--st-bg);
  color: var(--st-text);
  font-family: 'Outfit', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

.st-page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(14, 165, 233, 0.06) 0%, transparent 35%);
}

.st-main {
  position: relative;
  z-index: 1;
  padding: 48px 0 80px;
}

.st-container {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 0 28px;
}

/* 页面头部 */
.st-header {
  text-align: center;
  margin-bottom: 40px;
}

.st-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.05));
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: var(--st-primary);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);
}

.st-header-icon svg {
  width: 32px;
  height: 32px;
}

.st-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.st-subtitle {
  font-size: 1.05rem;
  color: var(--st-text-secondary);
  margin: 0 0 16px;
  line-height: 1.6;
}

.st-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--st-card-bg);
  border: 1px solid var(--st-card-border);
  box-shadow: var(--st-card-shadow);
  font-size: 0.875rem;
  color: var(--st-text-secondary);
}

.st-meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--st-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  animation: st-pulse 2s ease-in-out infinite;
}

@keyframes st-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

/* 摘要卡片 */
.st-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.st-summary-card {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--st-radius);
  background: var(--st-card-bg);
  border: 1px solid var(--st-card-border);
  box-shadow: var(--st-card-shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--st-transition), box-shadow 0.35s var(--st-transition);
  overflow: hidden;
}

.st-summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--st-primary), #38bdf8);
  opacity: 0.8;
}

.st-summary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--st-card-shadow-hover);
}

.st-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--st-radius-sm);
  background: var(--st-primary-soft);
  color: var(--st-primary);
}

.st-summary-icon svg {
  width: 22px;
  height: 22px;
}

.st-summary-label {
  font-size: 0.9rem;
  color: var(--st-text-secondary);
  margin-bottom: 8px;
}

.st-summary-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--st-text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* 模型状态区域 */
.st-section {
  border-radius: var(--st-radius);
  background: var(--st-card-bg);
  border: 1px solid var(--st-card-border);
  box-shadow: var(--st-card-shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.st-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--st-card-border);
  flex-wrap: wrap;
  gap: 12px;
}

.st-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.st-section-title svg {
  width: 22px;
  height: 22px;
  color: var(--st-primary);
}

.st-section-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--st-text-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
}

.st-table-wrap {
  overflow-x: auto;
}

.st-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.st-table thead {
  background: rgba(248, 250, 252, 0.8);
}

.st-table th,
.st-table td {
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid var(--st-card-border);
}

.st-table th {
  font-weight: 600;
  color: var(--st-text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.st-table tbody tr {
  transition: background-color 0.2s ease;
}

.st-table tbody tr:hover {
  background: rgba(14, 165, 233, 0.03);
}

.st-table tbody tr:last-child td {
  border-bottom: none;
}

.st-model-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--st-text);
}

.st-model-icon-wrap {
  --st-brand-color: 14, 165, 233;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(var(--st-brand-color), 0.1);
  border: 1px solid rgba(var(--st-brand-color), 0.25);
  color: rgb(var(--st-brand-color));
  box-shadow: 0 0 16px rgba(var(--st-brand-color), 0.22);
  flex-shrink: 0;
  overflow: hidden;
}

.st-model-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.st-model-icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgb(var(--st-brand-color));
}

.st-number {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* 成功率徽章 */
.st-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.st-rate-high {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.st-rate-mid {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.st-rate-low {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

.st-rate-bar {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.3;
}

/* 空状态 */
.st-empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--st-text-secondary);
}

.st-empty svg {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  color: var(--st-text-muted);
  opacity: 0.7;
}

.st-empty p {
  margin: 0;
  font-size: 1rem;
}

/* 错误/加载提示 */
.st-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 2000;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--st-text);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transition: transform 0.35s var(--st-transition), opacity 0.35s ease;
  pointer-events: none;
}

.st-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 响应式 */
@media (max-width: 900px) {
  .st-main {
    padding: 32px 0 64px;
  }

  .st-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .st-summary-card {
    padding: 22px 20px;
  }

  .st-summary-value {
    font-size: 1.55rem;
  }

  .st-table th,
  .st-table td {
    padding: 14px 18px;
  }
}

@media (max-width: 640px) {
  .st-container {
    padding: 0 16px;
  }

  .st-summary {
    grid-template-columns: 1fr;
  }

  .st-section-header {
    padding: 20px;
  }

  .st-table th,
  .st-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .st-model-name {
    gap: 8px;
  }

  .st-rate {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .st-title {
    font-size: 1.75rem;
  }

  .st-subtitle {
    font-size: 0.95rem;
  }

  .st-summary-value {
    font-size: 1.4rem;
  }
}
