
/* 页面整体样式设置 */
/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Montserrat:wght@500;700&display=swap');

/* 全局样式 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #0A2463, #5E17EB);
  color: #ffffff;
  line-height: 1.6;
}

/* 主要容器 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 36, 99, 0.9);
  padding: 20px 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.navbar ul li {
  margin: 0 15px;
}

.navbar ul li a {
  color: #ffffff;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  transition: color 0.3s;
}

.navbar ul li a:hover {
  color: #FF9F1C;
}

/* 主页标题 */
.header {
  grid-column: 1 / -1;
  text-align: center;
  padding: 100px 20px 50px 20px;
}

.header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 48px;
  margin-bottom: 20px;
  color: #FF9F1C;
}

.header p {
  font-size: 18px;
  color: #ffffff;
}

/* 文章内容样式 */
article {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

article h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 34px;
  color: #FF9F1C;
  margin-top: 20px;
  margin-bottom: 15px;
}

article h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  color: #FF9F1C;
  margin-top: 15px;
  margin-bottom: 10px;
}

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

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

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

/* 按钮样式 */
button, .btn {
  background-color: #FF9F1C;
  border: none;
  padding: 10px 20px;
  color: #ffffff;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s, background-color 0.3s;
}

button:hover, .btn:hover {
  transform: scale(1.05);
  background-color: #E68A00;
}

button:active, .btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

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

/* 滚动动效 */
.card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 图标样式 */
.icon {
  width: 24px;
  height: 24px;
  fill: #FFFFFF;
  transition: fill 0.3s;
}

.icon:hover {
  fill: #FF9F1C;
}

/* 数据可视化图表样式 */
.line-chart path {
  stroke: #FF9F1C;
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 3s forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    align-items: center;
  }

  .navbar ul li {
    margin: 10px 0;
  }

  .header h1 {
    font-size: 36px;
  }

  .header p {
    font-size: 16px;
  }

  article h2 {
    font-size: 28px;
  }

  article h3 {
    font-size: 24px;
  }

  article p {
    font-size: 14px;
  }
}

/* 章节导航样式 */
.section-nav {
  position: fixed;
  right: 20px;
  top: 100px;
  background: rgba(10, 36, 99, 0.9);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.section-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section-nav ul li {
  margin: 10px 0;
}

.section-nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  display: block;
  transition: color 0.3s;
}

.section-nav ul li a:hover {
  color: #FF9F1C;
}

/* 背景图层叠 */
.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
  background-size: cover;
  opacity: 0.3;
  z-index: -1;
}

/* 图片网格 */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.image-grid img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 结束语样式 */
.footer {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 20px;
  background: rgba(10, 36, 99, 0.9);
  border-radius: 10px;
  margin-top: 40px;
}

.footer p {
  font-size: 16px;
  color: #ffffff;
}

