/**
 * Grand Archive 设计系统 - CSS 变量
 * 为后期架构重构准备的统一设计规范
 */

:root {
  /* ===== 主色调 ===== */
  --color-primary: #667eea;
  --color-primary-dark: #764ba2;
  --color-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  /* ===== 功能色 ===== */
  --color-success: #52c41a;
  --color-warning: #faad14;
  --color-error: #ff4d4f;
  --color-info: #1890ff;

  /* ===== 价格涨跌语义 ===== */
  /* 亚洲市场习惯：价格上涨使用红色，价格下跌使用绿色；不要复用 success/error。 */
  --price-rise-color: #ff4d4f;
  --price-fall-color: #52c41a;
  --price-neutral-color: #94a3b8;
  
  /* ===== 中性色 ===== */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e0e0e0;
  --color-gray-300: #c0c0c0;
  --color-gray-400: #888888;
  --color-gray-500: #666666;
  --color-gray-600: #444444;
  --color-gray-700: #333333;
  --color-gray-800: #222222;
  --color-gray-900: #111111;
  
  /* ===== 背景色 ===== */
  --bg-primary: #0a0a0f;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --bg-modal: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --bg-overlay: rgba(0, 0, 0, 0.7);
  
  /* ===== 文字色 ===== */
  --text-primary: #ffffff;
  --text-secondary: #c0c0c0;
  --text-tertiary: #888888;
  --text-muted: #666666;
  --text-link: #667eea;
  --text-link-hover: #764ba2;
  --text-gold: #ffd700;
  
  /* ===== 边框 ===== */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 15px;
  --border-radius-xl: 20px;
  
  /* ===== 阴影 ===== */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 10px 30px rgba(102, 126, 234, 0.4);
  
  /* ===== 间距 ===== */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* ===== 字体 ===== */
  --font-family-base: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-heading: 'Cinzel', serif;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* ===== 层级 ===== */
  --z-index-dropdown: 100;
  --z-index-sticky: 200;
  --z-index-modal: 1000;
  --z-index-popover: 1100;
  --z-index-tooltip: 1200;
  
  /* ===== 过渡 ===== */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* ===== 弹窗 ===== */
  --modal-width: 90%;
  --modal-max-width: 400px;
  --modal-max-width-lg: 480px;
  --modal-padding: 40px;
  --modal-border-radius: 20px;
  
  /* ===== 按钮 ===== */
  --btn-height: 44px;
  --btn-padding: 0 24px;
  --btn-border-radius: 10px;
  --btn-font-size: 14px;
  --btn-font-weight: 600;
  
  /* ===== 输入框 ===== */
  --input-height: 48px;
  --input-padding: 15px;
  --input-border-radius: 10px;
  --input-border-color: rgba(255, 255, 255, 0.2);
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-bg-focus: rgba(255, 255, 255, 0.1);
  
  /* ===== 布局宽度令牌 ===== */
  --layout-wide-max-width: 1600px;
  --layout-narrow-max-width: 800px;
}

/* ===== 响应式变量 ===== */
@media (max-width: 768px) {
  :root {
    --modal-padding: 25px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --font-size-2xl: 20px;
    --font-size-3xl: 24px;
  }
}

@media (max-width: 480px) {
  :root {
    --modal-padding: 20px;
    --btn-padding: 0 16px;
    --input-padding: 12px;
  }
}
