/* document/css/style-new.css — 美化版文档页面样式 */

/* 根变量定义 */
:root {
  --bg-primary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --accent-primary: #007bff;
  --accent-success: #28a745;
  --border-light: #e9ecef;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a1a1a;
    --bg-card: #2d2d2d;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --accent-primary: #4dabf7;
    --accent-success: #51cf66;
    --border-light: #495057;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  }
}

/* 强制浅色模式（如果用户想要切换回浅色模式） */
.light-mode {
  --bg-primary: #f8f9fa !important;
  --bg-card: #ffffff !important;
  --text-primary: #2c3e50 !important;
  --text-secondary: #6c757d !important;
  --accent-primary: #007bff !important;
  --accent-success: #28a745 !important;
  --border-light: #e9ecef !important;
  --shadow-light: rgba(0, 0, 0, 0.05) !important;
  --shadow-medium: rgba(0, 0, 0, 0.1) !important;
}

/* 强制深色模式 */
.dark-mode {
  --bg-primary: #1a1a1a !important;
  --bg-card: #2d2d2d !important;
  --text-primary: #e9ecef !important;
  --text-secondary: #adb5bd !important;
  --accent-primary: #4dabf7 !important;
  --accent-success: #51cf66 !important;
  --border-light: #495057 !important;
  --shadow-light: rgba(0, 0, 0, 0.3) !important;
  --shadow-medium: rgba(0, 0, 0, 0.5) !important;
}

/* 主题切换按钮样式 */
.theme-toggle-btn {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}

.theme-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, var(--accent-primary) 0%, rgba(0,123,255,0.1) 100%);
}

.theme-icon {
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

/* 默认显示月亮图标（深色模式） */
.sun-icon {
  display: none;
}

.moon-icon {
  display: inline;
}

/* 浅色模式下显示太阳图标 */
.light-mode .sun-icon {
  display: inline;
}

.light-mode .moon-icon {
  display: none;
}

/* 深色模式下显示月亮图标 */
.dark-mode .sun-icon {
  display: none;
}

.dark-mode .moon-icon {
  display: inline;
}

/* 页面装饰性背景 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.05) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #00a3ff 100%);
  border-radius: 4px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #00d4ff 100%);
  transform: scale(1.1);
}

/* 文档页面布局 */
.document-main {
  padding-top: 120px;
  padding-bottom: 100px;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 180px);
  background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-hover) 100%);
  position: relative;
}

.document-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(0,123,255,0.05) 0%, transparent 100%);
  pointer-events: none;
}

.document-container {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(650px, 4fr) minmax(220px, 1fr);
  gap: 40px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* 文档统计信息样式 */
.document-statistics {
  display: flex;
  justify-content: flex-start;
  margin: 20px 0 30px;
}

.doc-stat-item {
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: rgba(0, 123, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 123, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.doc-stat-item:hover {
  background: rgba(0, 123, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 123, 255, 0.3);
}

.doc-stat-item span {
  font-weight: 600;
  color: var(--accent-primary);
}

/* 文档文章主体 - 美化版 */
.document-article {
  margin: 0;
  padding: 50px 45px;
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(255,255,255,0.02) 100%);
  border-radius: 16px;
  box-shadow: 
    0 20px 40px var(--shadow-medium),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  line-height: 1.9;
  font-size: 1.08rem;
  color: var(--text-primary);
  text-align: left;
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.document-article:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 25px 50px var(--shadow-medium),
    0 0 0 1px rgba(255,255,255,0.15) inset;
}

/* 标题样式 - 美化版 */
.document-article h1 {
  font-size: 2.8rem;
  color: var(--accent-primary);
  background: linear-gradient(135deg, var(--accent-primary) 0%, #00a3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 15px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 1.5em;
  position: relative;
  text-align: center;
  letter-spacing: -0.02em;
}

.document-article h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  border-radius: 2px;
}

.document-article h2 {
  font-size: 2.1rem;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  position: relative;
  padding-left: 25px;
  color: var(--text-primary);
  border-left: 4px solid var(--accent-primary);
  padding: 12px 0 12px 25px;
  background: linear-gradient(90deg, rgba(0,123,255,0.05) 0%, transparent 100%);
  border-radius: 0 8px 8px 0;
}

.document-article h2::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,123,255,0.3);
}

