
/* 基本样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* 设置全局字体及背景 */
body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  color: #333333;
  background: linear-gradient(135deg, #0D2C54 70%, #333333 25%, #FF7E00 5%);
  line-height: 1.6;
  overflow-x: hidden;
}
/* 响应式网格布局 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
/* 模块化区块样式 */
.section {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  flex: 1 1 500px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}
/* 标题样式 */
h2, h3, h4 {
  color: #0D2C54;
  margin-bottom: 15px;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 20px;
}
h4 {
  font-size: 18px;
}
/* 段落与链接样式 */
p {
  margin-bottom: 15px;
}
a {
  color: #FF7E00;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #4CAF50;
}
/* 按钮样式 */
.button {
  background-color: #FF7E00;
  border: none;
  padding: 10px 20px;
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.button:hover {
  background-color: #4CAF50;
  transform: scale(1.05);
}
/* 图像样式 */
img.decorative {
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
  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);
}
/* 代码块样式 */
pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 15px;
}
code {
  font-family: 'Courier New', Courier, monospace;
  color: #c7254e;
}
pre code {
  display: block;
}
/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(13, 44, 84, 0.9);
  z-index: 1000;
  padding: 15px 20px;
  transition: background-color 0.3s ease;
}
.navbar.scrolled {
  background-color: #0D2C54;
}
.navbar ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
}
.navbar li {
  margin-left: 20px;
}
.navbar a {
  color: #ffffff;
  font-size: 16px;
}
.navbar a:hover {
  color: #FF7E00;
}
/* 轮播图样式 */
.carousel {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}
.carousel img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  animation: slide 20s infinite;
}
@keyframes slide {
  0% { transform: translateX(0); }
  20% { transform: translateX(0); }
  25% { transform: translateX(-100%); }
  45% { transform: translateX(-100%); }
  50% { transform: translateX(-200%); }
  70% { transform: translateX(-200%); }
  75% { transform: translateX(-300%); }
  95% { transform: translateX(-300%); }
  100% { transform: translateX(0); }
}
/* 卡片布局样式 */
.card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}
/* 交互式折叠区域样式 */
.collapsible {
  background-color: #f1f1f1;
  color: #0D2C54;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  transition: background-color 0.3s ease;
}
.collapsible:hover {
  background-color: #e2e2e2;
}
.active, .collapsible:hover {
  background-color: #ddd;
}
.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #f9f9f9;
}
.content p {
  margin: 10px 0;
}
/* Footer样式 */
.footer {
  background-color: #0D2C54;
  color: #ffffff;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
}
.footer a {
  color: #FF7E00;
  text-decoration: none;
}
.footer a:hover {
  color: #4CAF50;
}
/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in {
  animation: fadeIn 2s ease-in;
}
/* 高亮代码样式 */
.highlight {
  background-color: #ffffcc;
  padding: 2px 4px;
  border-radius: 3px;
}
/* 弹性布局调整 */
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* 响应式设计调整 */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    align-items: center;
  }
  .navbar li {
    margin: 10px 0;
  }
  .carousel {
    height: 200px;
  }
  .carousel img {
    height: 200px;
  }
}
@media (max-width: 480px) {
  h2 {
    font-size: 20px;
  }
  h3 {
    font-size: 18px;
  }
  h4 {
    font-size: 16px;
  }
  .button {
    padding: 8px 16px;
    font-size: 14px;
  }
}

