/* =========================================
   1. 基础设置
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* =========================================
   2. 导航栏样式
   ========================================= */
.navbar {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* 导航栏容器样式 */
.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}

.title {
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  margin-left: 10px;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.subtitle {
  color: #cccccc;
  font-size: 12px;
  margin-left: 10px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 40px;
}

.nav-links a {
  text-decoration: none;
  color: #cccccc;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ccff, #0066ff);
  transition: width 0.3s ease;
}

/* 激活链接样式 */
.nav-links a.active {
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.nav-links a.active::after {
  width: 100%;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 5.5rem; /* 防止内容被顶部栏遮挡 */
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

/* =========================================
   3. 颜色变量
   ========================================= */
:root {
  /* 主色调 - 蓝色 (参考log_style.css的#00ccff) */
  --primary: #00ccff; /* 主蓝色 */
  --primary-light: #33d6ff; /* 蓝色浅色变体 */
  --primary-dark: #0099cc; /* 蓝色深色变体 */
  --primary-hover: #00aaff; /* 蓝色悬停色 */
  --primary-gradient: linear-gradient(135deg, #00ccff, #33d6ff); /* 蓝色渐变 */
  --primary-glow: rgba(0, 204, 255, 0.3); /* 蓝色发光效果 */
  
  /* 基础颜色 - 黑白 */
  --white: #ffffff; /* 白色 */
  --black: #000000; /* 黑色 */
  
  /* 中性色 - 灰色系列 */
  --gray-50: #f9fafb; /* 极浅灰色 */
  --gray-100: #f3f4f6; /* 浅灰色 */
  --gray-200: #e5e7eb; /* 中浅灰色 */
  --gray-300: #d1d5db; /* 中灰色 */
  --gray-400: #9ca3af; /* 中深灰色 */
  --gray-500: #6b7280; /* 深灰色 */
  --gray-600: #4b5563; /* 更深灰色 */
  --gray-700: #374151; /* 暗灰色 */
  --gray-800: #1f2937; /* 很暗灰色 */
  --gray-900: #111827; /* 极暗灰色 */
  --gray-950: #030712; /* 近黑色 */
  
  /* 背景色 - 黑色主题 (参考log_style.css) */
  --bg-primary: #000000; /* 主背景色 - 黑色 */
  --bg-secondary: #1a1a1a; /* 次背景色 - 深灰色 */
  --bg-card: rgba(10, 10, 10, 0.7); /* 卡片背景色 - 半透明黑色 */
  --bg-hover: rgba(0, 204, 255, 0.1); /* 悬停背景色 - 蓝色透明 */
  
  /* 文本色 - 黑白 (参考log_style.css) */
  --text-primary: #ffffff; /* 主要文本色 - 白色 */
  --text-secondary: #e0e0e0; /* 次要文本色 - 浅灰色 */
  --text-muted: #888888; /*  muted文本色 - 中灰色 */
  
  /* 边框色 - 白色透明和蓝色 (参考log_style.css) */
  --border-light: rgba(255, 255, 255, 0.1); /* 浅色边框 */
  --border-medium: rgba(255, 255, 255, 0.3); /* 中色边框 */
  --border-dark: rgba(255, 255, 255, 0.5); /* 深色边框 */
  --border-blue: rgba(0, 204, 255, 0.5); /* 蓝色边框 */
  
  /* 状态色 - 使用蓝色 */
  --success: #00ccff; /* 成功色 - 蓝色 */
  --warning: #ffffff; /* 警告色 - 白色 */
  --error: #ffffff; /* 错误色 - 白色 */
  --info: #00ccff; /* 信息色 - 蓝色 */
  
  /* 辅助色 - 统一使用蓝色 */
  --accent: #00ccff; /* 强调色 - 蓝色 */
  --accent-light: #33d6ff; /* 强调色浅色变体 */
  --accent-dark: #0099cc; /* 强调色深色变体 */
  --accent-glow: rgba(0, 204, 255, 0.3); /* 强调色发光效果 */
  
  /* 阴影效果 (参考log_style.css) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* 小阴影 */
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* 中阴影 */
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* 大阴影 */
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* 超大阴影 */
  --shadow-glow: 0 0 15px var(--primary-glow); /* 发光效果阴影 - 使用主色发光 */
  --shadow-strong-glow: 0 0 25px var(--primary-glow); /* 强烈发光效果阴影 */
  --shadow-accent-glow: 0 0 15px var(--accent-glow); /* 强调色发光效果 */
  
  /* 过渡动画 */
  --transition-all: all 300ms ease-in-out; /* 全局过渡效果 */
  --transition-fast: all 150ms ease-in-out; /* 快速过渡效果 */
  --transition-slow: all 500ms ease-in-out; /* 慢速过渡效果 */
  --transition-transform: transform 300ms ease-in-out; /* 变换过渡 */
  --transition-opacity: opacity 300ms ease-in-out; /* 透明度过渡 */
}

/* =========================================
   3. 工具类 & 布局
   ========================================= */

/* 滚动动画类 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* 延迟类定义 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }
.delay-8 { transition-delay: 0.8s; }
.delay-9 { transition-delay: 0.9s; }
.delay-10 { transition-delay: 1.0s; }

/* 动画效果应用类 */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.float {
  animation: float 3s ease-in-out infinite;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.glow {
  box-shadow: 0 0 15px var(--primary-glow);
}

/* 滚动时隐藏的元素 */
.hidden-on-scroll {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 悬停放大效果 */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* 渐变流动背景 */
.gradient-bg {
  background: var(--primary-gradient);
  background-size: 200% 200%;
  animation: gradientFlow 5s ease infinite;
}


.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-20 { top: 5rem; }
.z-100 { z-index: 100; } 

/* 确保 hidden 类具有最高优先级 */
.hidden { display: none !important; }

/* 间距 */
.mt-1 { margin-top: 0.25rem; } .mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } .mb-12 { margin-bottom: 3rem; }
.ml-2 { margin-left: 0.5rem; } .ml-3 { margin-left: 0.75rem; } .ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; } .mr-3 { margin-right: 0.75rem; } .mr-4 { margin-right: 1rem; }
.p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; } .py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; } .py-8 { padding-top: 2rem; padding-bottom: 2rem; } .py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.pl-2 { padding-left: 0.5rem; } .pl-4 { padding-left: 1rem; } .pl-9 { padding-left: 2.25rem; } 
.pr-4 { padding-right: 1rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

/* 装饰 */
.rounded-md { border-radius: 0.375rem; } 
.rounded-lg { border-radius: 0.5rem; } 
.rounded-xl { border-radius: 0.75rem; } 
.rounded-full { border-radius: 9999px; } 

.border { border: 1px solid var(--border-light); } 
.border-t { border-top: 1px solid var(--border-light); } 
.border-l-2 { border-left-width: 2px; } 
.border-l-4 { border-left-width: 4px; } 

.border-transparent { border-color: transparent; } 
.border-gray-100 { border-color: var(--border-light); } 
.border-gray-300 { border-color: var(--border-medium); } 
.border-accent { border-color: var(--accent); } 

.bg-white { background-color: var(--bg-card); } 
.bg-gray-50 { background-color: var(--bg-secondary); } 
.bg-gray-100 { background-color: var(--bg-card); } 
.bg-gray-900 { background-color: var(--bg-primary); } 

.bg-primary { background-color: var(--primary); } 
.bg-primary\/10 { background-color: var(--primary-light); } 

.bg-accent { background-color: var(--accent); } 
.bg-accent\/10 { background-color: var(--accent-light); } 

.hover\:bg-gray-50:hover { background-color: var(--bg-card); }

/* 文字 */
.text-white { color: var(--text-primary); } 
.text-primary { color: var(--primary); } 
.text-accent { color: var(--accent); } 
.text-accent\/50 { color: rgba(0, 204, 255, 0.5); } 

.text-gray-300 { color: var(--text-muted); } 
.text-gray-400 { color: var(--text-secondary); } 
.text-gray-500 { color: var(--text-muted); } 
.text-gray-800 { color: var(--text-primary); } 
.text-success { color: var(--success); } 
.text-warning { color: var(--warning); } 
.text-error { color: var(--error); } 
.text-info { color: var(--info); } 

.hover\:text-primary:hover { color: var(--primary-hover); }
.text-xs { font-size: 0.75rem; } 
.text-sm { font-size: 0.875rem; } 
.text-lg { font-size: 1.125rem; } 
.text-xl { font-size: 1.25rem; } 
.text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; } 
.font-semibold { font-weight: 600; } 
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; } 
.tracking-wider { letter-spacing: 0.05em; }
.list-disc { list-style-type: disc; } 
.list-inside { list-style-position: inside; }
.cursor-pointer { cursor: pointer; } 
.outline-none { outline: none; }

/* 尺寸 */
.w-full { width: 100%; } 
.h-16 { height: 4rem; }
.w-8 { width: 2rem; } 
.h-8 { height: 2rem; } 
.w-10 { width: 2.5rem; } 
.h-10 { height: 2.5rem; } 
.w-12 { width: 3rem; } 
.h-12 { height: 3rem; }
.w-40 { width: 10rem; }
.transform { transform: translateZ(0); } 
.-translate-y-1\/2 { transform: translateY(-50%); }
.transition-all { transition: var(--transition-all); } 
.transition-colors { transition: var(--transition-all); } 
.duration-300 { transition-duration: 300ms; }
.grid { display: grid; } 
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } 
.gap-1 { gap: 0.25rem; } 
.gap-3 { gap: 0.75rem; } 
.gap-4 { gap: 1rem; } 
.gap-8 { gap: 2rem; }



