/* 
 * Naibabiji 现代极简主义设计系统 v1.0
 * 
 * 描述：WordPress主题统一设计规范CSS变量定义
 * 用法：在页面CSS文件顶部引入 @import url('./design-system.css');
 * 更新：2025年1月
 */

:root {
  /* ====================================
   * 主色系 (Primary Colors)
   * ==================================== */
  --primary-brand: #0A2463;          /* 主品牌色 - 深蓝色专业感 */
  --primary-brand-dark: #081d50;     /* 品牌色暗版 - 悬停状态 */
  --primary-brand-rgb: 10, 36, 99;   /* 主品牌色RGB值 */
  --accent-cta: #FF6B6B;            /* 强调色 - 珊瑚红CTA */
  --accent-cta-rgb: 255, 107, 107;  /* 强调色RGB值 */
  
  /* ====================================
   * 功能色系 (Functional Colors)
   * ==================================== */
  --success-green: #48BB78;          /* 成功绿色 */
  --success-green-rgb: 72, 187, 120; /* 成功绿色RGB值 */
  --warning-orange: #ED8936;         /* 警告橙色 */
  --warning-orange-rgb: 237, 137, 54; /* 警告橙色RGB值 */
  --error-red: #F56565;             /* 错误红色 */
  --error-red-rgb: 245, 101, 101;   /* 错误红色RGB值 */
  --info-blue: #4299E1;            /* 信息蓝色 */
  --info-blue-rgb: 66, 153, 225;    /* 信息蓝色RGB值 */
  
  /* ====================================
   * 文字色阶 (Text Colors)
   * ==================================== */
  --text-primary: #2D3748;           /* 一级文字 - 标题重要内容 */
  --text-secondary: #4A5568;         /* 二级文字 - 正文内容 */
  --text-tertiary: #718096;          /* 三级文字 - 辅助信息 */
  --text-muted: #A0AEC0;            /* 静音文字 - 占位符 */
  
  /* ====================================
   * 背景色系统 (Background Colors)
   * ==================================== */
  --bg-primary: #FFFFFF;             /* 主背景色 */
  --bg-secondary: #F5F7FA;           /* 次级背景色 - 区块分隔 */
  --bg-secondary-rgb: 245, 247, 250; /* 次级背景色RGB - 用于透明效果 */
  --bg-card: #FFFFFF;               /* 卡片背景色 */
  --bg-overlay: rgba(45, 55, 72, 0.6); /* 遮罩背景 */
  
  /* ====================================
   * 边框色系统 (Border Colors)
   * ==================================== */
  --border-light: #E2E8F0;           /* 浅边框 - 卡片分割 */
  --border-medium: #CBD5E0;          /* 中等边框 - 表单强调 */
  --border-dark: #A0AEC0;           /* 深边框 - 重要分割 */
  
  /* ====================================
   * 字体系统 (Typography System)
   * ==================================== */
  --font-primary: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', Consolas, 'Source Han Sans SC', 'Noto Sans CJK SC', monospace;
  
  /* 字体大小比例 (基于1rem = 16px) */
  --text-xs: 0.75rem;                /* 12px - 微小文字 */
  --text-sm: 0.875rem;               /* 14px - 小文字 */
  --text-base: 1rem;                 /* 16px - 基础文字 */
  --text-lg: 1.125rem;               /* 18px - 大文字 */
  --text-xl: 1.25rem;                /* 20px - 特大文字 */
  --text-2xl: 1.5rem;                /* 24px - H3标题 */
  --text-3xl: 1.875rem;              /* 30px - H2标题 */
  --text-4xl: 2.25rem;               /* 36px - H1标题 */
  --text-5xl: 3rem;                  /* 48px - 超大标题 */
  
  /* ====================================
   * 间距系统 (Spacing System) - 8px网格
   * ==================================== */
  --space-1: 0.25rem;                /* 4px - 超小间距 */
  --space-2: 0.5rem;                 /* 8px - 小间距 */
  --space-3: 0.75rem;                /* 12px - 中小间距 */
  --space-4: 1rem;                   /* 16px - 标准间距 */
  --space-5: 1.25rem;                /* 20px - 中等间距 */
  --space-6: 1.5rem;                 /* 24px - 大间距 */
  --space-8: 2rem;                   /* 32px - 较大间距 */
  --space-10: 2.5rem;                /* 40px - 大间距 */
  --space-12: 3rem;                  /* 48px - 超大间距 */
  --space-16: 4rem;                  /* 64px - 内容区块间距 */
  --space-20: 5rem;                  /* 80px - 大区块间距 */
  --space-24: 6rem;                  /* 96px - 页面区段间距 */
  --space-32: 8rem;                  /* 128px - 页面大区段 */
  
  /* ====================================
   * 圆角系统 (Border Radius)
   * ==================================== */
  --radius-sm: 4px;                  /* 小圆角 - 标签按钮 */
  --radius-md: 6px;                  /* 中圆角 - 表单元素 */
  --radius-lg: 8px;                  /* 大圆角 - 一般按钮 */
  --radius-xl: 12px;                 /* 超大圆角 - 卡片容器 */
  --radius-2xl: 16px;                /* 特大圆角 - 大容器 */
  --radius-3xl: 24px;                /* 超特大圆角 */
  --radius-full: 9999px;             /* 完全圆角 - 头像徽章 */
  
  /* ====================================
   * 阴影系统 (Box Shadow)
   * ==================================== */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* 组合阴影 - 更自然的层次感 */
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* ====================================
   * 过渡动画系统 (Transition System)
   * ==================================== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 缓动函数 */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* ====================================
   * 布局系统 (Layout System) - 多栏/单栏分离
   * ==================================== */
  /* 多栏容器变量（带侧边栏的页面）*/
  --container-multi-column-base: 1200px;     /* <1440px 基础宽度 */
  --container-multi-column-lg: 1400px;       /* 1440-1599px 大屏宽度 */
  --container-multi-column-xl: 1500px;       /* 1920-2559px 超大屏宽度 */
  --container-multi-column-4k: 1600px;       /* ≥2560px 4K屏宽度 */
  
  /* 单栏容器变量（无侧边栏的页面）*/
  --container-single-column-base: 750px;     /* <1440px 基础宽度 */
  --container-single-column-lg: 800px;       /* ≥1440px 固定宽度 */
  
  /* 容器通用设置 */
  --container-padding: 1rem;                 /* 避免贴边的内边距 */
  --container-min-width: 320px;              /* 最小宽度限制 */
  
  /* 4K屏幕特殊内边距 */
  --container-4k-padding: 2vw;               /* ≥2560px 屏幕的动态内边距 */
  
  /* 响应式断点 */
  --breakpoint-sm: 640px;            /* 小屏幕 */
  --breakpoint-md: 768px;            /* 中等屏幕 */
  --breakpoint-lg: 1024px;           /* 大屏幕 */
  --breakpoint-xl: 1280px;           /* 超大屏幕 */
  --breakpoint-2xl: 1600px;          /* 超超大屏幕 */
  --breakpoint-4k: 1920px;           /* 4K屏幕优化 */
  
  /* 响应式工具类（可在各CSS文件中使用） */
  --media-sm: (min-width: 640px);
  --media-md: (min-width: 768px);
  --media-lg: (min-width: 1024px);
  --media-xl: (min-width: 1280px);
  --media-2xl: (min-width: 1600px);
  --media-4k: (min-width: 1920px);
  
  /* ====================================
   * 语义化间距别名 (Semantic Spacing)
   * ==================================== */
  --spacing-content: var(--space-16);    /* 内容区块间距 */
  --spacing-section: var(--space-24);    /* 页面区段间距 */
  --spacing-card: var(--space-8);        /* 卡片内边距 */
  --spacing-button: var(--space-4) var(--space-8); /* 按钮内边距 */
  --spacing-form: var(--space-6);        /* 表单元素间距 */
  
  /* ====================================
   * Z-Index 层级系统 (Z-Index Scale)
   * ==================================== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;
  
  
}

/* ====================================
 * 全局基础样式重置 (Global Base Styles)
 * ==================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 标题层级规范 */
h1, .h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0;
}

