/* 王者Quant量化交易文档 - 现代科技风格字体美化 */

/* ==================== 字体导入 - 本地优化版 ==================== */
/* 移除Google Fonts，使用系统字体和本地字体 */

/* ==================== CSS变量定义 - 温暖米白风 ==================== */
:root {
  /* 温暖米白背景色系 */
  --warm-bg: #faf9f7;
  --card-bg: #ffffff;
  --secondary-bg: #f5f4f2;
  --border-color: #e8e6e3;
  
  /* 温和渐变色系 */
  --primary-gradient: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  --secondary-gradient: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  --accent-gradient: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  --warning-gradient: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  --code-gradient: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  
  /* 温和点缀色 */
  --primary-blue: #4a90e2;
  --warm-gold: #f39c12;
  --soft-green: #27ae60;
  --warm-red: #e74c3c;
  --glow: rgba(74, 144, 226, 0.2);
  
  /* 温暖文字色系 */
  --text-primary: #2c3e50;      /* 深蓝灰 - 主文字 */
  --text-secondary: #5d6d7e;    /* 中灰 - 次要文字 */
  --text-muted: #85929e;        /* 浅灰 - 辅助文字 */
  --text-accent: #1a252f;       /* 深色 - 强调文字 */
  
  /* 字体定义 - 本地优化版，保持科技感 */
  --tech-font-primary: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  --tech-font-secondary: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', Tahoma, sans-serif;
  --tech-font-content: 'Microsoft YaHei', 'PingFang SC', 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* 微妙纹理和效果 */
  --subtle-texture: radial-gradient(circle at 25% 25%, rgba(74, 144, 226, 0.02) 0%, transparent 50%),
                    radial-gradient(circle at 75% 75%, rgba(243, 156, 18, 0.02) 0%, transparent 50%);
  --grid-pattern: linear-gradient(rgba(74, 144, 226, 0.05) 1px, transparent 1px),
                  linear-gradient(90deg, rgba(74, 144, 226, 0.05) 1px, transparent 1px);
}

/* ==================== 动画定义 ==================== */
@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes neon-glow {
  0%, 100% { 
    text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue), 0 0 15px var(--neon-blue);
  }
  50% { 
    text-shadow: 0 0 10px var(--neon-purple), 0 0 20px var(--neon-purple), 0 0 30px var(--neon-purple);
  }
}

@keyframes text-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulse-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==================== 全局字体基础 ==================== */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--tech-font-content);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--warm-bg);
  background-image: var(--subtle-texture), var(--grid-pattern);
  background-size: 100% 100%, 60px 60px;
  background-repeat: no-repeat, repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  padding: 0 40px;
}

