:root {
  --primary: #4F46E5;         /* 主要颜色 - 蓝紫色 */
  --primary-hover: #4338CA;   /* 主要颜色悬停状态 */
  --secondary: #10B981;       /* 次要颜色 - 绿色 */
  --dark: #111827;            /* 深色背景 */
  --blue-400: #60A5FA;        /* 蓝色色阶 */
  --blue-500: #3B82F6;
  --purple-400: #A78BFA;      /* 紫色色阶 */
  --purple-500: #8B5CF6;
}

/* 全局基础样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 基本HTML元素样式 */
html {
  scroll-behavior: smooth;    /* 启用平滑滚动效果 */
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: #111827;
  color: #fff;
}

/* 代码和终端文本专用字体 */
.code-text, .terminal-text {
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 文本渐变效果 */
.text-gradient {
  background: linear-gradient(to right, var(--blue-400), var(--purple-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* 毛玻璃效果组件 */
.glassmorphism {
  background: rgba(31, 41, 55, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

/* 标题样式 */
#features h2, .download-section h2, .resources-title {
  line-height: 1.4;
  margin-bottom: 2.5rem;
  padding-bottom: 0.5rem;
}

/* 页脚毛玻璃效果 */
.footer-glassmorphism {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 阴影发光效果 */
.shadow-glow {
  box-shadow: 0 0 30px rgba(96, 165, 250, 0.2);
}

/* 导航栏样式 */
#navbar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* 导航栏滚动后的样式变化 */
#navbar.scrolled {
  background-color: rgba(17, 24, 39, 0.8);
  box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

/* 导航链接样式 */
.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 1);
}

/* 导航链接悬停下划线动画效果 */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--blue-400), var(--purple-400));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* 按钮基础样式 */
.primary-btn, .secondary-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 按钮图标样式 */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* 主要按钮样式 */
.primary-btn {
  background: linear-gradient(to right, var(--blue-500), var(--purple-500));
}

.primary-btn:hover {
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

/* 按钮光效动画 */
.primary-btn::before, .secondary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.primary-btn:hover::before, .secondary-btn:hover::before {
  left: 100%;
}

/* 次要按钮样式 */
.secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.secondary-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.3);
}

/* 英雄区背景渐变 */
.hero-background {
  background: radial-gradient(circle at center, #1a1f35 0%, #131B2C 50%, #0F172A 100%);
}

/* 网格叠加层效果 */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, rgba(17, 24, 39, 0.1) 1px, transparent 1px),
                   linear-gradient(to bottom, rgba(17, 24, 39, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: 1;
}

/* 图片高亮效果 */
.highlight-image {
  filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.5));
}

/* 3D卡片效果 */
.card-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.3s ease;
}

/* 图标容器样式 */
.icon-container {
  font-size: 2rem;
  padding: 1rem;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 悬停发光效果 */
.glow-on-hover {
  position: relative;
  overflow: hidden;
}

.glow-on-hover::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: scale(0.5);
  z-index: -1;
}

.glow-on-hover:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* 资源卡片样式 */
.resources-box {
  background: rgba(31, 41, 55, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
  transition: all 0.3s ease;
}

.resources-box:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 15px 30px -10px rgba(96, 165, 250, 0.2);
}

/* 架构图相关样式 */
.architecture-diagram {
  position: relative;
  z-index: 2;
}

.architecture-container, .arch-layer, .channel-label, .protocol-label {
  transition: all 0.3s ease;
}

.arch-layer {
  z-index: 2;
}

.connection-line {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}

/* 终端文本样式 */
.terminal-text {
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
  line-height: 1.6;
}

/* 终端光标闪烁动画 */
.terminal-text::after {
  content: '█';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

/* 粒子背景效果 */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: transparent;
  z-index: 1;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
  .feature-card, .resources-box {
    margin-bottom: 1.5rem;
  }
  
  .terminal-body {
    font-size: 0.75rem;
  }
}