/* ============================================
   数据中心一体化监控系统 - 设计令牌
   ============================================ */

:root {
  /* ---------- 背景 ---------- */
  --bg-void:       #05101c;   /* 最深底 */
  --bg-base:       #08131f;   /* 主背景 */
  --bg-surface:    #0c1d2e;   /* 一级容器 */
  --bg-raised:     #102a3f;   /* 提升容器 */
  --bg-glass:      rgba(14, 35, 56, 0.55);

  /* ---------- 主色 (青) ---------- */
  --cyan-900:      #062a35;
  --cyan-700:      #0c5a6e;
  --cyan-500:      #22d3ee;
  --cyan-400:      #55e3f5;
  --cyan-300:      #7ce8ff;
  --cyan-glow:     rgba(34, 211, 238, 0.45);

  /* ---------- 辅色 ---------- */
  --green-500:     #34d399;
  --green-glow:    rgba(52, 211, 153, 0.45);
  --amber-500:     #f59e0b;
  --amber-glow:    rgba(245, 158, 11, 0.45);
  --red-500:       #ef4444;
  --red-glow:      rgba(239, 68, 68, 0.45);
  --violet-500:    #a78bfa;
  --violet-glow:   rgba(167, 139, 250, 0.45);

  /* ---------- 文字 ---------- */
  --text-primary:   #e6f4f9;
  --text-secondary: #98b4c7;
  --text-tertiary:  #5c7a90;
  --text-disabled:  #3a566b;

  /* ---------- 线条 ---------- */
  --line-hair:   rgba(34, 211, 238, 0.12);
  --line-soft:   rgba(34, 211, 238, 0.22);
  --line-base:   rgba(34, 211, 238, 0.4);
  --line-strong: rgba(34, 211, 238, 0.7);

  /* ---------- 阴影 / 发光 ---------- */
  --glow-cyan-sm: 0 0 8px rgba(34, 211, 238, 0.3);
  --glow-cyan-md: 0 0 16px rgba(34, 211, 238, 0.35);
  --glow-cyan-lg: 0 0 32px rgba(34, 211, 238, 0.4);
  --shadow-inset: inset 0 0 40px rgba(34, 211, 238, 0.04);

  /* ---------- 尺寸 ---------- */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 6px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* ---------- 字体 ---------- */
  --f-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --f-display: 'Rajdhani', 'Orbitron', sans-serif;
  --f-mono: 'JetBrains Mono', 'Consolas', monospace;

  --fs-xs: 10px;
  --fs-sm: 12px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 28px;
  --fs-3xl: 40px;
  --fs-4xl: 56px;
}

/* ---------- 全局基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--f-sans);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

/* ---------- 可复用：扫描底纹 ---------- */
.grid-bg {
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.dots-bg {
  background-image: radial-gradient(rgba(34, 211, 238, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
}

.radial-glow {
  background:
    radial-gradient(ellipse at center top, rgba(34, 211, 238, 0.08), transparent 60%),
    radial-gradient(ellipse at center bottom, rgba(52, 211, 153, 0.05), transparent 60%),
    var(--bg-base);
}

/* ---------- 关键帧 ---------- */
@keyframes scan-y {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@keyframes rotate-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes blink {
  0%, 60%, 100% { opacity: 1; }
  30% { opacity: 0.2; }
}
@keyframes bar-up {
  from { height: 0; }
}
@keyframes number-count {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb {
  background: var(--line-base);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--cyan-500); }