/* 响应式 */
@media (min-width: 768px) {
    .md\:w-64 { width: 16rem; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .sm\:inline { display: inline; }
}

/* =========================================
   5. 侧边栏
   ========================================= */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.toc-link {
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  border: 2px solid transparent; /* 默认透明边框 */
}

.toc-link:hover {
  color: var(--primary) !important;
  background-color: var(--bg-card) !important;
  box-shadow: var(--shadow-glow) !important;
  border: 2px solid var(--primary) !important; /* hover时显示蓝色边框 */
}

.toc-link.active {
  color: var(--primary);
  font-weight: 500;
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
  border-left: 2px solid var(--primary);
  /* 注意：这里不添加完整的边框，只保留左侧边框以区别于hover状态 */
}

.toc-title { color: white !important; }
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { 
  background: var(--gray-600); 
  border-radius: 2px; 
}
.custom-scrollbar::-webkit-scrollbar-track { 
  background: var(--gray-200); 
  border-radius: 2px; 
}

/* =========================================
   6. 课程卡片 (收缩/展开动画核心)
   ========================================= */
.course-card { 
  position: relative; 
  transition: var(--transition-all); 
  border: 1px solid var(--border-medium); 
  background-color: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
}

.course-card:hover {
  border-color: var(--border-blue);
  box-shadow: 0 0 25px var(--primary-glow);
}

/* 展开时高亮边框 */
#basic .course-card.expanded {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
  animation: glowing 1.5s ease-in-out infinite alternate;
}
#advanced .course-card.expanded {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
  animation: glowing 1.5s ease-in-out infinite alternate;
}

