/* 添加字体预加载优化 */
@font-face {
  font-display: swap;
}

/* =========================================
   2. 导航栏样式
   ========================================= */
.navbar {
  background-color: rgba(10, 10, 10, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  /* 添加布局稳定性 */
  contain: layout style;
  /* 添加硬件加速 */
  transform: translateZ(0);
}

/* 导航栏容器样式 */
.navbar-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  /* 添加布局稳定性 */
  contain: layout style;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
  gap: 15px;
  /* 添加布局稳定性 */
  contain: layout style;
}

.logo-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
  /* 添加布局稳定性 */
  contain: layout style;
  /* 添加硬件加速 */
  transform: translateZ(0);
}

.logo .title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  display: block;
  /* 添加布局稳定性 */
  contain: layout style;
}

.logo .subtitle {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  display: block;
  /* 添加布局稳定性 */
  contain: layout style;
}

.nav-links {
  display: flex;
  list-style: none;
  /* 添加布局稳定性 */
  contain: layout style;
}

.nav-links li {
  margin-left: 40px;
  /* 添加布局稳定性 */
  contain: layout style;
}

.nav-links a {
  text-decoration: none;
  color: #cccccc;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  /* 添加布局稳定性 */
  contain: layout style;
}

.nav-links a:hover {
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.nav-links a.first {
  color: #00ccff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.nav-links a.first::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:hover::after {
  width: 100%;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 5.5rem; /* 防止内容被顶部栏遮挡 */
  /* 添加布局稳定性 */
  contain: layout style;
  /* 防止页面加载时的抖动 */
  height: 100%;
  /* 添加硬件加速 */
  transform: translateZ(0);
  /* 防止滚动条出现导致的布局偏移 */
  margin-left: calc(100vw - 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #ffffff;
  background-color: #0a0a0a;
  overflow-x: hidden;
  /* 添加布局稳定性 */
  contain: layout style;
  /* 确保body高度以防止布局偏移 */
  min-height: 100vh;
  /* 添加硬件加速 */
  transform: translateZ(0);
}

/* =========================================
   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: #0a0a0a; /* 主背景色 - 黑色 */
  --bg-secondary: #1a1a1a; /* 次背景色 - 深灰色 */
  --bg-card: rgba(26, 26, 26, 0.95); /* 卡片背景色 - 半透明黑色 */
  --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;
  /* 添加布局稳定性 */
  min-height: 100px;
  /* 添加内容可见性优化，提高渲染性能 */
  content-visibility: auto;
  contain-intrinsic-size: 1px 300px;
  /* 添加硬件加速 */
  transform: translateZ(0);
  /* 防止子元素影响布局 */
  contain: layout style;
}

.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: 1200px; 
  margin: 0 auto; 
  padding: 0 20px; 
  /* 添加布局稳定性 */
  contain: layout style;
  /* 添加硬件加速 */
  transform: translateZ(0);
}

@media (min-width: 640px) { 
  .container { 
    padding: 0 1.5rem; 
  } 
}

