/**
 * HAMA 全局 CSS 变量
 * 统一设计系统的颜色、间距、动画等基础变量
 */

:root {
  /* ===== 品牌色 ===== */
  --nvidia-green: #76B900;
  --nvidia-green-dark: #5a8f00;
  --nvidia-green-light: #9dd929;
  --nvidia-green-alpha-10: rgba(118, 185, 0, 0.1);
  --nvidia-green-alpha-20: rgba(118, 185, 0, 0.2);
  --nvidia-green-alpha-30: rgba(118, 185, 0, 0.3);

  /* ===== 背景色 ===== */
  --bg-light: #ffffff;
  --bg-dark: #1a1a1a;
  --surface-light: #f8f9fa;
  --surface-dark: #2a2a2a;
  --surface-card: #ffffff;

  /* ===== 边框 ===== */
  --border-light: #e0e0e0;
  --border-medium: #d0d0d0;
  --border-dark: #404040;

  /* ===== 文字颜色 ===== */
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --text-on-dark: #ffffff;
  --text-on-green: #ffffff;

  /* ===== 间距系统 ===== */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 100px;
  --space-3xl: 160px;

  /* ===== 圆角 ===== */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ===== 阴影 ===== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);

  /* ===== 品牌色阴影 ===== */
  --shadow-green-sm: 0 0 20px rgba(118, 185, 0, 0.2);
  --shadow-green-md: 0 0 30px rgba(118, 185, 0, 0.3);
  --shadow-green-lg: 0 0 40px rgba(118, 185, 0, 0.4);
  --shadow-green-xl: 0 0 60px rgba(118, 185, 0, 0.6);

  /* ===== 动画时长 ===== */
  --duration-instant: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;

  /* ===== 缓动函数 ===== */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);      /* 出场 */
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);       /* 入场 */
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);  /* 进出 */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1); /* 弹跳 */

  /* ===== Z-index层级 ===== */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 100;
  --z-fixed: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-tooltip: 600;

  /* ===== 断点（参考，实际在媒体查询中使用） ===== */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* ===== 字体 ===== */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

  /* ===== 字体大小 ===== */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;
  --text-6xl: 60px;
  --text-7xl: 72px;

  /* ===== 行高 ===== */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* ===== 字重 ===== */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* ===== 最大宽度 ===== */
  --max-width-prose: 65ch;
  --max-width-content: 1200px;
  --max-width-wide: 1400px;
  --max-width-full: 1600px;
}

/* ===== 深色模式支持（可选） ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #1a1a1a;
    --bg-dark: #0a0a0a;
    --surface-light: #2a2a2a;
    --surface-dark: #1a1a1a;
    --surface-card: #2a2a2a;

    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;

    --border-light: #404040;
    --border-medium: #505050;
    --border-dark: #606060;
  }
}

/* ===== 减少动画（无障碍） ===== */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-instant: 0ms;
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
    --duration-slower: 0ms;
  }
}
