
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  color: #dddddd;
  background: linear-gradient(135deg, #6a11cb, #2575fc); /* 主色调渐变背景 */
  background-size: cover;
  background-attachment: fixed;
}

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

.navbar .logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  color: #ffffff;
}

.navbar .menu {
  display: flex;
  gap: 20px;
}

.navbar .menu a {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.navbar .menu a:hover {
  color: #2575fc;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: #ffffff;
  margin: 4px;
  transition: all 0.3s;
}

/* 移动端导航菜单 */
@media (max-width: 768px) {
  .navbar .menu {
    display: none;
    flex-direction: column;
    background: rgba(38, 38, 38, 0.95);
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 20px;
    border-radius: 10px;
  }
  
  .navbar .menu.active {
    display: flex;
  }
  
  .hamburger {
    display: flex;
  }
}

/* 主要内容容器 */
.container {
  padding: 100px 50px 50px 50px; /* 顶部留白避免被导航栏遮挡 */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
}

/* 模块化布局样式 */
.module {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  margin: 10px;
  flex: 1 1 300px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px); /* 玻璃质感 */
}

/* 响应式调整 */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
  }
}

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

img.decorative:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

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

.code-block code {
  display: block;
  white-space: pre;
}

/* 文章标题样式 */
article h2, article h3 {
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  margin-bottom: 15px;
}

article h2 {
  font-size: 24px;
  border-bottom: 2px solid #ffd700; /* 金色下边框 */
  padding-bottom: 10px;
}

article h3 {
  font-size: 20px;
  margin-top: 30px;
}

/* 文章段落样式 */
article p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* 强调文本样式 */
article em {
  color: #ffd700; /* 金色强调 */
}

/* 代码高亮样式 */
article pre {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
}

article pre code {
  color: #00ff00;
  font-family: 'Courier New', Courier, monospace;
}

/* 提示信息样式 */
.prominent-note {
  background: rgba(38, 38, 38, 0.9);
  color: #ffd700;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 18px;
  margin: 50px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 交互按钮样式 */
.button {
  background: linear-gradient(45deg, #ff6a00, #ee0979);
  border: none;
  border-radius: 50px;
  color: #fff;
  padding: 15px 30px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 图标样式 */
.icon {
  width: 50px;
  height: 50px;
  transition: transform 0.3s;
}

.icon:hover {
  transform: rotate(20deg);
}

/* 动画定义：流动线条 */
@keyframes moveLines {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 1000px 0;
  }
}

/* 动画定义：淡入效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 其他装饰性元素 */
.background-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.gptkong.com/demo/sample1.png') repeat;
  animation: moveLines 20s linear infinite;
  opacity: 0.5;
}

/* 手风琴折叠区域样式 */
.accordion {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 10px 0;
  padding: 10px;
}

.accordion-summary {
  cursor: pointer;
  padding: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion.active .accordion-content {
  max-height: 500px; /* 足够高度以容纳内容 */
}

/* 响应式调整：避免宽度小于500px的容器内放置长内容 */
@media (max-width: 500px) {
  .module, .container {
    padding: 20px;
  }
}

