/**
 * 全局 CSS 变量定义
 * 统一管理所有页面的颜色、间距、阴影等设计 token
 */

:root {
    /* ========== 颜色系统 ========== */
    
    /* 主色调 */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-active: #3730a3;
    
    /* 强调色 */
    --accent-color: #3b82f6;
    --accent-color-hover: #2563eb;
    --secondary-color: #06b6d4;
    
    /* 背景色 */
    --header-bg-color: #1f2937;
    --content-bg-color: #f9fafb;
    --card-bg-color: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    /* 文字颜色 */
    --text-primary-color: #1f2937;
    --text-secondary-color: #6b7280;
    --text-heading-color: #111827;
    --text-muted: #9ca3af;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    
    /* 边框颜色 */
    --border-primary-color: #e5e7eb;
    --border-secondary-color: #d1d5db;
    --border-color: #e5e7eb;
    
    /* 状态颜色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    /* ========== 阴影系统 ========== */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* ========== 圆角系统 ========== */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;
    
    /* ========== 间距系统 ========== */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* ========== 字体系统 ========== */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-family-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
    
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 15px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 20px;
    --font-size-3xl: 24px;
    
    /* ========== 过渡动画 ========== */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* ========== Z-index 层级 ========== */
    --z-dropdown: 1000;
    --z-modal: 2000;
    --z-toast: 10000;
    --z-mobile-header: 99999;

    /* 页面背景（首页/主题切换） */
    --body-bg-color: #f9fafb;
    --text-link-color: #2563eb;
    --text-link-hover-color: #1d4ed8;
    --shadow-color-light: rgba(0, 0, 0, 0.1);
    --shadow-color-dark: rgba(0, 0, 0, 0.06);
}

/* 暗色主题（原 index.html 内联样式迁入） */
html.dark-theme,
body.dark-theme {
    --body-bg-color: #111827;
    --header-bg-color: #1f2937;
    --content-bg-color: #111827;
    --card-bg-color: #1f2937;
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    --text-primary-color: #d1d5db;
    --text-secondary-color: #9ca3af;
    --text-heading-color: #f9fafb;
    --text-primary: #d1d5db;
    --text-secondary: #9ca3af;
    --text-link-color: #60a5fa;
    --text-link-hover-color: #93c5fd;
    --border-primary-color: #374151;
    --border-secondary-color: #4b5563;
    --border-color: #374151;
    --shadow-color-light: rgba(0, 0, 0, 0.3);
    --shadow-color-dark: rgba(0, 0, 0, 0.2);
}
