/* 基本样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
  }
  
  header {
    background: #2478d9;
    color: #fff;
    padding: 1rem;
    text-align: center;
  }
  
  nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
  }
  
  nav ul li {
    margin: 0 1rem;
  }
  
  nav ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  
  nav ul li a:hover {
    color: #ff6347; /* 悬停时改变颜色 */
  }
  
  .hero {
    background: #f4f4f4;
    padding: 2rem;
    text-align: center;
  }
  
  .content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 1rem;
    transition: all 0.5s ease; /* 布局变化时平滑过渡 */
  }
  
  .card {
    background: #e2e2e2;
    margin: 1rem;
    padding: 1rem;
    box-sizing: border-box;
    flex: 1 1 calc(33.333% - 2rem);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .card:hover {
    transform: translateY(-10px); /* 悬停时卡片上移 */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* 悬停时添加阴影 */
  }
  
  footer {
    background: #2478d9;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
  }
  
  /* 响应式设计 */
  @media (max-width: 768px) {
    .content {
      justify-content: center;
    }
  
    .card {
      flex: 1 1 calc(50% - 2rem); /* 每行显示2个卡片 */
    }
  
    /* 添加动画效果 */
    @keyframes slideIn {
      from {
        transform: translateX(-100%);
      }
      to {
        transform: translateX(0);
      }
    }
  
    .card {
      animation: slideIn 0.5s ease-out; /* 卡片滑入动画 */
    }
  }
  
  @media (max-width: 480px) {
    .card {
      flex: 1 1 100%; /* 每行显示1个卡片 */
    }
  
    /* 添加动画效果 */
    @keyframes fadeIn {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }
  
    .card {
      animation: fadeIn 0.5s ease-out; /* 卡片淡入动画 */
    }
  }