
/* 全局样式设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* 统一盒模型 */
}

/* 文字字体与颜色 */
body {
  font-family: 'Open Sans', sans-serif;
  color: #333;
  background: linear-gradient(135deg, #00bfa5, #1e88e5); /* 主色调蓝绿色渐变 */
  line-height: 1.6;
}

/* 标题字体与颜色 */
h1, h2, h3, h4 {
  font-family: 'Roboto', sans-serif;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* 文字阴影增加立体感 */
}

/* 链接样式 */
a {
  color: #ffcd3c; /* 点缀色金色 */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ffffff; /* 悬停时颜色变为白色 */
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7); /* 半透明背景 */
  backdrop-filter: blur(10px); /* 背景模糊效果 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  z-index: 1000;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar ul {
  list-style: none;
  display: flex;
}

.navbar ul li {
  margin-left: 20px;
}

.navbar ul li a {
  font-size: 1rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.navbar ul li a:hover {
  color: #ffcd3c;
  transform: scale(1.1);
}

/* 响应式导航菜单 */
@media (max-width: 768px) {
  .navbar ul {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.9);
    position: absolute;
    top: 60px;
    right: 30px;
    width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }

  .navbar ul.active {
    display: flex;
  }

  .navbar .hamburger {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
  }
}

/* 主要内容区域 */
.main-content {
  padding: 100px 20px 50px 20px; /* 顶部留出导航栏高度 */
  max-width: 1200px;
  margin: 0 auto;
}

/* 模块化布局 */
.section {
  margin-bottom: 50px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px); /* 背景模糊 */
}

/* 图片样式 */
.section img {
  width: 100%;
  max-width: 320px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

/* 代码块样式 */
pre code {
  display: block;
  background: rgba(0, 0, 0, 0.8);
  color: #00ff90;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  margin: 20px 0;
}

/* 按钮样式 */
.button {
  background: linear-gradient(45deg, #ffcd3c, #ff5733);
  border: none;
  padding: 12px 25px;
  color: #ffffff;
  font-size: 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.button:hover {
  transform: scale(1.05);
  background: linear-gradient(45deg, #ff5733, #ffcd3c);
}

/* 折叠菜单按钮 */
.hamburger {
  display: none; /* 默认隐藏 */
  color: #ffffff;
}

/* 卡片式设计 */
.card {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 响应式网格布局 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 每个块最小500px */
  gap: 30px;
}

/* 提示信息样式 */
.reference-note {
  background: rgba(255, 255, 255, 0.2);
  padding: 15px;
  border-left: 5px solid #ffcd3c;
  margin-bottom: 30px;
}

/* 过渡效果 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 加载动画 */
@keyframes rotate {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

.icon-3d {
  animation: rotate 5s linear infinite;
}

