body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #000000;
  margin: 0;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover,
.flipbook {
  width: 600px;
  height: 400px;
  display: none;
}

.cover {
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url(./image/1\ .jpg);
  background-size: cover; /* 自适应大小 */
  border: 1px solid #ccc;
  font-size: 24px;
  cursor: pointer;
  animation: fadeIn 1s;
}

.page {
  background-color: white;
  border: 1px solid #ccc;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  margin-bottom: 30px;
  border-radius: 12px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  display: block;
  margin: auto;
  /* 将内容居中 */
  position: fixed;
  /* 修复内容位置 */
  top: 50%;
  /* 将内容垂直居中 */
  left: 50%;
  /* 将内容水平居中 */
  transform: translate(-50%, -50%);
  /* 使用 transform 属性进行居中 */
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}
/* 在原有CSS基础上添加以下媒体查询 */
@media screen and (max-width: 768px) {
  body {
    height: auto;
    min-height: 100vh;
    padding: 20px 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
  }

  .cover,
  .flipbook {
    width: 100%;
    height: 60vh;
    min-height: 400px;
  }

  .page {
    margin-bottom: 15px;
    font-size: 18px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }

  .close {
    top: 15px;
    right: 15px;
    font-size: 24px;
  }
}

@media screen and (max-width: 480px) {
  .cover,
  .flipbook {
    height: 50vh;
    min-height: 300px;
  }

  .page {
    margin-bottom: 10px;
    font-size: 16px;
  }

  .close {
    top: 10px;
    right: 10px;
    font-size: 20px;
  }
}

/* 添加触控优化 */
.flipbook {
  touch-action: pan-y;
}

.page img {
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

/* 保持横屏体验 */
@media screen and (orientation: landscape) {
  @media (max-height: 500px) {
    .cover,
    .flipbook {
      height: 90vh;
    }
  }
}
