
/* 基础样式 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 全局容器 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 20px 0;
}

/* 头部样式 */
header {
  text-align: center;
  padding: 50px 0;
  background: radial-gradient(circle, rgba(255,87,34,1) 0%, rgba(34,193,195,1) 100%);
  border-bottom: 2px solid rgba(255,255,255,0.2);
}

header h1 {
  font-size: 3em;
  margin: 0;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

header p {
  font-size: 1.2em;
  margin-top: 10px;
  color: #f0f0f0;
}

/* 导航栏样式 */
nav {
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 0;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  margin: 0 15px;
  font-size: 1em;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ff5722;
}

/* 主体内容样式 */
.main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 40px 0;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.card img {
  width: 100%;
  border-radius: 10px;
}

.card h3 {
  margin-top: 15px;
  font-size: 1.5em;
  color: #ffcc00;
}

.card p {
  margin-top: 10px;
  font-size: 1em;
  color: #e0e0e0;
}

/* 示例展示样式 */
.example-section {
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  padding: 40px;
  border-radius: 20px;
  margin: 40px 0;
  position: relative;
}

.example-section::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 5px;
  background: #ffffff;
  border-radius: 2.5px;
}

.example-section h2 {
  text-align: center;
  font-size: 2em;
  color: #ffffff;
  margin-bottom: 20px;
}

.example-section article {
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 15px;
  max-height: 600px;
  overflow-y: auto;
}

.example-section pre {
  background: #2a2a2a;
  padding: 15px;
  border-radius: 10px;
  overflow-x: auto;
}

.example-section code {
  color: #f8f8f2;
  font-family: 'Courier New', Courier, monospace;
}

/* 提示信息样式 */
.notice {
  text-align: center;
  font-size: 1.2em;
  color: #ffeb3b;
  margin: 20px 0;
}

/* 底部样式 */
footer {
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
  padding: 20px 0;
  color: #ccc;
  font-size: 0.9em;
}

/* 动画效果 */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  background: linear-gradient(-45deg, #1e3c72, #2a5298, #8e44ad, #c0392b);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
}

/* 响应式设计 */
@media (max-width: 1440px) {
  header h1 {
    font-size: 2.5em;
  }
}

@media (max-width: 1200px) {
  .main {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 1024px) {
  nav a {
    margin: 0 10px;
    font-size: 0.9em;
  }
}

@media (max-width: 768px) {
  header {
    padding: 30px 0;
  }

  header h1 {
    font-size: 2em;
  }

  .main {
    grid-template-columns: 1fr;
    padding: 20px 0;
  }

  .example-section {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  nav {
    flex-direction: column;
  }

  nav a {
    margin: 10px 0;
    font-size: 1em;
  }

  .example-section h2 {
    font-size: 1.5em;
  }
}

@media (max-width: 320px) {
  header h1 {
    font-size: 1.5em;
  }

  .example-section h2 {
    font-size: 1.2em;
  }

  .card h3 {
    font-size: 1.2em;
  }
}

/* 图片样式 */
.decorative-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.decorative-images img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.decorative-images img:hover {
  transform: scale(1.1);
}