/* ==================== 主标题样式 - 温暖米白风 ==================== */
.gradient-text {
  font-family: var(--tech-font-primary);
  font-weight: 700;
  font-size: 3.5rem;
  background: var(--primary-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-flow 4s ease-in-out infinite;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.gradient-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(74, 144, 226, 0.1) 50%, transparent 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 3s infinite;
}

/* ==================== 覆盖页面字体美化 - 温暖米白风 ==================== */
.cover-main h1 {
  font-family: var(--tech-font-primary);
  font-weight: 700;
  font-size: 4rem;
  background: var(--primary-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 5s ease-in-out infinite;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 3rem;
}

.cover-main p {
  font-family: var(--tech-font-secondary);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* ==================== 科技按钮字体 - 温暖米白风 ==================== */
.tech-nav-button {
  font-family: var(--tech-font-secondary);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-block;
  padding: 18px 35px;
  margin: 15px 20px;
  background: var(--card-bg);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 25px;
  border: 2px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.1), 
              inset 0 1px 0 rgba(74, 144, 226, 0.1);
}

.tech-nav-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px var(--glow),
              inset 0 1px 0 rgba(74, 144, 226, 0.2);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.tech-nav-button .tech-icon {
  font-size: 1.3rem;
  margin-right: 10px;
  display: inline-block;
  animation: pulse-scale 2s ease-in-out infinite;
}

/* 不同按钮的渐变色 - 温暖米白风 */
.ai-code-button {
  background: var(--primary-gradient);
  background-size: 200% 200%;
}

.docs-button {
  background: var(--secondary-gradient);
  background-size: 200% 200%;
}

.tech-share-button {
  background: var(--accent-gradient);
  background-size: 200% 200%;
}

.resource-button {
  background: var(--warning-gradient);
  background-size: 200% 200%;
}

.download-button {
  background: var(--code-gradient);
  background-size: 200% 200%;
}

/* ==================== 封面页样式 - 温暖米白风 ==================== */
.cover {
  background: var(--warm-bg) !important;
  background-image: var(--subtle-texture), var(--grid-pattern) !important;
  background-size: 100% 100%, 60px 60px !important;
  background-repeat: no-repeat, repeat !important;
  color: var(--text-primary) !important;
}

.cover-main {
  background: transparent !important;
}

.cover-main > p:last-child {
  color: var(--text-secondary) !important;
  font-size: 1.1rem !important;
  margin-top: 2rem !important;
}

/* 封面页版权信息 */
.cover-main > p:last-child a {
  color: var(--primary-blue) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

.cover-main > p:last-child a:hover {
  color: var(--warm-gold) !important;
  text-shadow: 0 0 5px var(--glow) !important;
}

/* ==================== 侧边栏导航字体 - 温暖米白风 ==================== */
.sidebar {
  background: var(--secondary-bg) !important;
  border-right: 1px solid var(--border-color) !important;
  box-shadow: 2px 0 10px rgba(44, 62, 80, 0.1) !important;
}

/* 确保桌面端侧边栏正常宽度和位置 */
@media (min-width: 769px) {
  .sidebar {
    width: 300px !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    transform: translateX(0) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow-y: auto !important;
    z-index: 20 !important;
  }
  
  .content {
    margin-left: 300px !important;
    padding: 0 2rem !important;
    width: calc(100% - 300px) !important;
    box-sizing: border-box !important;
  }
  
  /* 确保主内容区域不被侧边栏覆盖 */
  .markdown-section {
    max-width: none !important;
    margin: 0 !important;
    padding: 2rem !important;
  }
}

/* 普通链接样式 - 还原正常大小 */
.sidebar ul li a {
  font-family: var(--tech-font-secondary) !important;
  font-weight: 400 !important;
  font-size: 0.85rem !important;
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  padding: 8px 20px 8px 35px !important;
  display: block !important;
  border-radius: 0 12px 12px 0 !important;
  margin: 2px 0 !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  letter-spacing: 0.01em !important;
  line-height: 1.4 !important;
}

/* 链接悬停效果 */
.sidebar ul li a:hover {
  background: rgba(74, 144, 226, 0.1) !important;
  color: var(--primary-blue) !important;
  transform: translateX(8px) !important;
  box-shadow: 0 2px 8px var(--glow) !important;
  border-left: 3px solid var(--primary-blue) !important;
}

/* 激活状态链接 */
.sidebar ul li a.active {
  background: var(--card-bg) !important;
  color: var(--text-accent) !important;
  font-weight: 600 !important;
  border-left: 3px solid var(--primary-blue) !important;
  box-shadow: 0 2px 12px var(--glow) !important;
}

/* 表情符号优化 */
.sidebar ul li a::before,
.sidebar ul li strong::before {
  margin-right: 8px !important;
  font-size: 1.1em !important;
}

/* 嵌套列表缩进优化 */
.sidebar ul ul {
  padding-left: 0 !important;
}

.sidebar ul ul ul {
  padding-left: 0 !important;
}

.sidebar ul ul ul li a {
  padding-left: 55px !important;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
}

.sidebar ul ul ul li a:hover {
  color: var(--primary-blue) !important;
}

/* ==================== 内容区域标题字体 - 温暖米白风 ==================== */
.markdown-section h1 {
  font-family: var(--tech-font-primary);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--text-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 3.5rem 0 2.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1.2rem;
  position: relative;
  line-height: 1.4;
}

.markdown-section h1::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary-blue);
  box-shadow: 0 0 8px var(--glow);
}

.markdown-section h2 {
  font-family: var(--tech-font-secondary);
  font-weight: 600;
  font-size: 2rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  margin: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  line-height: 1.5;
}

.markdown-section h3 {
  font-family: var(--tech-font-secondary);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  margin: 2.5rem 0 1.5rem;
  line-height: 1.6;
}

.markdown-section h4 {
  font-family: var(--tech-font-content);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin: 2rem 0 1.2rem;
  line-height: 1.6;
}

.markdown-section h5,
.markdown-section h6 {
  font-family: var(--tech-font-content);
  font-weight: 500;
  background: var(--code-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 9s ease-in-out infinite;
}

/* ==================== 正文内容字体 - 黑色优化 ==================== */
.markdown-section p {
  font-family: var(--tech-font-content);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-accent) !important;
  margin: 2rem 0;
  font-weight: 500;
  max-width: 800px;
  letter-spacing: 0.01em;
}

.markdown-section strong {
  font-weight: 600;
  color: var(--text-accent) !important;
  text-shadow: none !important;
}

.markdown-section em {
  font-style: italic;
  color: var(--text-accent) !important;
  text-shadow: none !important;
}

/* 确保所有正文文本都是黑色 */
.markdown-section p,
.markdown-section span,
.markdown-section div:not(.hljs):not(pre),
.markdown-section text {
  color: var(--text-accent) !important;
}

/* ==================== 代码块字体 - VS Code深色风格 ==================== */
.markdown-section pre {
  background: #1e1e1e !important;
  border: 1px solid #3c3c3c !important;
  border-radius: 6px !important;
  padding: 0 !important;
  margin: 2rem 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
}

.markdown-section code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  color: #d4d4d4 !important;
}