h2, .h2 {
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0;
}

h3, .h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}

h4, .h4 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}

h5, .h5 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}

h6, .h6 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}

/* 正文排版规范 */
p, .text {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.text-large {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-small {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-tertiary);
}

.text-caption {
  font-size: var(--text-xs);
  line-height: 1.4;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* ====================================
 * 标准组件样式 (Standard Components)
 * ==================================== */

/* 容器组件 - 注释掉避免与layout.css冲突，由layout.css统一管理 */
/*
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
*/

/* 基础按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-primary);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  line-height: 1;
}

.btn:focus {
  outline: 2px solid var(--primary-brand);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary-brand);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
  text-decoration: none;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--accent-cta);
  color: white;
}

.btn-secondary:hover {
  background: #e85555;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary-brand);
  border: 2px solid var(--primary-brand);
}

.btn-outline:hover {
  background: var(--primary-brand);
  color: white;
  text-decoration: none;
}

/* 基础卡片组件 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--spacing-card);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-brand);
}

.card-header {
  margin-bottom: var(--space-6);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: 1.4;
}

.card-content {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 网格系统 */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-responsive {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ====================================
 * 工具类样式 (Utility Classes)
 * ==================================== */

/* 文字颜色工具类 */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary { color: var(--text-tertiary) !important; }
.text-muted { color: var(--text-muted) !important; }

/* 背景色工具类 */
.bg-primary { background: var(--bg-primary) !important; }
.bg-secondary { background: var(--bg-secondary) !important; }
.bg-card { background: var(--bg-card) !important; }

/* 间距工具类 */
.m-0 { margin: 0 !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }

.p-4 { padding: var(--space-4) !important; }
.p-6 { padding: var(--space-6) !important; }
.p-8 { padding: var(--space-8) !important; }

/* 显示工具类 */
.hidden { display: none !important; }
.block { display: block !important; }
.flex { display: flex !important; }
.grid { display: grid !important; }

/* 文本对齐 */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* ====================================
 * 通用高亮文本样式 (Universal Highlight)
 * ==================================== */
.highlight {
  background: linear-gradient(120deg, var(--accent-cta) 0%, var(--accent-cta) 100%);
  background-size: 100% 0.3em;
  background-repeat: no-repeat;
  background-position: 0 88%;
  color: var(--text-primary);
  font-weight: 600;
  padding: 0 var(--space-1);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.highlight:hover {
  background-size: 100% 100%;
  color: white !important;
} 