/* ============================================================
   feai68 Design System v1.1
   东方智慧 AI 实验室 · 统一设计语言
   
   ⚠️ 定位：基础层（Foundation Layer）
   - 只提供 CSS 变量 + 工具类 + 响应式断点
   - 不强制覆盖 body 布局（各页面自行控制）
   - 各页面内联 <style> 作为覆盖层
   ============================================================ */

/* --- CSS 变量系统（不产生任何视觉副作用）--- */
:root {
  /* 品牌色 */
  --brand-purple: #e879f9;
  --brand-indigo: #818cf8;
  --brand-cyan: #38bdf8;
  --brand-gradient: linear-gradient(135deg, #e879f9, #818cf8, #38bdf8);
  
  /* 背景层次 */
  --bg-deep: #08080f;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  
  /* 文字层次 */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #c4b5fd;
  
  /* 边框/发光 */
  --border-subtle: rgba(255,255,255,0.06);
  --border-glow: rgba(232,121,249,0.3);
  --shadow-glow: 0 0 20px rgba(232,121,249,0.15);
  
  /* 字体系统 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 
               'Noto Sans SC', 'Microsoft YaHei', 'Helvetica Neue', 
               Arial, sans-serif;
  --font-serif: Georgia, 'Noto Serif SC', 'Source Han Serif SC', serif;
  --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;
  
  /* 字号阶梯（宝妈友好，比标准大 10%）*/
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  
  /* 行高（中文优化）*/
  --leading-tight: 1.4;
  --leading-normal: 1.7;
  --leading-relaxed: 1.9;
  
  /* 间距 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* 动画 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;
  
  /* 安全区域 */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- 轻量全局基础（不破坏任何现有布局）--- */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* --- 触摸优化（宝妈单手操作，仅设最小尺寸）--- */
button, [role="button"] {
  min-height: 44px;
}

input, select, textarea {
  font-size: max(16px, 1em); /* 防止 iOS 自动缩放 */
}

/* --- 工具类（opt-in，不自动生效）--- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--duration-normal) var(--ease-out);
}
.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- 响应式断点（仅通过变量调整，不强制 body padding）--- */
@media (max-width: 374px) {
  :root {
    --text-base: 1rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
  }
}

@media (min-width: 768px) {
  :root {
    --text-base: 1.125rem;
    --text-3xl: 2.5rem;
    --text-4xl: 3.25rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --text-base: 1.125rem;
    --text-3xl: 2.75rem;
    --text-4xl: 3.5rem;
  }
}

/* --- 无障碍 --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- 打印 --- */
@media print {
  body { background: white; color: black; }
}