.markdown-section pre code {
  background: transparent !important;
  color: #d4d4d4 !important;
  display: block !important;
  overflow-x: auto !important;
  padding: 1.2rem 1.2rem 1.2rem 4rem !important;
  margin: 0 !important;
  position: relative !important;
  white-space: pre !important;
}

/* Python语法高亮 - VS Code风格 */
.markdown-section pre code .hljs-keyword,
.markdown-section pre code .token.keyword {
  color: #c586c0 !important; /* 关键字 - 紫色 (if, def, return等) */
}

.markdown-section pre code .hljs-string,
.markdown-section pre code .token.string {
  color: #ce9178 !important; /* 字符串 - 橙色 */
}

.markdown-section pre code .hljs-number,
.markdown-section pre code .token.number {
  color: #b5cea8 !important; /* 数字 - 浅绿色 */
}

.markdown-section pre code .hljs-comment,
.markdown-section pre code .token.comment {
  color: #6a9955 !important; /* 注释 - 绿色 */
  font-style: italic !important;
}

.markdown-section pre code .hljs-function,
.markdown-section pre code .token.function {
  color: #569cd6 !important; /* 函数定义 - 蓝色 */
}

.markdown-section pre code .hljs-variable,
.markdown-section pre code .token.variable {
  color: #9cdcfe !important; /* 变量 - 浅蓝色 */
}

.markdown-section pre code .hljs-params,
.markdown-section pre code .token.parameter {
  color: #dcdcaa !important; /* 参数 - 黄色 */
}

.markdown-section pre code .hljs-built_in,
.markdown-section pre code .token.builtin {
  color: #4ec9b0 !important; /* 内置函数 - 青色 */
}

.markdown-section pre code .hljs-title,
.markdown-section pre code .token.class-name {
  color: #4ec9b0 !important; /* 类名 - 青色 */
}

.markdown-section pre code .hljs-attr,
.markdown-section pre code .token.attr-name {
  color: #92c5f8 !important; /* 属性名 - 浅蓝色 */
}

.markdown-section pre code .hljs-doctag,
.markdown-section pre code .token.docstring {
  color: #ce9178 !important; /* 文档字符串 - 橙色 */
}

/* 行内代码样式 */
.markdown-section :not(pre) > code {
  background: #1e1e1e !important;
  color: #d4d4d4 !important;
  padding: 3px 6px !important;
  border-radius: 3px !important;
  border: 1px solid #3c3c3c !important;
  font-size: 0.9em !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
}

/* 代码块复制按钮 */
.markdown-section pre .copy-code-btn {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  background: #3c3c3c !important;
  color: #d4d4d4 !important;
  border: none !important;
  padding: 6px 10px !important;
  border-radius: 3px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  z-index: 10 !important;
  transition: all 0.2s ease !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.markdown-section pre:hover .copy-code-btn {
  opacity: 1 !important;
  visibility: visible !important;
}

.markdown-section pre .copy-code-btn:hover {
  background: #007acc !important;
  color: white !important;
  transform: translateY(-1px) !important;
}

/* 确保代码块容器有相对定位 */
.markdown-section pre {
  position: relative !important;
}

/* ==================== 表格字体 - 温暖米白风 ==================== */
.markdown-section table {
  font-family: var(--tech-font-content);
  border-collapse: collapse;
  width: 100%;
  margin: 3rem 0;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
  border: 1px solid var(--border-color);
}

.markdown-section table th {
  font-family: var(--tech-font-secondary);
  font-weight: 600;
  font-size: 1rem;
  background: var(--secondary-bg);
  color: var(--text-accent);
  padding: 18px 20px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border-color);
}

