/* 核心字体引入 (原 css.css 内容提炼) */
@font-face {
  font-family: 'Capriola';
  font-style: normal;
  font-weight: 400;
  src: url(../font/wXKoE3YSppcvo1PDlk_1JeEAn38zjdk.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Capriola';
  font-style: normal;
  font-weight: 400;
  src: url(../font/wXKoE3YSppcvo1PDlk_7JeEAn38z.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 全局主题变量池 (融合主页与软件库的清透蓝粉色彩) */
:root {
  /* 背景色与渐变 */
  --page-bg: linear-gradient(120deg, #f7cddb, #add2f1);
  --bg-gradient: var(--page-bg);
  
  /* 玻璃拟物化核心变量 */
  --glass-bg: rgba(255, 255, 255, 0.4); 
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  --glass-hover-bg: rgba(255, 255, 255, 0.6);
  
  /* 文本与强调色 */
  --text-main: #1d1d1f;
  --text-muted: #515154;
  --primary-color: #6366f1;
  
  /* 兼容主页旧变量命名 */
  --dark-mode-body: var(--glass-bg);
  --dark-mode-text-color: #141414;
  
  /* 昼夜切换按钮图标变量 (纯代码太阳图标) */
  --theme-toggle-x: 0px;
  --theme-toggle-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='5'/><path d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/></svg>");
}

/* 暗黑模式状态 (兼容 html.dark-mode 和 [data-theme="dark"] 两种触发器) */
html.dark-mode, 
[data-theme="dark"] {
  /* 深色暗夜蓝粉 */
  --page-bg: linear-gradient(120deg, #6c4251, #3a5670);
  --bg-gradient: var(--page-bg);
  
  --glass-bg: rgba(30, 32, 43, 0.45);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-hover-bg: rgba(255, 255, 255, 0.15);
  
  --text-main: #f5f5f7;
  --text-muted: #a1a1a6;
  --primary-color: #818cf8;
  
  --dark-mode-body: var(--glass-bg);
  --dark-mode-text-color: rgb(245, 245, 245);
  
  /* 昼夜切换按钮图标变量 (纯代码月亮图标) */
  --theme-toggle-x: 15px; 
  --theme-toggle-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fbbf24' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/></svg>");
}

/* 基础重置与全局通配 */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent; 
}

/* 彻底隐藏各浏览器滚动条 */
html { 
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}
html::-webkit-scrollbar, 
::-webkit-scrollbar { 
  display: none; 
}

/* 统一的基础 Body 属性 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  /* 支持移动端高度适配 */
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  /* 默认直接绑定变量，享受丝滑渐变过渡 */
  background: var(--page-bg) !important;
  transition: background 1.5s ease, color 0.5s ease;
}