/* 头部样式 */
.course-card .card-header { transition: all 0.3s ease; border-radius: 0.75rem; }
.course-card.expanded .card-header {
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  background-color: var(--bg-card);
}
/* 箭头旋转 */
.course-card .card-header .fa-chevron-down {
  color: var(--gray-500);
  transition: transform 0.3s ease, color 0.3s ease;
}

.course-card.expanded .card-header .fa-chevron-down {
  transform: rotate(180deg) !important;
  color: var(--primary);
}

/* 内容显示动画 */
.course-card .card-body { transition: all 0.3s ease-in-out; }
.course-card.expanded .card-body {
  display: block; 
  animation: expandFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes expandFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes glowing {
  from {
    box-shadow: 0 0 5px var(--primary-glow);
  }
  to {
    box-shadow: 0 0 15px var(--primary-glow), 0 0 25px var(--primary-glow);
  }
}

/* 进阶课程内部 */
.chapter-section:hover {
    background-color: var(--bg-card);
    border-color: var(--border-blue) !important;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* 课程卡片右下角播放按钮 */
.chapter-section::after {
    content: '\f04b'; /* Font Awesome 播放图标 */
    font-family: 'FontAwesome';
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: rgba(0, 204, 255, 0.7);
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 20;
}

.chapter-section:hover::after {
    color: rgba(0, 204, 255, 1);
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}
/* 左侧彩色条 */
.course-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -4px !important;
    width: 4px !important;
    height: 100% !important;
    background: linear-gradient(to bottom, #0000ff, #00ccff) !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease, background 0.3s ease !important;
    border-radius: 4px 0 0 4px !important;
    z-index: 9999 !important;
}

.course-card:hover::before {
    opacity: 1 !important;
    background: linear-gradient(to bottom, #0066ff, #00ffff) !important;
}

/* 确保白色背景卡片也能显示渐变条 */
.bg-white.course-card::before {
    background: linear-gradient(to bottom, #0000ff, #00ccff) !important;
}

.bg-white.course-card:hover::before {
    background: linear-gradient(to bottom, #0066ff, #00ffff) !important;
}
.course-card:hover::before { opacity: 1; }

.hidden-card { display: none !important; }

/* =========================================
   7. Footer
   ========================================= */
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

@media (max-width: 1023px) {
  .lg\:flex-row { flex-direction: column; }
  .lg\:w-64, .xl\:w-72 { width: 100%; }
  .sidebar { margin-bottom: 2rem; }
}

/* =========================================
   8. 产品展示样式
   ========================================= */
.products-showcase-wrapper {
    padding: 100px 0;
    background-color: var(--bg-secondary);
    position: relative;
}

.products-showcase-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.products-showcase-wrapper .container {
    position: relative;
    z-index: 2;
}

/* 单个产品展示 */
.product-showcase {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 800px;
}

.product-showcase:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 204, 255, 0.2), 0 0 25px var(--primary-glow);
    border-color: var(--border-blue);
}

.showcase-content {
    flex: 1;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.showcase-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: center;
}

.showcase-content .version {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary);
    margin-left: 16px;
    text-shadow: var(--shadow-glow);
}

.showcase-content p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 32px;
    color: var(--text-muted);
    text-align: center;
    max-width: 100%;
}

.product-features {
    list-style: none;
    margin: 0 auto 32px;
    padding: 0;
    width: 100%;
    max-width: 600px;
}

.product-features li {
    margin-bottom: 16px;
    padding: 0;
    position: relative;
    font-size: 16px;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-features li::after {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 20px;
    text-shadow: var(--shadow-glow);
}

/* 下载按钮容器 - 用于并排显示Windows和Mac按钮 */
.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* 按钮样式 */
.btn.primary, .btn.secondary {
    background: var(--primary-gradient);
    color: white;
    padding: 14px 40px;
    font-size: 18px;
    position: relative;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    overflow: hidden;
    display: inline-block;
    font-weight: 500;
}

.btn.secondary {
    background: var(--bg-card);
}

.btn.primary:hover, .btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    animation: glowing 1.5s ease-in-out infinite alternate;
    border-color: var(--border-blue);
}

/* 药丸按钮 */
.btn-pill {
    background: var(--primary-gradient);
    color: white;
    padding: 8px 20px;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: var(--shadow-glow);
}

.btn-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--primary-glow);
    animation: glowing 1.5s ease-in-out infinite alternate;
    border: 1px solid var(--border-blue);
}