.document-article h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2em;
  margin-bottom: 0.8em;
  padding: 8px 0 8px 20px;
  border-left: 3px solid var(--accent-secondary);
  background: linear-gradient(90deg, rgba(108,117,125,0.05) 0%, transparent 100%);
  border-radius: 0 6px 6px 0;
  transition: all 0.3s ease;
}

.document-article h3:hover {
  background: linear-gradient(90deg, rgba(108,117,125,0.1) 0%, transparent 100%);
  transform: translateX(5px);
}

/* 段落和列表 - 美化版 */
.document-article p {
  margin-bottom: 1.5em;
  line-height: 1.8;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-align: justify;
  position: relative;
  padding: 0 10px;
}

.document-article ul,
.document-article ol {
  margin-bottom: 2em;
  padding-left: 2.5em;
  position: relative;
}

.document-article ul li,
.document-article ol li {
  margin-bottom: 0.8em;
  line-height: 1.8;
  padding: 8px 12px;
  background: linear-gradient(90deg, rgba(0,123,255,0.03) 0%, transparent 100%);
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.document-article ul li:hover,
.document-article ol li:hover {
  background: linear-gradient(90deg, rgba(0,123,255,0.08) 0%, transparent 100%);
  transform: translateX(5px);
}

/* 自定义无序列表样式 - 美化版 */
.document-article ul {
  list-style: none;
}

.document-article ul li::before {
  content: '✦';
  color: var(--accent-primary);
  font-weight: bold;
  position: absolute;
  left: -2em;
  font-size: 1.1em;
  line-height: 1.5;
  text-shadow: 0 0 5px rgba(0,123,255,0.3);
}

.document-article ol {
  counter-reset: list-counter;
}

.document-article ol li {
  counter-increment: list-counter;
}

.document-article ol li::before {
  content: counter(list-counter);
  color: var(--accent-primary);
  font-weight: bold;
  position: absolute;
  left: -2.5em;
  width: 2em;
  text-align: center;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  font-size: 0.9em;
  line-height: 1.8;
}

/* 引用样式 - 美化版 */
.document-article blockquote {
  margin: 2.5em 0;
  padding: 30px 35px;
  border-left: 5px solid var(--accent-primary);
  background: linear-gradient(135deg, var(--bg-hover) 0%, rgba(255,255,255,0.02) 100%);
  border-radius: 12px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.9;
  position: relative;
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
  font-size: 1.05rem;
}

.document-article blockquote::before {
  content: '"';
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 4rem;
  color: rgba(0,123,255,0.1);
  font-family: Georgia, serif;
  line-height: 0;
  font-weight: bold;
}

.document-article blockquote::after {
  content: '"';
  position: absolute;
  bottom: 15px;
  right: 20px;
  font-size: 4rem;
  color: rgba(0,123,255,0.1);
  font-family: Georgia, serif;
  line-height: 0;
  font-weight: bold;
}

/* 图片样式 - 美化版 */
.document-article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2.5em auto;
  border-radius: 12px;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  border: 1px solid var(--border-light);
  transition: all 0.4s ease;
  position: relative;
}

.document-article img:hover {
  transform: scale(1.02) translateY(-5px);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255,255,255,0.15) inset;
}

/* 表格样式 - 美化版 */
.document-article table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2.5em 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255,255,255,0.05) inset;
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(255,255,255,0.02) 100%);
}

.document-article table th,
.document-article table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.document-article table th {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #00a3ff 100%);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.document-article table tr:last-child td {
  border-bottom: none;
}

.document-article table tr:hover td {
  background: rgba(0,123,255,0.05);
  transform: translateX(3px);
}