.markdown-section table td {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.6;
}

.markdown-section table tr:hover td {
  background: rgba(74, 144, 226, 0.05);
  color: var(--text-primary);
}

/* ==================== 链接字体 ==================== */
.markdown-section a {
  font-weight: 500;
  background: var(--secondary-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  animation: gradient-flow 5s ease-in-out infinite;
}

.markdown-section a:hover {
  border-bottom: 1px solid var(--neon-blue);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  transform: translateY(-1px);
}

/* ==================== 引用块字体 ==================== */
.markdown-section blockquote {
  font-family: var(--tech-font-content);
  font-style: italic;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-left: 4px solid;
  border-image: var(--primary-gradient) 1;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 10px 10px 0;
  position: relative;
}

.markdown-section blockquote p {
  color: #c0c0c0;
  font-size: 1.05rem;
  margin: 0;
}

/* ==================== 列表字体 - 黑色优化 ==================== */
.markdown-section ul,
.markdown-section ol {
  font-family: var(--tech-font-content);
  color: var(--text-accent) !important;
  padding-left: 2rem;
  margin: 1.8rem 0;
}

.markdown-section li {
  margin: 0.8rem 0;
  line-height: 1.8;
  position: relative;
  color: var(--text-accent) !important;
}

/* 确保所有正文相关文本都是黑色 */
.markdown-section p,
.markdown-section span,
.markdown-section div:not(.hljs):not(pre):not(.copy-code-btn),
.markdown-section text,
.markdown-section li,
.markdown-section ul,
.markdown-section ol {
  color: var(--text-accent) !important;
}

/* 特别处理可能的灰色文本 */
.markdown-section .text-secondary,
.markdown-section .text-muted,
.markdown-section [style*="color: #5d6d7e"],
.markdown-section [style*="color: #85929e"],
.markdown-section [style*="color: gray"],
.markdown-section [style*="color: grey"] {
  color: var(--text-accent) !important;
}

.markdown-section ul li::marker {
  color: var(--neon-blue);
  font-size: 1.2em;
}

.markdown-section ol li::marker {
  color: var(--neon-purple);
  font-weight: 600;
}

/* ==================== 搜索框字体 - 温暖米白风 - 强制显示 ==================== */
.search,
.sidebar .search,
.app-nav .search,
body .search,
.docsify-search,
.sidebar .docsify-search {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 !important;
  padding: 20px !important;
  background: var(--card-bg) !important;
  border-bottom: 2px solid var(--border-color) !important;
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.15) !important;
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  min-height: 80px !important;
  box-sizing: border-box !important;
}

/* 强制搜索框容器显示 */
.search-container,
.sidebar .search-container,
.docsify-search-container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: var(--card-bg) !important;
  padding: 20px !important;
  border-bottom: 2px solid var(--border-color) !important;
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.15) !important;
}

.search input,
.sidebar .search input,
.app-nav .search input,
body .search input {
  font-family: var(--tech-font-secondary) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  background: var(--secondary-bg) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 25px !important;
  padding: 12px 20px !important;
  width: 100% !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.1) !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box !important;
}

.search input:focus,
.sidebar .search input:focus,
.app-nav .search input:focus,
body .search input:focus {
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 15px var(--glow) !important;
  outline: none !important;
  background: var(--card-bg) !important;
}

.search input::placeholder,
.sidebar .search input::placeholder,
.app-nav .search input::placeholder,
body .search input::placeholder {
  color: var(--text-muted) !important;
  font-style: normal !important;
}

/* 强制搜索框始终可见 */
.search[style*="display: none"],
.sidebar .search[style*="display: none"] {
  display: block !important;
}

.search[style*="visibility: hidden"],
.sidebar .search[style*="visibility: hidden"] {
  visibility: visible !important;
}

.search[style*="opacity: 0"],
.sidebar .search[style*="opacity: 0"] {
  opacity: 1 !important;
}