/* =========================================
   课程页面专用样式
   ========================================= */
/* 移除页面顶部蓝色效果 */
body::before,
body::after,
.header::before,
.header::after {
  display: none !important;
}

/* 确保没有额外的蓝色阴影 */
*:not(.btn):not(.toc-link):not(a) {
  box-shadow: none !important;
}

/* 确保header背景色正确 */
.header {
  background-color: #111111 !important;
  border-bottom-color: var(--gray-700) !important;
}
.is-expanded i:last-child {
  transform: rotate(180deg);
}
/* 首页导航链接样式 */
.home-link a {
  position: relative;
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0 15px;
}

.home-link a:hover {
  color: #00ccff;
}

.home-link a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 15px;
  width: calc(100% - 30px);
  height: 2px;
  background: linear-gradient(90deg, #00ccff, #0066ff);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.home-link a:hover::after {
  transform: scaleX(1);
}

/* 为整个aside标签应用蓝光边框效果 */
aside.is-expanded {
  outline: 1px solid var(--border-blue);
  box-shadow: 0 0 15px var(--primary-glow);
  outline-offset: -1px;
}
/* 保持内部toc div的边框不变 */
aside.is-expanded .toc {
  border: 1px solid var(--border-medium);
}
/* 展开和收起按钮的完整样式 */
.btn-expand-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
  background-color: #000000;
  color: white;
}

.btn-expand:hover,
.btn-collapse:hover {
  border-color: #00ccff;
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.4);
  transform: translateY(-2px);
}

.btn-expand:active,
.btn-collapse:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.3);
}

/* 搜索栏样式 - 重写 */
.search-box {
  position: relative;
  width: 100%;
  max-width: 280px;
  height: 48px;
}

.search-input {
  font-family: inherit;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border: 2px solid rgba(0, 204, 255, 0.2);
  border-radius: 24px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0 48px 0 52px;
  font-size: 14px;
  box-sizing: border-box;
}

/* 使用伪元素代替独立的搜索图标 */
.search-box::before {
  content: '\f002';
  font-family: 'FontAwesome';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  transition: color 0.3s ease;
  z-index: 10;
}

/* 搜索栏右侧装饰伪元素 */
.search-box::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -2px;
  bottom: -2px;
  width: 0;
  background: linear-gradient(to bottom, #0000ff, #00ccff);
  border-radius: 24px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.search-box:hover {
  transform: translateY(-2px);
}

.search-box:hover .search-input {
  border-color: rgba(0, 204, 255, 0.4);
  background-color: rgba(0, 0, 0, 0.9);
  box-shadow: 0 8px 24px rgba(0, 204, 255, 0.15);
}

.search-box:hover .search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  border-color: rgba(0, 204, 255, 0.8);
  background-color: rgba(0, 0, 0, 1);
  box-shadow: 0 8px 24px rgba(0, 204, 255, 0.3);
  outline: none;
  transform: translateY(0); /* 重置hover时的向上移动效果 */
}

.search-box:hover::before {
  color: rgba(0, 204, 255, 0.9);
}

.search-box:hover::after {
  width: calc(100% + 4px);
}

