
/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(to bottom, #003366, #ffffff);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-weight: bold;
  color: #003366;
  text-align: center;
  margin: 20px 0;
}

p, ul, ol {
  margin: 15px 0;
  padding: 0 20px;
  font-size: 16px;
}

a {
  color: #ff6f61;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ff9800;
}

.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.card {
  background-color: #f9f9f9;
  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 8px 12px rgba(0, 0, 0, 0.2);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

pre {
  background-color: #2d2d2d;
  color: #ffffff;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  margin: 15px 0;
}

code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

.button {
  display: inline-block;
  background-color: #ff6f61;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #ff9800;
}

.header {
  background: linear-gradient(to right, #003366, #ff6f61);
  color: white;
  text-align: center;
  padding: 30px 20px;
  width: 100%;
}

.header h1 {
  font-size: 36px;
  animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.footer {
  background: linear-gradient(to left, #003366, #ff6f61);
  color: white;
  text-align: center;
  padding: 20px;
  width: 100%;
}

.content-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-in-out;
}

.content-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  pre {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 24px;
  }

  p, ul, ol {
    font-size: 14px;
  }
}