/* 代码块样式 - 美化版 */
.document-article pre {
  position: relative;
  margin: 2em 0;
  padding: 25px 25px 25px 25px;
  border-radius: 12px;
  overflow-x: auto;
  background: linear-gradient(145deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.02) 100%);
  color: var(--text-code);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 
    0 10px 30px var(--shadow-code),
    0 0 0 1px rgba(255,255,255,0.05) inset;
  font-size: 0.95rem;
  line-height: 1.7;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
}

.document-article pre:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 20px 40px var(--shadow-code),
    0 0 0 1px rgba(255,255,255,0.1) inset;
}

.document-article pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), #00a3ff, var(--accent-primary));
  border-radius: 12px 12px 0 0;
}

.document-article pre code {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  background: transparent;
  color: var(--text-code);
  white-space: pre;
  display: block;
  position: relative;
  z-index: 1;
}

/* 复制按钮样式 - 美化版 */
.copy-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 15px rgba(0,0,0,0.1),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  display: flex;
  align-items: center;
  gap: 6px;
}

.document-article pre:hover .copy-btn {
  opacity: 1;
  transform: translateY(0);
}

.copy-btn:hover {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #00a3ff 100%);
  color: white;
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(0,123,255,0.4),
    0 0 0 1px rgba(255,255,255,0.2) inset;
}

.copy-btn::before {
  content: '📋';
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.copy-btn:hover::before {
  content: '📄';
  transform: scale(1.1);
}

.copy-btn.copied {
  background: linear-gradient(135deg, var(--accent-success) 0%, #28a745 100%);
  color: white;
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(40,167,69,0.4),
    0 0 0 1px rgba(255,255,255,0.2) inset;
}

.copy-btn.copied::before {
  content: '✅';
  transform: scale(1.1);
}

.copy-btn.copied::after {
  content: '已复制';
  margin-left: 4px;
  font-weight: 600;
}

/* 行内代码 */
.document-article code {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  background: transparent;
  color: var(--text-code);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* 链接样式 */
.document-article a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.document-article a:hover {
  color: var(--accent-primary-dark);
  text-decoration: underline;
}

/* 侧边栏 - 美化版 */
.sidebar-right {
  position: sticky;
  top: 100px;
  align-self: start;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-module {
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(255,255,255,0.02) 100%);
  box-shadow: 
    0 15px 35px var(--shadow-medium),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.sidebar-module:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 45px var(--shadow-medium),
    0 0 0 1px rgba(255,255,255,0.15) inset;
}

/* 侧边栏阅读量统计样式 */
.doc-statistics-sidebar {
  padding: 15px 20px;
  text-align: center;
}

.doc-stat-item-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.08) 0%, rgba(0, 123, 255, 0.02) 100%);
  border-radius: 12px;
  border: 1px solid rgba(0, 123, 255, 0.15);
  transition: all 0.3s ease;
}

.doc-stat-item-sidebar:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.12) 0%, rgba(0, 123, 255, 0.05) 100%);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
  border-color: rgba(0, 123, 255, 0.3);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: linear-gradient(135deg, var(--accent-primary) 0%, #00a3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.sidebar-module h4 {
  font-size: 1.1rem;
  color: var(--accent-primary);
  margin-bottom: 15px;
  font-weight: 700;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(0,123,255,0.2);
  position: relative;
}

.sidebar-module h4::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 25%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

#toc-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#toc-list li {
  margin-bottom: 8px;
  position: relative;
}

#toc-list li::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  opacity: 0.5;
  transition: all 0.3s ease;
}

#toc-list li a {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 6px;
  background: transparent;
  font-size: 0.95rem;
  line-height: 1.4;
}

#toc-list li a:hover {
  color: var(--accent-primary);
  background: rgba(0,123,255,0.05);
  transform: translateX(5px);
  padding-left: 20px;
}