/* 当搜索框获得焦点时，重置容器的transform属性 */
.search-box:focus-within {
  transform: translateY(0);
}

/* 当搜索框获得焦点时，修改搜索图标的颜色 */
.search-box:focus-within::before {
  color: rgba(0, 204, 255, 1);
}/* =========================================
   1. 基础设置
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* =========================================
   2. 导航栏样式
   ========================================= */
.navbar {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* 导航栏容器样式 */
.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}

.title {
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  margin-left: 10px;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.subtitle {
  color: #cccccc;
  font-size: 12px;
  margin-left: 10px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 40px;
}

.nav-links a {
  text-decoration: none;
  color: #cccccc;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ccff, #0066ff);
  transition: width 0.3s ease;
}

/* 激活链接样式 */
.nav-links a.active {
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.nav-links a.active::after {
  width: 100%;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 5.5rem; /* 防止内容被顶部栏遮挡 */
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

/* =========================================
   3. 颜色变量
   ========================================= */
:root {
  /* 主色调 - 蓝色 (参考log_style.css的#00ccff) */
  --primary: #00ccff; /* 主蓝色 */
  --primary-light: #33d6ff; /* 蓝色浅色变体 */
  --primary-dark: #0099cc; /* 蓝色深色变体 */
  --primary-hover: #00aaff; /* 蓝色悬停色 */
  --primary-gradient: linear-gradient(135deg, #00ccff, #33d6ff); /* 蓝色渐变 */
  --primary-glow: rgba(0, 204, 255, 0.3); /* 蓝色发光效果 */
  
  /* 基础颜色 - 黑白 */
  --white: #ffffff; /* 白色 */
  --black: #000000; /* 黑色 */
  
  /* 中性色 - 灰色系列 */
  --gray-50: #f9fafb; /* 极浅灰色 */
  --gray-100: #f3f4f6; /* 浅灰色 */
  --gray-200: #e5e7eb; /* 中浅灰色 */
  --gray-300: #d1d5db; /* 中灰色 */
  --gray-400: #9ca3af; /* 中深灰色 */
  --gray-500: #6b7280; /* 深灰色 */
  --gray-600: #4b5563; /* 更深灰色 */
  --gray-700: #374151; /* 暗灰色 */
  --gray-800: #1f2937; /* 很暗灰色 */
  --gray-900: #111827; /* 极暗灰色 */
  --gray-950: #030712; /* 近黑色 */
  
  /* 背景色 - 黑色主题 (参考log_style.css) */
  --bg-primary: #000000; /* 主背景色 - 黑色 */
  --bg-secondary: #1a1a1a; /* 次背景色 - 深灰色 */
  --bg-card: rgba(10, 10, 10, 0.7); /* 卡片背景色 - 半透明黑色 */
  --bg-hover: rgba(0, 204, 255, 0.1); /* 悬停背景色 - 蓝色透明 */
  
  /* 文本色 - 黑白 (参考log_style.css) */
  --text-primary: #ffffff; /* 主要文本色 - 白色 */
  --text-secondary: #e0e0e0; /* 次要文本色 - 浅灰色 */
  --text-muted: #888888; /*  muted文本色 - 中灰色 */
  
  /* 边框色 - 白色透明和蓝色 (参考log_style.css) */
  --border-light: rgba(255, 255, 255, 0.1); /* 浅色边框 */
  --border-medium: rgba(255, 255, 255, 0.3); /* 中色边框 */
  --border-dark: rgba(255, 255, 255, 0.5); /* 深色边框 */
  --border-blue: rgba(0, 204, 255, 0.5); /* 蓝色边框 */
  
  /* 状态色 - 使用蓝色 */
  --success: #00ccff; /* 成功色 - 蓝色 */
  --warning: #ffffff; /* 警告色 - 白色 */
  --error: #ffffff; /* 错误色 - 白色 */
  --info: #00ccff; /* 信息色 - 蓝色 */
  
  /* 辅助色 - 统一使用蓝色 */
  --accent: #00ccff; /* 强调色 - 蓝色 */
  --accent-light: #33d6ff; /* 强调色浅色变体 */
  --accent-dark: #0099cc; /* 强调色深色变体 */
  --accent-glow: rgba(0, 204, 255, 0.3); /* 强调色发光效果 */
  
  /* 阴影效果 (参考log_style.css) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* 小阴影 */
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* 中阴影 */
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* 大阴影 */
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* 超大阴影 */
  --shadow-glow: 0 0 15px var(--primary-glow); /* 发光效果阴影 - 使用主色发光 */
  --shadow-strong-glow: 0 0 25px var(--primary-glow); /* 强烈发光效果阴影 */
  --shadow-accent-glow: 0 0 15px var(--accent-glow); /* 强调色发光效果 */
  
  /* 过渡动画 */
  --transition-all: all 300ms ease-in-out; /* 全局过渡效果 */
  --transition-fast: all 150ms ease-in-out; /* 快速过渡效果 */
  --transition-slow: all 500ms ease-in-out; /* 慢速过渡效果 */
  --transition-transform: transform 300ms ease-in-out; /* 变换过渡 */
  --transition-opacity: opacity 300ms ease-in-out; /* 透明度过渡 */
}

/* =========================================
   3. 工具类 & 布局
   ========================================= */

/* 滚动动画类 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* 延迟类定义 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }
.delay-8 { transition-delay: 0.8s; }
.delay-9 { transition-delay: 0.9s; }
.delay-10 { transition-delay: 1.0s; }

/* 动画效果应用类 */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.float {
  animation: float 3s ease-in-out infinite;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.glow {
  box-shadow: 0 0 15px var(--primary-glow);
}

/* 滚动时隐藏的元素 */
.hidden-on-scroll {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 悬停放大效果 */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* 渐变流动背景 */
.gradient-bg {
  background: var(--primary-gradient);
  background-size: 200% 200%;
  animation: gradientFlow 5s ease infinite;
}


.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-20 { top: 5rem; }
.z-100 { z-index: 100; } 

/* 确保 hidden 类具有最高优先级 */
.hidden { display: none !important; }

/* 间距 */
.mt-1 { margin-top: 0.25rem; } .mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } .mb-12 { margin-bottom: 3rem; }
.ml-2 { margin-left: 0.5rem; } .ml-3 { margin-left: 0.75rem; } .ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; } .mr-3 { margin-right: 0.75rem; } .mr-4 { margin-right: 1rem; }
.p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; } .py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; } .py-8 { padding-top: 2rem; padding-bottom: 2rem; } .py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.pl-2 { padding-left: 0.5rem; } .pl-4 { padding-left: 1rem; } .pl-9 { padding-left: 2.25rem; } 
.pr-4 { padding-right: 1rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

/* 装饰 */
.rounded-md { border-radius: 0.375rem; } 
.rounded-lg { border-radius: 0.5rem; } 
.rounded-xl { border-radius: 0.75rem; } 
.rounded-full { border-radius: 9999px; } 

.border { border: 1px solid var(--border-light); } 
.border-t { border-top: 1px solid var(--border-light); } 
.border-l-2 { border-left-width: 2px; } 
.border-l-4 { border-left-width: 4px; } 

.border-transparent { border-color: transparent; } 
.border-gray-100 { border-color: var(--border-light); } 
.border-gray-300 { border-color: var(--border-medium); } 
.border-accent { border-color: var(--accent); } 

.bg-white { background-color: var(--bg-card); } 
.bg-gray-50 { background-color: var(--bg-secondary); } 
.bg-gray-100 { background-color: var(--bg-card); } 
.bg-gray-900 { background-color: var(--bg-primary); } 

.bg-primary { background-color: var(--primary); } 
.bg-primary\/10 { background-color: var(--primary-light); } 

.bg-accent { background-color: var(--accent); } 
.bg-accent\/10 { background-color: var(--accent-light); } 

.hover\:bg-gray-50:hover { background-color: var(--bg-card); }

/* 文字 */
.text-white { color: var(--text-primary); } 
.text-primary { color: var(--primary); } 
.text-accent { color: var(--accent); } 
.text-accent\/50 { color: rgba(0, 204, 255, 0.5); } 

.text-gray-300 { color: var(--text-muted); } 
.text-gray-400 { color: var(--text-secondary); } 
.text-gray-500 { color: var(--text-muted); } 
.text-gray-800 { color: var(--text-primary); } 
.text-success { color: var(--success); } 
.text-warning { color: var(--warning); } 
.text-error { color: var(--error); } 
.text-info { color: var(--info); } 

.hover\:text-primary:hover { color: var(--primary-hover); }
.text-xs { font-size: 0.75rem; } 
.text-sm { font-size: 0.875rem; } 
.text-lg { font-size: 1.125rem; } 
.text-xl { font-size: 1.25rem; } 
.text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; } 
.font-semibold { font-weight: 600; } 
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; } 
.tracking-wider { letter-spacing: 0.05em; }
.list-disc { list-style-type: disc; } 
.list-inside { list-style-position: inside; }
.cursor-pointer { cursor: pointer; } 
.outline-none { outline: none; }

/* 尺寸 */
.w-full { width: 100%; } 
.h-16 { height: 4rem; }
.w-8 { width: 2rem; } 
.h-8 { height: 2rem; } 
.w-10 { width: 2.5rem; } 
.h-10 { height: 2.5rem; } 
.w-12 { width: 3rem; } 
.h-12 { height: 3rem; }
.w-40 { width: 10rem; }
.transform { transform: translateZ(0); } 
.-translate-y-1\/2 { transform: translateY(-50%); }
.transition-all { transition: var(--transition-all); } 
.transition-colors { transition: var(--transition-all); } 
.duration-300 { transition-duration: 300ms; }
.grid { display: grid; } 
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } 
.gap-1 { gap: 0.25rem; } 
.gap-3 { gap: 0.75rem; } 
.gap-4 { gap: 1rem; } 
.gap-8 { gap: 2rem; }



