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

/* 全局字体与颜色设定 */
body {
  font-family: 'Open Sans', sans-serif; /* 使用易读性高的字体 */
  background: linear-gradient(135deg, #1E3A8A, #6D28D9); /* 主背景使用线性渐变 */
  color: #FFFFFF;
  line-height: 1.6;
  overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(30, 58, 138, 0.8); /* 半透明背景 */
  backdrop-filter: blur(10px); /* 背景模糊效果 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000; /* 确保导航栏在最上层 */
}

/* 导航链接样式 */
.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: #00FF7F; /* 点缀色用于悬停 */
}

/* 多级菜单样式 */
.navbar li ul {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 10px 0;
}

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

.navbar li ul li {
  padding: 10px 20px;
}

.navbar li ul li a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

/* 面包屑导航样式 */
.breadcrumb {
  margin: 80px 30px 20px 30px;
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: #BBBBBB;
}

.breadcrumb a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #00FF7F;
}

.breadcrumb span {
  color: #BBBBBB;
}

/* 主要内容容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* 文章样式 */
article {
  background: rgba(255, 255, 255, 0.1); /* 玻璃拟态背景 */
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); /* 阴影效果 */
}

/* 标题样式 */
article h2, article h3 {
  font-family: 'Roboto', sans-serif; /* 现代感强的无衬线字体 */
  color: #FFFFFF;
  margin-bottom: 20px;
}

article h2 {
  font-size: 24px;
}

article h3 {
  font-size: 20px;
}

/* 段落与列表样式 */
article p, article li {
  font-size: 16px;
  color: #DDDDDD;
}

article ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
}

article code {
  background: rgba(0, 0, 0, 0.7);
  color: #00FF7F;
  padding: 2px 4px;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
}

/* 代码块样式 */
pre {
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 20px;
}

pre code::before {
  content: "代码示例";
  display: block;
  font-weight: bold;
  color: #00FF7F;
  margin-bottom: 10px;
}

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

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

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

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

.card:hover {
  transform: scale(1.05);
}

/* 仪表盘样式 */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.chart-card {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.chart {
  width: 100%;
  height: 200px;
  background: linear-gradient(45deg, #1E3A8A, #6D28D9);
  border-radius: 10px;
  animation: grow 2s ease-in-out infinite alternate;
}

@keyframes grow {
  from { width: 50%; }
  to { width: 100%; }
}

/* 波浪背景动画 */
.wave-background {
  background: linear-gradient(270deg, #1E3A8A, #6D28D9, #1E3A8A);
  background-size: 600% 600%;
  animation: waveAnimation 15s ease infinite;
}

@keyframes waveAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 按钮样式 */
.btn {
  background: #6D28D9;
  border: none;
  border-radius: 25px;
  color: #FFFFFF;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

.btn:hover {
  background: #5A21CB;
  transform: scale(1.1);
}

/* 加载动画样式 */
.loader {
  border: 8px solid rgba(255, 255, 255, 0.2);
  border-top: 8px solid #6D28D9;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 100px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 折叠区域样式 */
.details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.details.open {
  max-height: 500px; /* 根据内容高度调整 */
}

/* 展开按钮样式 */
.toggle-btn {
  background: none;
  border: none;
  color: #00FF7F;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
}

/* 响应式布局 */
@media (min-width: 768px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .container {
    grid-template-columns: repeat(3, 1fr);
  }
}