#toc-list li a.is-active {
  color: var(--accent-primary);
  font-weight: 600;
  background: linear-gradient(90deg, rgba(0,123,255,0.1) 0%, transparent 100%);
  border-left: 3px solid var(--accent-primary);
  padding-left: 20px;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .document-main {
    padding-top: 80px;
    padding-bottom: 60px;
  }
  
  .document-container {
    padding: 0 15px;
    display: block;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .document-article {
    padding: 30px 20px;
    font-size: 1rem;
    line-height: 1.8;
    width: 100%;
    margin: 0;
  }
  
  .document-article h1 {
    font-size: 1.8rem;
    margin-bottom: 1em;
  }
  
  .document-article h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8em;
  }
  
  .document-article h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6em;
  }
  
  .document-article pre {
    margin: 1.2em 0;
    padding: 16px;
    font-size: 0.85rem;
    border-radius: 6px;
  }
  
  .sidebar-right {
    display: none;
  }
}

/* 滚动条优化 */
.document-article pre::-webkit-scrollbar {
  height: 6px;
}

.document-article pre::-webkit-scrollbar-track {
  background: var(--bg-scrollbar);
  border-radius: 3px;
}

.document-article pre::-webkit-scrollbar-thumb {
  background: var(--bg-scrollbar-thumb);
  border-radius: 3px;
}

.document-article pre::-webkit-scrollbar-thumb:hover {
  background: var(--bg-scrollbar-thumb-hover);
}

/* 页面滚动时的元素动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 添加到 document-article 的所有子元素，实现滚动时的渐入效果 */
.document-article > * {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

/* 为不同元素设置不同的动画延迟，创建交错效果 */
.document-article > h1 { animation-delay: 0.1s; }
.document-article > h2 { animation-delay: 0.2s; }
.document-article > h3 { animation-delay: 0.3s; }
.document-article > p { animation-delay: 0.4s; }
.document-article > ul, .document-article > ol { animation-delay: 0.5s; }
.document-article > blockquote { animation-delay: 0.6s; }
.document-article > pre { animation-delay: 0.7s; }
.document-article > table { animation-delay: 0.8s; }
.document-article > img { animation-delay: 0.9s; }

/* ---------- 右侧 TOC 进度条 - 美化版 ---------- */
.toc-progress-wrap { 
  display: flex; 
  flex-direction: column; 
  gap: 15px; 
  align-items: stretch; 
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(255,255,255,0.02) 100%);
  border-radius: 16px;
  box-shadow: 
    0 15px 35px var(--shadow-medium),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.toc-progress-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 45px var(--shadow-medium),
    0 0 0 1px rgba(255,255,255,0.15) inset;
}

.toc-progress { 
  height: 8px; 
  width: 100%; 
  background: linear-gradient(90deg, var(--border-light) 0%, rgba(108,117,125,0.3) 100%); 
  border-radius: 10px; 
  overflow: hidden; 
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) inset;
}

.toc-progress .toc-progress-bar { 
  height: 100%; 
  width: 0%; 
  background: linear-gradient(90deg, 
    var(--accent-primary) 0%, 
    #00a3ff 50%, 
    #00d4ff 100%); 
  border-radius: 10px; 
  transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1); 
  position: relative;
  overflow: hidden;
}

.toc-progress .toc-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255,255,255,0.3) 50%, 
    transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.toc-progress-label { 
  font-size: 0.9rem; 
  color: var(--text-primary); 
  text-align: left; 
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 进度百分比样式 - 美化版 */
.toc-progress-percent { 
  font-size: 1rem; 
  color: var(--accent-primary); 
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #00a3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0,123,255,0.3);
}

.toc-progress-percent.read-complete { 
  color: var(--accent-success); 
  font-weight: 700; 
  background: linear-gradient(135deg, var(--accent-success) 0%, #28a745 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 在移动端，TOC 隐藏，进度条也不显示以节省空间 */
@media (max-width: 768px) {
  .toc-progress-wrap {
    display: none;
  }
}