/* ===== 通用样式 ===== */
body {
  font-family: "微软雅黑", sans-serif;
  padding: 2em;
  background: #f0f0f0;
  color: #000;
  transition: background 0.3s, color 0.3s;
  margin: 0;
}

.center-container {
  width: 1000px;
  max-width: 95vw;
  margin: 0 auto;
  text-align: left;
}

#toggleTheme,
#bookShelfBtn,
#fontIncrease,
#fontDecrease {
  margin-bottom: 1em;
  font-size: 1rem;
  padding: 8px 12px;
  cursor: pointer;
}

/* ===== 小说头部 & 封面 ===== */
#header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1em;
}

#header img {
  width: 120px;
  height: auto;
  border-radius: 6px;
}

.text-info {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #ccc;
  padding: 1em;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  flex: 1;
  min-height: 120px;
}

.text-info .intro {
  color: #666;
  line-height: 1.5;
  text-align: left;
  margin: 0;
}

/* ===== 小说内容区 ===== */
#content {
  white-space: pre-wrap;
  background: #fff;
  padding: 1.5em;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s, color 0.3s;
  width: 1000px;
  max-width: 95vw;
  margin: 0 auto;
  box-sizing: border-box;
}

#content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em 0;
}

select {
  font-size: 1em;
  margin-bottom: 1em;
}

/* ===== 夜间模式 ===== */
body.dark {
  background: #1e1e1e;
  color: #eee;
}

body.dark #content {
  background: #2e2e2e;
  color: #eee;
}

body.dark .text-info {
  background-color: #2e2e2e;
  color: #eee;
  border-color: #444;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.05);
}

body.dark .text-info .intro {
  color: #ccc;
}

/* ===== 返回顶部按钮 ===== */
#backToTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 15px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  background: #555;
  color: white;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  z-index: 1000;
  display: none;
}

#backToTop:hover {
  opacity: 1;
}

/* ===== 书架封面 ===== */
.book-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  min-height: 100vh;
}

.book {
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s;
}

.book img {
  width: 200px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.book:hover {
  transform: scale(1.05);
}

/* ===== About按钮 ===== */
/* PC端：底部中央 */
.footer {
  position: fixed;
  bottom: 10px;
  width: 100%;
  text-align: center;
}

/* 按钮通用样式 */
.about-btn {
  font-size: 0.8rem;
  color: #888;
  text-decoration: none;
  transition: color 0.3s;
}

.about-btn:hover {
  color: #555;
}

/* ===== 图片行 ===== */
.img-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 1em 0;
  flex-wrap: wrap;
}

.about-img {
  height: 400px;
  width: auto;
  object-fit: contain;
}

/* ===== B站链接 ===== */
.bili-link {
  color: palevioletred;
  text-decoration: none;
}

.bili-link:hover {
  color: #c71585;
}

/* ===== 手机端响应式 ===== */
@media (max-width: 900px) {
  body {
    padding: 1em;
  }
  .center-container,
  #content {
    width: 100%;
    max-width: 100%;
    padding: 1em;
  }
  select {
    width: 100%;
    font-size: 1rem;
  }
  .book img {
    width: 45vw;
    max-width: 180px;
  }

  /* About按钮：右下角浮动 */
  .footer {
    bottom: 20px;
    right: 20px;
    left: auto;
    width: auto;
    text-align: right;
  }

  .img-row {
    flex-direction: column;
    align-items: center;
  }
  .about-img {
    height: auto;
    width: 90%;
    max-width: 400px;
  }
}

/* 更小屏幕适配 */
@media (max-width: 600px) {
  .img-row {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  .about-img {
    width: 90%;
    max-width: 400px;
    height: auto;
  }
}