/* 侧边栏导航内容与搜索框分离 - 还原合理间距 */
.sidebar-nav {
  padding-top: 20px !important;
  margin-top: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* 确保侧边栏标题不会覆盖搜索框 - 还原合理间距 */
.sidebar ul {
  margin-top: 20px !important;
  padding-top: 10px !important;
  position: relative !important;
  z-index: 1 !important;
}

.sidebar ul li {
  position: relative !important;
  z-index: 1 !important;
}

/* 确保搜索框始终在最顶层 */
.search-wrapper-fixed,
.search,
.docsify-search,
.backup-search {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: #ffffff !important;
  border-bottom: 2px solid #e8e6e3 !important;
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.15) !important;
}

/* 搜索结果样式 */
.results-panel {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.15) !important;
  max-height: 400px !important;
  overflow-y: auto !important;
  z-index: 1000 !important;
}

.results-panel .matching-post {
  padding: 15px !important;
  border-bottom: 1px solid var(--border-color) !important;
  transition: background-color 0.2s ease !important;
}

.results-panel .matching-post:hover {
  background: rgba(74, 144, 226, 0.05) !important;
}

.results-panel .matching-post h2 {
  color: var(--primary-blue) !important;
  font-size: 1.1rem !important;
  margin: 0 0 8px 0 !important;
}

.results-panel .matching-post p {
  color: var(--text-secondary) !important;
  font-size: 0.9rem !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

/* ==================== 响应式字体 ==================== */
@media (max-width: 768px) {
  .gradient-text {
    font-size: 2.5rem;
  }
  
  .cover-main h1 {
    font-size: 2.8rem;
  }
  
  .markdown-section h1 {
    font-size: 2.2rem;
  }
  
  .markdown-section h2 {
    font-size: 1.8rem;
  }
  
  .markdown-section h3 {
    font-size: 1.5rem;
  }
  
  .tech-nav-button {
    font-size: 1rem;
    padding: 12px 24px;
    margin: 8px 10px;
  }
}

@media (max-width: 480px) {
  .gradient-text {
    font-size: 2rem;
  }
  
  .cover-main h1 {
    font-size: 2.2rem;
  }
  
  .tech-nav-button {
    font-size: 0.9rem;
    padding: 10px 20px;
    margin: 6px 8px;
  }
}

/* ==================== 特殊效果类 ==================== */
.tech-highlight {
  background: var(--warning-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 3s ease-in-out infinite;
  font-weight: 600;
}

.neon-text {
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue), 0 0 30px var(--neon-blue);
  animation: neon-glow 2s ease-in-out infinite alternate;
}

.cyber-text {
  font-family: var(--tech-font-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: var(--code-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 4s ease-in-out infinite;
}

/* ==================== 加载动画优化 ==================== */
.app-loading {
  font-family: var(--tech-font-primary);
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  color: var(--neon-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.app-loading p {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: neon-glow 2s ease-in-out infinite alternate;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 212, 255, 0.3);
  border-top: 4px solid var(--neon-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================== 导航栏水平布局 + 下拉菜单 - 修复定位 ==================== */
.app-nav {
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  position: fixed !important;
  top: 20px !important;
  right: 60px !important;
  left: auto !important;
  z-index: 999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 !important;
  height: auto !important;
  width: auto !important;
  max-width: calc(100vw - 120px) !important;
}

/* 确保桌面端导航栏始终在右侧 */
@media (min-width: 769px) {
  .app-nav {
    position: fixed !important;
    top: 20px !important;
    right: 60px !important;
    left: auto !important;
    width: auto !important;
    max-width: calc(100vw - 120px) !important;
    justify-content: flex-end !important;
  }
}

/* 主菜单水平排列 - 修复布局 */
.app-nav > ul {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 20px !important;
  list-style: none !important;
  gap: 30px !important;
  position: static !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  width: auto !important;
  min-width: auto !important;
  max-width: none !important;
  flex-wrap: nowrap !important;
}

/* 主菜单项 */
.app-nav > ul > li {
  display: inline-block !important;
  margin: 0 25px !important;
  padding: 0 !important;
  position: relative;
  flex: none !important;
}

/* 主菜单项链接样式 - 简化版 */
.app-nav > ul > li > a {
  display: inline-block !important;
  padding: 12px 20px !important;
  color: var(--text-secondary) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  font-family: var(--tech-font-secondary) !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-align: center !important;
}

/* 主菜单项悬停效果 */
.app-nav > ul > li:nth-child(1) > a:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.2)) !important;
  color: var(--neon-blue) !important;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.8) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4) !important;
}

.app-nav > ul > li:nth-child(2) > a:hover {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.3), rgba(0, 242, 254, 0.2)) !important;
  color: var(--neon-blue) !important;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.8) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4) !important;
}

