/* ============================================================
 * 公瑾AI技术笔记 — 主题系统（亮/暗双主题，墨蓝色）
 * CSS 变量驱动，所有页面共用
 * ============================================================ */

:root {
  /* 主色：墨蓝 */
  --color-primary: #1e3a5f;
  --color-primary-light: #2c5282;
  --color-primary-bg: #eef3fa;
  --color-accent: #4a90e2;
  --color-accent-soft: #d6e4f5;

  /* 文字 */
  --color-text: #1a1a2e;
  --color-text-soft: #555;
  --color-text-muted: #888;
  --color-text-placeholder: #b0bec5;

  /* 背景 */
  --color-bg: #f4f7fb;
  --color-bg-card: #ffffff;
  --color-bg-input: #f8fafd;

  /* 边框 */
  --color-border: #dfe6ed;
  --color-border-soft: #e8edf3;

  /* 状态色 */
  --color-success: #2e7d32;
  --color-warning: #e67e22;
  --color-danger: #e53935;
  --color-purple: #7b1fa2;

  /* 阴影 */
  --shadow-card: 0 2px 12px rgba(30, 58, 95, 0.08);
  --shadow-hover: 0 6px 20px rgba(30, 58, 95, 0.15);
  --shadow-button: 0 4px 14px rgba(30, 58, 95, 0.3);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 间距 */
  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 14px;
  --gap-lg: 20px;

  /* 字号 */
  --font-xs: 12px;
  --font-sm: 14px;
  --font-md: 16px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 28px;

  /* 布局 */
  --max-width: 480px;
  --header-bg: #1e3a5f;
  --header-text: #ffffff;
}

/* 暗色主题 */
[data-theme="dark"] {
  --color-primary: #4a90e2;
  --color-primary-light: #6ba5e8;
  --color-primary-bg: #1a2638;
  --color-accent: #5ca0f0;
  --color-accent-soft: #2c3e5a;

  --color-text: #e8eef5;
  --color-text-soft: #b8c5d6;
  --color-text-muted: #8896a8;
  --color-text-placeholder: #5a6878;

  --color-bg: #0f1620;
  --color-bg-card: #1a2638;
  --color-bg-input: #232f44;

  --color-border: #2c3e5a;
  --color-border-soft: #232f44;

  --color-success: #66bb6a;
  --color-warning: #ffa726;
  --color-danger: #ef5350;
  --color-purple: #ba68c8;

  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-button: 0 4px 14px rgba(74, 144, 226, 0.4);

  --header-bg: #0a1219;
  --header-text: #ffffff;
}

/* 主题切换过渡 */
* {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}