/** * 全局主题变量定义 * 支持浅色和深色两种模式 */ /* 浅色模式变量 */ page { /* 微信标准色 */ --theme-wx: #07C160; /* === 背景色 === */ --theme-bg-primary: #FFF; --theme-bg-secondary: #F5F5F5; --theme-bg-card: #FFF; --theme-bg-journal: #FFF2C8; --theme-bg-overlay: rgba(0, 0, 0, .1); --theme-bg-menu: rgba(255, 255, 255, .95); /* === 文字颜色 === */ --theme-text-primary: #333; --theme-text-secondary: #777; --theme-text-tertiary: #999; --theme-text-disabled: #CCC; /* === 边框颜色 === */ --theme-border-light: rgba(0, 0, 0, .1); --theme-border-medium: rgba(0, 0, 0, .2); --theme-border-dark: rgba(0, 0, 0, .8); /* === 阴影颜色 === */ --theme-shadow-light: rgba(0, 0, 0, .1); --theme-shadow-medium: rgba(0, 0, 0, .2); --theme-shadow-dark: rgba(0, 0, 0, .3); /* === 品牌色(不随主题改变) === */ --theme-brand-gao: #FF7A9B; --theme-brand-yeyu: #7A9BFF; --theme-brand-gao-light: #FFB5C7; --theme-brand-gao-dark: #FF3A6B; /* === 功能色 === */ --theme-error: #E64340; --theme-success: #07C160; --theme-warning: #FFC107; /* === 纸张纹理效果 === */ --theme-texture-light: rgba(255, 255, 255, 0); --theme-texture-bright: rgba(255, 255, 255, .3); --theme-texture-line: rgba(0, 0, 0, .03); /* === 视频播放按钮 === */ --theme-video-play: rgba(255, 255, 255, .9); /* 内容颜色 */ --theme-content-rain: rgb(108, 221, 255, .7); } /* 深色模式变量 */ @media (prefers-color-scheme: dark) { page { /* 微信标准色 */ --theme-wx: #07C160; /* === 背景色 === */ --theme-bg-primary: #1A1A1A; --theme-bg-secondary: #2A2A2A; --theme-bg-card: #2C2C2C; --theme-bg-journal: #3A3A2E; --theme-bg-overlay: rgba(0, 0, 0, .3); --theme-bg-menu: rgba(40, 40, 40, .95); /* === 文字颜色 === */ --theme-text-primary: #FFF; --theme-text-secondary: #AAA; --theme-text-tertiary: #888; --theme-text-disabled: #666; /* === 边框颜色 === */ --theme-border-light: rgba(255, 255, 255, .1); --theme-border-medium: rgba(255, 255, 255, .2); --theme-border-dark: rgba(255, 255, 255, .6); /* === 阴影颜色 === */ --theme-shadow-light: rgba(0, 0, 0, .3); --theme-shadow-medium: rgba(0, 0, 0, .5); --theme-shadow-dark: rgba(0, 0, 0, .7); /* === 品牌色保持不变 === */ /* === 功能色保持不变 === */ /* === 纸张纹理效果(深色模式调整) === */ --theme-texture-light: rgba(0, 0, 0, 0); --theme-texture-bright: rgba(255, 255, 255, .05); --theme-texture-line: rgba(255, 255, 255, .02); /* === 视频播放按钮 === */ --theme-video-play: rgba(200, 200, 200, .8); /* 内容颜色 */ --theme-content-rain: rgba(235, 250, 255, .7); } }