.app-nav > ul > li:nth-child(3) > a:hover {
  background: linear-gradient(135deg, rgba(17, 153, 142, 0.3), rgba(56, 239, 125, 0.2)) !important;
  color: var(--neon-blue) !important;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.8) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 20px rgba(17, 153, 142, 0.4) !important;
}

.app-nav > ul > li:nth-child(4) > a:hover {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.3), rgba(196, 69, 105, 0.2)) !important;
  color: var(--neon-blue) !important;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.8) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 20px rgba(255, 107, 157, 0.4) !important;
}

/* 下拉菜单样式 - 默认隐藏 - 温暖米白风 */
.app-nav > ul > li > ul {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 35px rgba(44, 62, 80, 0.15) !important;
  padding: 20px 0 !important;
  margin-top: 12px !important;
  width: auto !important;
  min-width: 200px !important;
  max-width: none !important;
  z-index: 100 !important;
  flex-direction: column !important;
  gap: 8px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-10px) !important;
  transition: all 0.3s ease !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

/* 确保菜单项相对定位 */
body .app-nav > ul > li {
  position: relative !important;
}

/* 重置所有下拉菜单为隐藏状态 - 使用最高优先级 */
body .app-nav ul li ul,
body .app-nav > ul > li > ul,
body .app-nav li ul {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-10px) !important;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
  transition-delay: 0.5s !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 35px rgba(44, 62, 80, 0.15) !important;
  padding: 20px 0 !important;
  margin-top: 5px !important;
  min-width: 220px !important;
  z-index: 100 !important;
  flex-direction: column !important;
  gap: 8px !important;
}

/* 只有直接悬停的父级菜单项才显示其直接子菜单 */
body .app-nav > ul > li:hover > ul {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  transition-delay: 0s !important;
}

/* 当鼠标在子菜单上时保持显示该子菜单 */
body .app-nav > ul > li > ul:hover {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  transition-delay: 0s !important;
}

/* 扩大下拉菜单的可交互区域 */
body .app-nav > ul > li > ul::before {
  content: '';
  position: absolute;
  top: -25px;
  left: -10px;
  right: -10px;
  height: 30px;
  background: transparent;
  z-index: 1000;
}

/* 为主菜单项添加连接区域 */
body .app-nav > ul > li::after {
  content: '';
  position: absolute;
  bottom: -25px;
  left: 0;
  right: 0;
  height: 30px;
  background: transparent;
  z-index: 99;
}

/* 确保非悬停状态的菜单项子菜单完全隐藏 */
body .app-nav > ul > li:not(:hover) > ul {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-10px) !important;
  transition-delay: 0.5s !important;
}

/* 确保每个菜单项都能独立显示其子菜单 */
body .app-nav > ul > li:nth-child(1):hover > ul,
body .app-nav > ul > li:nth-child(2):hover > ul,
body .app-nav > ul > li:nth-child(3):hover > ul,
body .app-nav > ul > li:nth-child(4):hover > ul {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  transition-delay: 0s !important;
}

/* 确保每个菜单项的子菜单在悬停时保持显示 */
body .app-nav > ul > li:nth-child(1) > ul:hover,
body .app-nav > ul > li:nth-child(2) > ul:hover,
body .app-nav > ul > li:nth-child(3) > ul:hover,
body .app-nav > ul > li:nth-child(4) > ul:hover {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  transition-delay: 0s !important;
}