/* 响应式 */
@media (min-width: 768px) {
    .md\:w-64 { width: 16rem; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .sm\:inline { display: inline; }
}

/* =========================================
   5. 侧边栏
   ========================================= */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.toc-link {
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  border: 2px solid transparent; /* 默认透明边框 */
}

.toc-link:hover {
  color: var(--primary) !important;
  background-color: var(--bg-card) !important;
  box-shadow: var(--shadow-glow) !important;
  border: 2px solid var(--primary) !important; /* hover时显示蓝色边框 */
}

.toc-link.active {
  color: var(--primary);
  font-weight: 500;
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
  border-left: 2px solid var(--primary);
  /* 注意：这里不添加完整的边框，只保留左侧边框以区别于hover状态 */
}

.toc-title { color: white !important; }
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { 
  background: var(--gray-600); 
  border-radius: 2px; 
}
.custom-scrollbar::-webkit-scrollbar-track { 
  background: var(--gray-200); 
  border-radius: 2px; 
}

/* =========================================
   6. 课程卡片 (收缩/展开动画核心)
   ========================================= */
.course-card { 
  position: relative; 
  transition: var(--transition-all); 
  border: 1px solid var(--border-medium); 
  background-color: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
}

.course-card:hover {
  border-color: var(--border-blue);
  box-shadow: 0 0 25px var(--primary-glow);
}

/* 展开时高亮边框 */
#basic .course-card.expanded {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
  animation: glowing 1.5s ease-in-out infinite alternate;
}
#advanced .course-card.expanded {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
  animation: glowing 1.5s ease-in-out infinite alternate;
}

