
/* 全局样式设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* 使用现代字体，提升可读性和美观度 */
  font-family: 'Roboto', 'Helvetica Neue', sans-serif;
}

/* 页面背景及整体布局 */
body {
  /* 使用线性渐变作为背景，营造科技感与层次感 */
  background: linear-gradient(135deg, #1E3A8A 70%, #F59E0B 25%, #10B981 5%);
  color: #333;
  /* 采用流式布局，确保响应式设计 */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* 提示信息的样式 */
.notice {
  background-color: rgba(30, 58, 138, 0.8);
  color: #fff;
  padding: 15px 30px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 1.5em;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 文章内容的容器 */
article {
  max-width: 1200px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* 标题样式 */
h1, h2, h3, h4 {
  color: #1E3A8A;
  margin-bottom: 15px;
}

/* 正文段落样式 */
p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* 特定文字颜色 */
.color-primary {
  color: #1E3A8A;
}

.color-accent {
  color: #F59E0B;
}

.color-highlight {
  color: #10B981;
}

/* 代码块样式 */
pre {
  background-color: #2D3748;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  position: relative;
}

/* 代码块内代码样式 */
code {
  color: #E2E8F0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  display: block;
}

/* 代码块前的装饰条 */
pre::before {
  content: '代码示例';
  position: absolute;
  top: 10px;
  left: 20px;
  background-color: #1E3A8A;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
}

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

th, td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

th {
  background-color: #1E3A8A;
  color: #fff;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

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

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

/* 响应式布局调整 */
@media (max-width: 768px) {
  article {
    padding: 20px;
  }

  img.decorative {
    width: 100%;
    height: auto;
  }
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(30, 58, 138, 0.8);
  padding: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  transition: background-color 0.5s ease;
  z-index: 1000;
}

.navbar.scrolled {
  background-color: #1E3A8A;
}

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

.navbar a:hover {
  color: #F59E0B;
}

/* 按钮样式 */
.button, .cta-button {
  background: linear-gradient(45deg, #F59E0B, #10B981);
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background 0.5s ease, transform 0.3s ease;
  text-align: center;
}

.button:hover, .cta-button:hover {
  background: linear-gradient(45deg, #10B981, #F59E0B);
  transform: translateY(-5px);
}

/* 卡片式布局样式 */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  padding: 40px;
}

.card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

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

.details.open {
  max-height: 1000px;
}

/* 按钮触发展开折叠区域 */
.toggle-button {
  background-color: #1E3A8A;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-button:hover {
  background-color: #10B981;
}

/* SVG 动画样式 */
.svg-line {
  stroke: #F59E0B;
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 1000;
  animation: drawLine 5s forwards;
}

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

/* 滚动触发动画样式 */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 链接样式 */
a {
  color: #1E3A8A;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #F59E0B;
}

/* 样式设计确保代码块不被遮挡 */
pre code {
  overflow: visible;
}

