
/* 定义颜色变量，确保色彩协调 */
:root {
  --primary-color: #0E2C53; /* 主色调：深蓝色，营造科技感与专业性 */
  --background-color: #F8F9FA; /* 背景色：浅灰色，提供舒适的视觉体验 */
  --accent-color-1: #4CAF50; /* 辅助色1：亮绿色，用于按钮和重点信息 */
  --accent-color-2: #FF9800; /* 辅助色2：橙色，用于强调和交互效果 */
  --text-color: #333333; /* 文字颜色 */
  --shadow-color: rgba(0, 0, 0, 0.1); /* 阴影颜色 */
}

/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  background: var(--background-color);
  color: var(--text-color);
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(14, 44, 83, 0.9); /* 半透明背景，增强层次感 */
  backdrop-filter: blur(10px); /* 背景模糊效果 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  z-index: 1000;
  box-shadow: 0 2px 5px var(--shadow-color); /* 细微阴影，提升立体感 */
}

/* 导航栏logo样式 */
.navbar .logo a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
}

/* 导航菜单样式 */
.navbar ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.navbar li {
  position: relative;
}

/* 导航链接样式 */
.navbar a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: var(--accent-color-1);
}

/* 多级菜单隐藏与显示 */
.navbar li ul {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background: rgba(14, 44, 83, 0.95);
  list-style: none;
  padding: 10px 0;
  border-radius: 5px;
}

.navbar li:hover ul {
  display: block;
}

/* 多级菜单项样式 */
.navbar li ul li {
  padding: 10px 20px;
}

.navbar li ul li a:hover {
  color: var(--accent-color-2);
}

/* 主内容区域布局 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 20px;
  padding: 100px 30px 30px 30px; /* 顶部留出导航栏空间 */
}

/* 侧边导航栏样式 */
.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

.sidebar a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.sidebar a:hover {
  color: var(--accent-color-1);
}

/* 文章样式 */
article {
  max-width: 800px;
}

article h1 {
  font-size: 32px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--accent-color-1);
}

article h2, article h3, article h4 {
  color: var(--primary-color);
}

article p {
  font-size: 16px;
  margin-bottom: 15px;
}

/* 代码块样式 */
article pre {
  background: #272822;
  color: #f8f8f2;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  margin: 20px 0;
}

article code {
  font-family: 'Courier New', Courier, monospace;
}

/* 按钮样式 */
.button, .dynamic-button {
  background: var(--accent-color-1);
  color: #fff;
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  font-size: 16px;
}

.button:hover, .dynamic-button:hover {
  background: var(--accent-color-2);
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 图片样式，包含圆角和阴影效果 */
img {
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 12px var(--shadow-color);
}

/* 模态弹窗背景样式 */
.modal {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
}

/* 模态弹窗显示状态 */
.modal.active {
  display: flex;
}

/* 模态弹窗内容样式 */
.modal-content {
  background: #F8F9FA;
  padding: 30px;
  border-radius: 10px;
  position: relative;
  animation: slideDown 0.5s ease;
}

/* 关闭按钮样式 */
.close-btn {
  position: absolute;
  top:15px;
  right:20px;
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: var(--primary-color);
}

/* 关键帧动画：数据流动效果 */
@keyframes dataFlow {
  0% { transform: translateX(-100%); opacity:0 }
  50% { transform: translateX(0); opacity:1 }
  100% { transform: translateX(100%); opacity:0 }
}

/* 关键帧动画：弹窗下滑效果 */
@keyframes slideDown {
  from { transform: translateY(-50px); opacity:0 }
  to { transform: translateY(0); opacity:1 }
}

/* 响应式设计，适配移动设备 */
@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    padding: 100px 15px 15px 15px;
  }

  .sidebar {
    display: none;
  }

  .navbar ul {
    flex-direction: column;
    background: rgba(14, 44, 83, 0.95);
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    display: none;
  }

  .navbar.active ul {
    display: flex;
  }
}

/* 增强互动效果的样式 */
.data-visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-color-1), transparent);
  animation: dataFlow 5s linear infinite;
}

/* 几何图形旋转动画 */
.geometric-shapes {
  position: absolute;
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-2));
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  animation: rotateShape 10s linear infinite;
}

@keyframes rotateShape {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 透明模糊背景样式 */
.blur-background {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
}

/* 卡片式设计样式 */
.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table, th, td {
  border: 1px solid var(--shadow-color);
}

th, td {
  padding: 10px;
  text-align: left;
}

th {
  background-color: var(--primary-color);
  color: #FFFFFF;
}