/* 头部样式 */
.course-card .card-header { transition: all 0.3s ease; border-radius: 0.75rem; }
.course-card.expanded .card-header {
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  background-color: var(--bg-card);
}
/* 箭头旋转 */
.course-card .card-header .fa-chevron-down {
  color: var(--gray-500);
  transition: transform 0.3s ease, color 0.3s ease;
}

.course-card.expanded .card-header .fa-chevron-down {
  transform: rotate(180deg) !important;
  color: var(--primary);
}

/* 内容显示动画 */
.course-card .card-body { transition: all 0.3s ease-in-out; }
.course-card.expanded .card-body {
  display: block; 
  animation: expandFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes expandFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes glowing {
  from {
    box-shadow: 0 0 5px var(--primary-glow);
  }
  to {
    box-shadow: 0 0 15px var(--primary-glow), 0 0 25px var(--primary-glow);
  }
}

/* 进阶课程内部 */
.chapter-section:hover {
    background-color: var(--bg-card);
    border-color: var(--border-blue) !important;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* 当章节悬停时，播放按钮也产生效果 */
.chapter-section:hover .play-button {
    background-color: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 204, 255, 0.3);
}

/* 课程卡片右下角播放按钮 */
/* 注释掉伪元素播放按钮，因为我们已经在HTML中添加了真实的播放按钮
.chapter-section::after {
    content: '\f04b'; 
    font-family: 'FontAwesome';
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: rgba(0, 204, 255, 0.7);
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 20;
}

.chapter-section:hover::after {
    color: rgba(0, 204, 255, 1);
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}
*/

/* 播放按钮样式 */
.play-button {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.play-button:hover {
  background-color: var(--primary-dark);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 204, 255, 0.3);
}

.play-button:disabled,
.play-button.disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.play-button i {
  font-size: 16px;
  margin-left: 2px; /* 播放图标居中微调 */
}
.course-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -4px !important;
    width: 4px !important;
    height: 100% !important;
    background: linear-gradient(to bottom, #0000ff, #00ccff) !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease, background 0.3s ease !important;
    border-radius: 4px 0 0 4px !important;
    z-index: 9999 !important;
}

.course-card:hover::before {
    opacity: 1 !important;
    background: linear-gradient(to bottom, #0066ff, #00ffff) !important;
}

/* 确保白色背景卡片也能显示渐变条 */
.bg-white.course-card::before {
    background: linear-gradient(to bottom, #0000ff, #00ccff) !important;
}

.bg-white.course-card:hover::before {
    background: linear-gradient(to bottom, #0066ff, #00ffff) !important;
}
.course-card:hover::before { opacity: 1; }

.hidden-card { display: none !important; }

/* =========================================
   7. Footer
   ========================================= */
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

@media (max-width: 1023px) {
  .lg\:flex-row { flex-direction: column; }
  .lg\:w-64, .xl\:w-72 { width: 100%; }
  .sidebar { margin-bottom: 2rem; }
}

/* =========================================
   8. 产品展示样式
   ========================================= */
.products-showcase-wrapper {
    padding: 100px 0;
    background-color: var(--bg-secondary);
    position: relative;
}

.products-showcase-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.products-showcase-wrapper .container {
    position: relative;
    z-index: 2;
}

/* 单个产品展示 */
.product-showcase {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 800px;
}

.product-showcase:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 204, 255, 0.2), 0 0 25px var(--primary-glow);
    border-color: var(--border-blue);
}

.showcase-content {
    flex: 1;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.showcase-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: center;
}

.showcase-content .version {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary);
    margin-left: 16px;
    text-shadow: var(--shadow-glow);
}

.showcase-content p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 32px;
    color: var(--text-muted);
    text-align: center;
    max-width: 100%;
}