/* 下拉菜单项 */
.app-nav > ul > li > ul > li {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* 下拉菜单项链接 - 温暖米白风 */
.app-nav > ul > li > ul > li > a {
  display: block !important;
  padding: 15px 25px !important;
  color: var(--text-secondary) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  font-family: var(--tech-font-secondary) !important;
  transition: all 0.3s ease !important;
  border-radius: 8px !important;
  margin: 5px 15px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  width: auto !important;
  min-width: auto !important;
  max-width: none !important;
}

/* 下拉菜单项悬停效果 - 温暖米白风 */
.app-nav > ul > li > ul > li > a:hover {
  background: rgba(74, 144, 226, 0.1) !important;
  color: var(--primary-blue) !important;
  transform: translateX(5px) !important;
}

/* 下拉菜单样式优化 - 确保可见性和更宽的布局 */
.app-nav > ul > li > a {
  display: inline-block !important;
  padding: 12px 20px !important;
  color: #e0e0e0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  transition: all 0.4s ease !important;
  border-bottom: none !important;
  position: relative !important;
  overflow: hidden !important;
  text-decoration: none !important;
  font-family: var(--tech-font-secondary) !important;
  letter-spacing: 0.05em !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  text-align: center !important;
  width: auto !important;
  min-width: 120px !important;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(102, 126, 234, 0.2) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* 菜单项左边框指示器 */
.app-nav ul li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 5px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  transform: translateX(-5px);
  transition: transform 0.4s ease;
  border-radius: 0 5px 5px 0;
}

.app-nav ul li a:hover::before {
  transform: translateX(0);
}

/* 水平菜单悬停效果优化 - 简化版 */
.app-nav > ul > li > a:hover {
  color: var(--primary-blue) !important;
  background: rgba(74, 144, 226, 0.1) !important;
  transition: all 0.3s ease !important;
}

/* 扫光动画效果 - 所有菜单项统一 */
.app-nav ul li a::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.app-nav ul li a:hover::after {
  left: 100%;
}

/* 确保菜单项点击效果 */
.app-nav ul li a:active {
  transform: translateX(12px) scale(0.98);
  transition: all 0.1s ease;
}

/* 菜单显示和隐藏动画 - 修复可见性问题 */
.app-nav ul {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  transform: translateY(0) !important;
  transition: all 0.3s ease;
}

.app-nav:hover ul,
.app-nav ul:hover {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  transform: translateY(0) !important;
}

/* 桌面端布局优化 - 确保正确的布局 */
@media (min-width: 769px) {
  /* 确保桌面端导航栏在右侧 */
  .app-nav {
    position: fixed !important;
    top: 20px !important;
    right: 60px !important;
    left: auto !important;
    width: auto !important;
    max-width: calc(100vw - 120px) !important;
    justify-content: flex-end !important;
    background: transparent !important;
    z-index: 999 !important;
  }
  
  /* 确保桌面端侧边栏正常宽度 */
  .sidebar {
    width: 300px !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    transform: translateX(0) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow-y: auto !important;
    z-index: 20 !important;
    background: var(--secondary-bg) !important;
    border-right: 1px solid var(--border-color) !important;
    box-shadow: 2px 0 10px rgba(44, 62, 80, 0.1) !important;
  }
  
  /* 确保桌面端内容区域正确布局 */
  .content {
    margin-left: 300px !important;
    padding: 0 2rem !important;
    width: calc(100% - 300px) !important;
    box-sizing: border-box !important;
    min-height: 100vh !important;
  }
  
  .markdown-section {
    max-width: none !important;
    margin: 0 auto !important;
    padding: 2rem !important;
  }
  
  /* 桌面端body不需要额外padding */
  body {
    padding: 0 !important;
  }
}

/* 移动端导航菜单优化 - 修复四个按钮显示问题 */
@media (max-width: 768px) {
  body {
    padding: 0 20px !important;
  }
  
  .app-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: rgba(250, 249, 247, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    border-bottom: 2px solid #e8e6e3 !important;
    z-index: 9998 !important;
    padding: 10px 0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    max-width: none !important;
    justify-content: center !important;
  }
  
  .app-nav > ul {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  
  .app-nav > ul > li {
    margin: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  
  .app-nav > ul > li > a {
    font-size: 11px !important;
    padding: 8px 4px !important;
    white-space: nowrap !important;
    display: block !important;
    text-align: center !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    min-width: 0 !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.1) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
  }
  
  .app-nav > ul > li > a:hover {
    background: rgba(74, 144, 226, 0.1) !important;
    transform: translateY(-2px) !important;
    color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 4px 12px var(--glow) !important;
  }
  
  /* 移动端下拉菜单优化 */
  .app-nav > ul > li > ul {
    position: fixed !important;
    top: 70px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 300px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
  }
  
  .app-nav > ul > li > ul > li > a {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .app-nav > ul > li > ul > li > a:hover {
    background: rgba(74, 144, 226, 0.1) !important;
    color: var(--primary-blue) !important;
  }
  
  /* 确保主内容不被导航栏遮挡 */
  .content {
    padding-top: 80px !important;
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  /* 移动端侧边栏显示优化 - 修复点击问题 */
  .sidebar {
    position: fixed !important;
    top: 80px !important;
    left: 0 !important;
    width: 280px !important;
    height: calc(100vh - 80px) !important;
    background: var(--secondary-bg) !important;
    border-right: 1px solid var(--border-color) !important;
    box-shadow: 2px 0 10px rgba(44, 62, 80, 0.1) !important;
    z-index: 200 !important;
    overflow-y: auto !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    pointer-events: auto !important;
  }
  
  /* 侧边栏显示状态 */
  .sidebar.show {
    transform: translateX(0) !important;
    pointer-events: auto !important;
  }
  
  /* 确保侧边栏链接可点击 */
  .sidebar ul li a {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 201 !important;
    position: relative !important;
  }
  
  /* 侧边栏切换按钮 */
  .sidebar-toggle {
    position: fixed !important;
    top: 90px !important;
    left: 15px !important;
    z-index: 201 !important;
    background: var(--primary-blue) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3) !important;
    transition: all 0.3s ease !important;
    pointer-events: auto !important;
  }
  
  .sidebar-toggle:hover {
    background: var(--warm-gold) !important;
    transform: scale(1.1) !important;
  }
  
  /* 遮罩层 */
  .sidebar-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 199 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
  }
  
  .sidebar-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .app-nav ul {
    flex-direction: column;
    min-width: 280px;
    max-width: 320px;
    right: 10px;
    left: auto;
    padding: 15px 0;
  }
  
  .app-nav ul li {
    margin: 0 0 8px 0;
    flex: none;
    width: 100%;
  }
  
  .app-nav ul li a {
    padding: 15px 25px;
    font-size: 16px;
    text-align: left;
    margin: 0 15px;
  }
  
  .app-nav ul li a:hover {
    transform: translateX(8px);
  }
}

/* 移动端导航优化 - 温暖米白风格 */
@media (max-width: 768px) {
  .app-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: rgba(250, 249, 247, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    border-bottom: 2px solid #e8e6e3 !important;
    z-index: 9998 !important;
    padding: 15px 0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    max-width: none !important;
  }
  
  .app-nav > ul {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 15px !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    width: 100% !important;
    overflow-x: auto !important;
    min-width: auto !important;
    max-width: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  .app-nav > ul > li {
    margin: 0 !important;
    flex-shrink: 0 !important;
    min-width: auto !important;
  }
  
  .app-nav > ul > li > a {
    font-size: 13px !important;
    padding: 10px 8px !important;
    white-space: nowrap !important;
    display: block !important;
    text-align: center !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    min-width: auto !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    font-family: var(--tech-font-secondary) !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.1) !important;
  }
  
  .app-nav > ul > li > a:hover {
    background: rgba(74, 144, 226, 0.1) !important;
    transform: translateY(-2px) !important;
    color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 4px 12px var(--glow) !important;
  }
  
  /* 移动端下拉菜单优化 */
  .app-nav > ul > li > ul {
    position: fixed !important;
    top: 70px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 300px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
  }
  
  .app-nav > ul > li > ul > li > a {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .app-nav > ul > li > ul > li > a:hover {
    background: rgba(74, 144, 226, 0.1) !important;
    color: var(--primary-blue) !important;
  }
  
  /* 确保主内容不被导航栏遮挡 */
  .content {
    padding-top: 80px !important;
  }
  
  .sidebar {
    top: 80px !important;
  }
}

/* ==================== 导航栏强制间距规则 ==================== */
body .app-nav ul li {
  margin: 0 25px !important;
}

body .app-nav > ul {
  gap: 80px !important;
  padding: 0 60px !important;
  min-width: 1200px !important;
}

body .app-nav > ul > li > a {
  padding: 18px 45px !important;
  min-width: 160px !important;
  color: var(--text-secondary) !important;
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.1) !important;
}

/* ==================== 返回顶部按钮 ==================== */
.back-to-top {
  font-family: var(--tech-font-primary);
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--primary-gradient);
  background-size: 200% 200%;
  animation: gradient-flow 4s ease-in-out infinite;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  position: fixed;
  bottom: 30px;
  right: 30px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.back-to-top.show {
  display: flex;
}
