/* ============================================
   AegisX - CSS Variables & Design Tokens
   全局CSS变量与设计令牌
   ============================================ */

:root {
  /* ========== 颜色系统 - 暗色主题 ========== */
  --primary: #00d4ff;
  --primary-hover: #00b8e0;
  --primary-light: rgba(0, 212, 255, 0.15);
  --primary-glow: rgba(0, 212, 255, 0.3);

  --secondary: #7c5cfc;
  --secondary-hover: #6a4ae8;
  --secondary-light: rgba(124, 92, 252, 0.15);

  --accent: #ff6b6b;
  --accent-hover: #e55a5a;

  --success: #00e676;
  --success-light: rgba(0, 230, 118, 0.15);
  --warning: #ffab40;
  --warning-light: rgba(255, 171, 64, 0.15);
  --danger: #ff5252;
  --danger-light: rgba(255, 82, 82, 0.15);
  --info: #448aff;
  --info-light: rgba(68, 138, 255, 0.15);

  /* 背景色系 */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2236;
  --bg-card: rgba(26, 34, 54, 0.8);
  --bg-card-hover: rgba(30, 40, 60, 0.9);
  --bg-glass: rgba(17, 24, 39, 0.7);
  --bg-overlay: rgba(0, 0, 0, 0.6);

  /* 文字色系 */
  --text-primary: #e8eaed;
  --text-secondary: #a0aab4;
  --text-muted: #6b7280;
  --text-inverse: #0a0e17;

  /* 边框色系 */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-active: rgba(0, 212, 255, 0.3);

  /* ========== 排版 ========== */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial,
    sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono',
    'Courier New', monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* ========== 间距系统 (4px基准) ========== */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ========== 圆角 ========== */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ========== 阴影 ========== */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow-primary: 0 0 20px rgba(0, 212, 255, 0.3);
  --shadow-glow-secondary: 0 0 20px rgba(124, 92, 252, 0.3);
  --shadow-glow-success: 0 0 20px rgba(0, 230, 118, 0.3);

  /* ========== 过渡动画 ========== */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* ========== 布局 ========== */
  --container-max: 1280px;
  --container-narrow: 960px;
  --container-wide: 1440px;
  --header-height: 70px;

  /* ========== Z-index层级 ========== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-header: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;
  --z-loading: 800;

  /* ========== 响应式断点参考 (用于JS) ========== */
  /* 不直接用作CSS断点，仅文档说明 */
  /* --bp-mobile: 480px; */
  /* --bp-tablet: 768px; */
  /* --bp-laptop: 1024px; */
  /* --bp-desktop: 1280px; */
  /* --bp-wide: 1440px; */
}

/* ========== 亮色主题 (可选切换) ========== */
[data-theme="light"] {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8ecf1;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass: rgba(255, 255, 255, 0.8);

  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #a0aec0;
  --text-inverse: #ffffff;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.12);
  --border-active: rgba(0, 212, 255, 0.5);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
}