.product-features {
    list-style: none;
    margin: 0 auto 32px;
    padding: 0;
    width: 100%;
    max-width: 600px;
}

.product-features li {
    margin-bottom: 16px;
    padding: 0;
    position: relative;
    font-size: 16px;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-features li::after {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 20px;
    text-shadow: var(--shadow-glow);
}

/* 下载按钮容器 - 用于并排显示Windows和Mac按钮 */
.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* 按钮样式 */
.btn.primary, .btn.secondary {
    background: var(--primary-gradient);
    color: white;
    padding: 14px 40px;
    font-size: 18px;
    position: relative;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    overflow: hidden;
    display: inline-block;
    font-weight: 500;
}

.btn.secondary {
    background: var(--bg-card);
}

.btn.primary:hover, .btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    animation: glowing 1.5s ease-in-out infinite alternate;
    border-color: var(--border-blue);
}

/* 药丸按钮 */
.btn-pill {
    background: var(--primary-gradient);
    color: white;
    padding: 8px 20px;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: var(--shadow-glow);
}

.btn-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--primary-glow);
    animation: glowing 1.5s ease-in-out infinite alternate;
    border: 1px solid var(--border-blue);
}

/* =========================================
   课程页面专用样式
   ========================================= */
/* 移除页面顶部蓝色效果 */
body::before,
body::after,
.header::before,
.header::after {
  display: none !important;
}

/* 确保没有额外的蓝色阴影 */
*:not(.btn):not(.toc-link) {
  box-shadow: none !important;
}

/* 确保header背景色正确 */
.header {
  background-color: #111111 !important;
  border-bottom-color: var(--gray-700) !important;
}
.is-expanded i:last-child {
  transform: rotate(180deg);
}
/* 首页导航链接样式 */
.home-link a {
  position: relative;
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0 15px;
}

.home-link a:hover {
  color: #00ccff;
}

.home-link a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 15px;
  width: calc(100% - 30px);
  height: 2px;
  background: linear-gradient(90deg, #00ccff, #0066ff);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.home-link a:hover::after {
  transform: scaleX(1);
}

/* 为整个aside标签应用蓝光边框效果 */
aside.is-expanded {
  outline: 1px solid var(--border-blue);
  box-shadow: 0 0 15px var(--primary-glow);
  outline-offset: -1px;
}
/* 保持内部toc div的边框不变 */
aside.is-expanded .toc {
  border: 1px solid var(--border-medium);
}
/* 展开和收起按钮的完整样式 */
.btn-expand-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
  background-color: #000000;
  color: white;
}

.btn-expand:hover,
.btn-collapse:hover {
  border-color: #00ccff;
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.4);
  transform: translateY(-2px);
}

.btn-expand:active,
.btn-collapse:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.3);
}

/* 搜索栏样式 - 重写 */
.search-box {
  position: relative;
  width: 100%;
  max-width: 280px;
  height: 48px;
}

.search-input {
  font-family: inherit;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border: 2px solid rgba(0, 204, 255, 0.2);
  border-radius: 24px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0 48px 0 52px;
  font-size: 14px;
  box-sizing: border-box;
}

/* 使用伪元素代替独立的搜索图标 */
.search-box::before {
  content: '\f002';
  font-family: 'FontAwesome';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  transition: color 0.3s ease;
  z-index: 10;
}

/* 搜索栏右侧装饰伪元素 */
.search-box::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -2px;
  bottom: -2px;
  width: 0;
  background: linear-gradient(to bottom, #0000ff, #00ccff);
  border-radius: 24px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.search-box:hover {
  transform: translateY(-2px);
}

.search-box:hover .search-input {
  border-color: rgba(0, 2