.web-container {
  margin: 0;
  padding: 0;
  background-color: #f9f4dc;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 0 20px;
  flex-direction: column;
}

.web-title-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px; /* 与卡片容器之间的间距 */
  margin-top: 20px; /* 顶部间距 */
}

.web-title-frame img.web-frame-left,
.web-title-frame img.web-frame-right {
  width: 24px;
  height: 36px;
}

.web-title-text {
  font-family: 'charter-bold', Arial, sans-serif;
  font-size: 40px;
  color: #648774;
  position: relative;
  z-index: 5;
  margin: 0 10px; /* 左右边距，使文本与图片保持间距 */
}

.card-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(300px, 1fr)
  ); /* 自动调整卡片数量 */
  gap: 37px;
  max-width: 1400px; /* 容器最大宽度 */
  width: 100%;
  margin: 0 auto;
  justify-items: start; /* 确保最后一行左对齐 */
  margin-bottom: 10vh; /* 与底部的间距 */
}

.card-box {
  overflow: hidden;
  width: 300px; /* 确保卡片占满单元格 */
  height: 360px;
  position: relative;
  margin: auto;
}

.card-box img.character {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  z-index: 1;
  object-fit: cover;
}

.card-box img.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.card-box img.glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 3;
}

.character-info {
  position: absolute;
  top: 240px;

  width: 100%;  
  text-align: center;
  z-index: 4;
  padding: 0 30px 0 30px;
}

.character-name {

  font-size: 20px;
  color: #333;
  margin: 3px 0;
}

.character-description {
  font-size: 14px;
  color: #666;
  margin: 0 10px;
  padding: 0 5px;
  text-align: left;
  line-height: 1.5;
}

.overlay {
  position: absolute;
  bottom: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 300px;
  background-color: rgba(249, 244, 220, 0.65);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: column;
  z-index: 4;
  transition: bottom 0.5s ease-in-out;
}

.card-box:hover .overlay {
  bottom: 30px;
}

.title-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  margin-top: 10px;
  width: 100%;
  flex-shrink: 0;
}

.title-frame img.frame-left,
.title-frame img.frame-right {
  width: 20px;
  height: 31px;
}

.title-text {
  font-family: 'charter-bold', Arial, sans-serif;
  font-size: 26px;
  color: #648774;
  position: relative;
  z-index: 5;
}

.content {
  padding: 5px;
  flex-grow: 1;
  overflow-y: hidden;
  position: relative;
  display: flex;
  justify-content: center;
}

.scroll-container {
  max-height: 250px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

.description-text {
  font-size: 18px;
  color: #333;
  line-height: 1.5;
  text-indent: 2em;
  text-align: left;
  max-height: 350px;
  word-wrap: break-word; /* 强制长单词断行 */
  word-break: break-all; /* 当长单词太长时，允许在任意位置断开 */
}

