
/* 
整体页面样式设计
使用现代Web技术栈，包括HTML5和CSS3，融合Flexbox和Grid布局，确保响应式设计在各种设备上均有良好表现。
色彩搭配采用科技蓝为主色，辅以橙色和绿色点缀，背景使用中性灰色，增加页面的深度和层次感。
通过渐变、阴影、动画和过渡效果，增强页面的视觉吸引力和交互体验。
*/

/* CSS变量定义 */
:root {
  --main-color: #0D47A1; /* 主色调：深蓝色 */
  --accent-orange: #FF5722; /* 辅助色：橙色 */
  --accent-green: #4CAF50; /* 辅助色：绿色 */
  --background-color: #F5F5F5; /* 背景色：中性灰白 */
  --text-color: #333333; /* 文字主色 */
  --header-height: 60px; /* 头部高度 */
  --footer-height: 100px; /* 底部高度 */
  --font-family: 'Roboto', sans-serif; /* 字体 */
}

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* 头部样式 */
.header {
  background: linear-gradient(90deg, var(--main-color), var(--accent-orange));
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
  font-size: 1.5rem;
}

/* 导航栏样式 */
.navbar {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.navbar a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s ease;
}

.navbar a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #FFFFFF;
  transition: width 0.3s;
}

.navbar a:hover::after {
  width: 100%;
}

.navbar a:hover {
  color: var(--accent-green);
}

/* 主容器样式 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* 内容区块样式 */
.section {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
  transform: translateY(-10px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* 标题样式 */
.section h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--main-color);
}

.section h3 {
  font-size: 1.5rem;
  margin: 15px 0;
  color: var(--accent-orange);
}

.section h4 {
  font-size: 1.3rem;
  margin: 10px 0;
  color: var(--accent-green);
}

/* 文字内容样式 */
.section p {
  font-size: 1rem;
  margin-bottom: 10px;
}

/* 代码块样式 */
code {
  background-color: #F0F0F0;
  padding: 5px 10px;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
}

/* 图片样式 */
.section img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.section img:hover {
  transform: scale(1.05);
}

/* 底部样式 */
.footer {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-green));
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  position: fixed;
  bottom: 0;
  width: 100%;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.footer p {
  font-size: 1rem;
}

/* 渐变线条分隔 */
.separator {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-orange));
  margin: 40px 0;
  border: none;
}

/* 按钮样式 */
.button {
  background-color: var(--accent-green);
  color: #FFFFFF;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
  background-color: #388E3C;
  transform: scale(1.05);
}

.button:active {
  transform: scale(0.95);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.2rem;
  }

  .navbar a {
    font-size: 0.9rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .section h3 {
    font-size: 1.3rem;
  }

  .section h4 {
    font-size: 1.1rem;
  }

  .container {
    margin: 80px auto 70px;
  }
}

@media (max-width: 480px) {
  .header {
    height: 50px;
  }

  .header h1 {
    font-size: 1rem;
  }

  .navbar a {
    font-size: 0.8rem;
  }

  .container {
    margin: 70px auto 90px;
    padding: 10px;
  }

  .section h2 {
    font-size: 1.3rem;
  }

  .section h3 {
    font-size: 1.1rem;
  }

  .section h4 {
    font-size: 1rem;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 2s ease-in-out;
}

/* 3D变换 */
.card-3d {
  transform: perspective(1000px) rotateY(10deg);
  transition: transform 0.5s;
}

.card-3d:hover {
  transform: perspective(1000px) rotateY(0deg);
}

/* 链接样式 */
a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-green);
}

/* 高级选择器样式 */
.section:nth-child(even) {
  background: linear-gradient(135deg, #FFFFFF, #F0F8FF);
}

