body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-wrap: wrap;
    gap: 40px;
    background-image: url('background.jpg'); /* 设置背景图 */
    background-size: cover; /* 背景图覆盖整个窗口 */
    background-position: center; /* 背景图居中显示 */
    padding: 80px; /* 给容器添加内边距 */
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}


.card {
    position: relative;
    width: calc(25% - 40px); /* 4个卡片，每个卡片宽度为1/4减去间隙 */
    height: 0;
    padding-bottom: 33.333%; /* 保持纵横比 */
    overflow: hidden;
    border: 1px solid #666666;
    border-radius: 20px;
    box-shadow: 0px 6px 12px rgba(255, 255, 255, 0.1); /* 添加阴影 */
    transition: transform 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: scale(1.1); /* 鼠标悬停时卡片浮动 */
    box-shadow: 0px 6px 12px rgba(255, 255, 255, 0.5); /* 添加阴影 */
}

.card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 图片占满卡片 */
}

.card-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgb(216, 216, 216);
    font-size: 36px;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
}

@media (max-width: 860px) {
    .body {
        gap: 20px;
    }

    .card {
        width: calc(50% - 30px); /* 窗口宽度小于500px时每行2个卡片 */
    }

    .card-text {
        font-size: 24px; /* 窗口宽度小于500px时字体大小减小 */
    }
  }

  @media (max-width: 500px) {
    .body {
        gap: 10px;
    }

    .card {
      width: 100%; /* 窗口宽度小于300px时每行1个卡片 */      
    }

    .card-text {
      font-size: 18px; /* 窗口宽度小于300px时字体大小减小 */
    }
  }