/* 其他样式保持不变... */
.flex { 
  display: flex; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.flex-col { 
  flex-direction: column; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.items-center { 
  align-items: center; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.justify-between { 
  justify-content: space-between; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.shrink-0 { 
  flex-shrink: 0; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.flex-1 { 
  flex: 1; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.relative { 
  position: relative; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.absolute { 
  position: absolute; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.sticky { 
  position: sticky; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.top-0 { 
  top: 0; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.top-20 { 
  top: 5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.z-100 { 
  z-index: 100; 
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 确保 hidden 类具有最高优先级 */
.hidden { 
  display: none !important; 
  /* 添加布局稳定性 */
  contain: layout style;
  /* 添加硬件加速以防止布局变化时的重绘 */
  transform: translateZ(0);
}

/* 间距 */
.mt-1 { 
  margin-top: 0.25rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.mt-4 { 
  margin-top: 1rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.mb-4 { 
  margin-bottom: 1rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.mb-6 { 
  margin-bottom: 1.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.mb-8 { 
  margin-bottom: 2rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.mb-12 { 
  margin-bottom: 3rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.ml-2 { 
  margin-left: 0.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.ml-3 { 
  margin-left: 0.75rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.ml-auto { 
  margin-left: auto; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.mr-2 { 
  margin-right: 0.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.mr-3 { 
  margin-right: 0.75rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.mr-4 { 
  margin-right: 1rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.p-3 { 
  padding: 0.75rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.p-4 { 
  padding: 1rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.p-5 { 
  padding: 1.25rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.p-6 { 
  padding: 1.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.py-1\.5 { 
  padding-top: 0.375rem; 
  padding-bottom: 0.375rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.py-2\.5 { 
  padding-top: 0.625rem; 
  padding-bottom: 0.625rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.py-8 { 
  padding-top: 2rem; 
  padding-bottom: 2rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.py-12 { 
  padding-top: 3rem; 
  padding-bottom: 3rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.px-2 { 
  padding-left: 0.5rem; 
  padding-right: 0.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.px-3 { 
  padding-left: 0.75rem; 
  padding-right: 0.75rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.pl-2 { 
  padding-left: 0.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.pl-4 { 
  padding-left: 1rem; 
  /* 添加布局稳定性 */
  contain: layout style;
} 

.pl-9 { 
  padding-left: 2.25rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.pr-4 { 
  padding-right: 1rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.space-x-2 > :not([hidden]) ~ :not([hidden]) { 
  margin-left: 0.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.space-x-3 > :not([hidden]) ~ :not([hidden]) { 
  margin-left: 0.75rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.space-y-1 > :not([hidden]) ~ :not([hidden]) { 
  margin-top: 0.25rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { 
  margin-top: 0.375rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) { 
  margin-top: 1rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.space-y-5 > :not([hidden]) ~ :not([hidden]) { 
  margin-top: 1.25rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) { 
  margin-top: 1.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 装饰 */
.rounded-md { 
  border-radius: 0.375rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.rounded-lg { 
  border-radius: 0.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.rounded-xl { 
  border-radius: 0.75rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.rounded-full { 
  border-radius: 9999px; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.border { 
  border: 1px solid var(--border-light); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.border-t { 
  border-top: 1px solid var(--border-light); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.border-l-2 { 
  border-left-width: 2px; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.border-l-4 { 
  border-left-width: 4px; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.border-transparent { 
  border-color: transparent; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.border-gray-100 { 
  border-color: var(--border-light); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.border-gray-300 { 
  border-color: var(--border-medium); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.border-accent { 
  border-color: var(--accent); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.bg-white { 
  background-color: var(--bg-card); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.bg-gray-50 { 
  background-color: var(--bg-secondary); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.bg-gray-100 { 
  background-color: var(--bg-card); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.bg-gray-900 { 
  background-color: var(--bg-primary); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.bg-primary { 
  background-color: var(--primary); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.bg-primary\/10 { 
  background-color: var(--primary-light); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.bg-accent { 
  background-color: var(--accent); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.bg-accent\/10 { 
  background-color: var(--accent-light); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.hover\:bg-gray-50:hover { 
  background-color: var(--bg-card); 
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 文字 */
.text-white { 
  color: var(--text-primary); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-primary { 
  color: var(--primary); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-accent { 
  color: var(--accent); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-accent\/50 { 
  color: rgba(0, 204, 255, 0.5); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-gray-300 { 
  color: var(--text-muted); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-gray-400 { 
  color: var(--text-secondary); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-gray-500 { 
  color: var(--text-muted); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-gray-800 { 
  color: var(--text-primary); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-success { 
  color: var(--success); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-warning { 
  color: var(--warning); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-error { 
  color: var(--error); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-info { 
  color: var(--info); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.hover\:text-primary:hover { 
  color: var(--primary-hover); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-xs { 
  font-size: 0.75rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-sm { 
  font-size: 0.875rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-lg { 
  font-size: 1.125rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-xl { 
  font-size: 1.25rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.text-2xl { 
  font-size: 1.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.font-medium { 
  font-weight: 500; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.font-semibold { 
  font-weight: 600; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.font-bold { 
  font-weight: 700; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.uppercase { 
  text-transform: uppercase; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.tracking-wider { 
  letter-spacing: 0.05em; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.list-disc { 
  list-style-type: disc; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.list-inside { 
  list-style-position: inside; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.cursor-pointer { 
  cursor: pointer; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.outline-none { 
  outline: none; 
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 尺寸 */
.w-full { 
  width: 100%; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.h-16 { 
  height: 4rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.w-8 { 
  width: 2rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.h-8 { 
  height: 2rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.w-10 { 
  width: 2.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.h-10 { 
  height: 2.5rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.w-12 { 
  width: 3rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.h-12 { 
  height: 3rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.w-40 { 
  width: 10rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.transform { 
  transform: translateZ(0); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.-translate-y-1\/2 { 
  transform: translateY(-50%); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.transition-all { 
  transition: var(--transition-all); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.transition-colors { 
  transition: var(--transition-all); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.duration-300 { 
  transition-duration: 300ms; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.grid { 
  display: grid; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.grid-cols-1 { 
  grid-template-columns: repeat(1, minmax(0, 1fr)); 
  /* 添加布局稳定性 */
  contain: layout style;
}

.gap-1 { 
  gap: 0.25rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.gap-3 { 
  gap: 0.75rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.gap-4 { 
  gap: 1rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.gap-8 { 
  gap: 2rem; 
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 响应式 */
@media (min-width: 768px) {
  .md\:w-64 { 
    width: 16rem; 
    /* 添加布局稳定性 */
    contain: layout style;
  }
  
  .md\:grid-cols-2 { 
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    /* 添加布局稳定性 */
    contain: layout style;
  }
  
  .md\:block { 
    display: block; 
    /* 添加布局稳定性 */
    contain: layout style;
  }
  
  .md\:hidden { 
    display: none; 
    /* 添加布局稳定性 */
    contain: layout style;
  }
  
  .sm\:inline { 
    display: inline; 
    /* 添加布局稳定性 */
    contain: layout style;
  }
}

/* =========================================
   5. 侧边栏
   ========================================= */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  /* 添加布局稳定性 */
  contain: layout style;
}

.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; /* 默认透明边框 */
  /* 添加布局稳定性 */
  contain: layout style;
}

.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; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

.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; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.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; 
  /* 添加布局稳定性 */
  contain: layout style;
}

.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; 
  /* 添加布局稳定性 */
  contain: layout style;
}

/* =========================================
   7. Footer
   ========================================= */
.footer::before {
  content: ''; 
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  /* 添加布局稳定性 */
  contain: layout style;
}

@media (max-width: 1023px) {
  .lg\:flex-row { 
    flex-direction: column; 
    /* 添加布局稳定性 */
    contain: layout style;
  }
  
  .lg\:w-64, .xl\:w-72 { 
    width: 100%; 
    /* 添加布局稳定性 */
    contain: layout style;
  }
  
  .sidebar { 
    margin-bottom: 2rem; 
    /* 添加布局稳定性 */
    contain: layout style;
  }
}

/* =========================================
   8. 产品展示样式
   ========================================= */
.products-showcase-wrapper {
  padding: 100px 0 20px;
  background-color: var(--bg-secondary);
  position: relative;
  /* 添加布局稳定性 */
  contain: layout style;
  /* 添加顶部边距以补偿固定导航栏 */
  margin-top: 80px;
  /* 添加硬件加速 */
  transform: translateZ(0);
}

.products-showcase-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  /* 添加布局稳定性 */
  contain: layout style;
}

.products-showcase-wrapper .container {
  position: relative;
  z-index: 2;
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 单个产品展示 */
.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;
  /* 添加布局稳定性 */
  contain: layout style;
  /* 添加硬件加速 */
  transform: translateZ(0);
}

.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%;
  /* 添加布局稳定性 */
  contain: layout style;
}

.showcase-content h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  text-align: center;
  /* 添加布局稳定性 */
  contain: layout style;
}

.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);
  /* 添加布局稳定性 */
  contain: layout style;
}

.showcase-content p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
  color: var(--text-muted);
  text-align: center;
  max-width: 100%;
  /* 添加布局稳定性 */
  contain: layout style;
}

.product-features {
  list-style: none;
  margin: 0 auto 32px;
  padding: 0;
  width: 100%;
  max-width: 600px;
  /* 添加布局稳定性 */
  contain: layout style;
}

.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

.product-features li::after {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 20px;
  text-shadow: var(--shadow-glow);
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 下载按钮容器 - 用于并排显示Windows和Mac按钮 */
.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  /* 添加布局稳定性 */
  contain: layout style;
}

/* Android教程垂直布局 */
.android-tutorial {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  width: 210px;
  height: 80px;
  box-sizing: border-box;
  /* 添加布局稳定性 */
  contain: layout style;
}

.android-tutorial .tutorial-text,
.android-tutorial .making-text {
  text-align: center;
  width: 100%;
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 按钮样式 */
.btn.primary, .btn.secondary {
  background: var(--primary-gradient);
  color: white;
  width: 210px;
  height: 80px;
  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;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  /* 添加布局稳定性 */
  contain: layout style;
  /* 添加硬件加速 */
  transform: translateZ(0);
}

.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);
  /* 添加布局稳定性 */
  contain: layout style;
}

.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

.is-expanded i:last-child {
  transform: rotate(180deg);
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 首页导航链接样式 */
.home-link a {
  position: relative;
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0 15px;
  /* 添加布局稳定性 */
  contain: layout style;
}

.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 保持内部toc div的边框不变 */
aside.is-expanded .toc {
  border: 1px solid var(--border-medium);
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 展开和收起按钮的完整样式 */
.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 使用伪元素代替独立的搜索图标 */
.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 搜索栏右侧装饰伪元素 */
.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;
  /* 添加布局稳定性 */
  contain: layout style;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
  /* 添加布局稳定性 */
  contain: layout style;
}

.search-box:hover {
  transform: translateY(-2px);
  /* 添加布局稳定性 */
  contain: layout style;
}

.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);
  /* 添加布局稳定性 */
  contain: layout style;
}

/* 当搜索框获得焦点时，修改搜索图标的颜色 */
.search-box:focus-within::before {
  color: rgba(0, 204, 255, 1);
}