/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

html, body {
  height: 100%;
  background-color: #f5f5f5;
}

/* 首页样式 */
.container {
  max-width: 750px;
  margin: 0 auto;
  padding: 10px;
}

/* 榜单入口（保留样式，功能可点击但无跳转） */
.rank-entrance {
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-radius: 10px;
  padding: 20px 0;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px #eee;
}

.entrance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.entrance-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #ff6700; /* 替代图片 */
}

.entrance-text {
  font-size: 14px;
  color: #333;
}

/* 模块标题 */
.module {
  margin-bottom: 30px;
}

.module-title {
  font-size: 18px;
  font-weight: bold;
  margin: 15px 10px;
  color: #333;
}

/* 小说列表 */
.book-list {
  padding: 0 10px;
}

.book-item {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.2s;
}

.book-item:hover {
  transform: translateY(-2px);
}

.book-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  margin-bottom: 10px;
}

.book-summary {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* 阅读页样式 */
.reader-container {
  width: 100%;
  height: 100vh;
  padding: 20px 30px;
  background-color: #ffffff;
  color: #333333;
  font-size: 16px;
  position: relative;
}

.book-title {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

.content-scroll {
  width: 100%;
  height: calc(100% - 40px);
  overflow-y: auto;
}

.content-section {
  margin-bottom: 30px;
}

.content-paragraph {
  line-height: 1.8;
  margin-bottom: 20px;
  display: block;
}

/* 解锁提示 + 商品列表 */
.unlock-tip {
  text-align: center;
  padding: 40px 0;
}

.tip-text {
  font-size: 16px;
  color: #999;
  margin-bottom: 30px;
  display: block;
}

.product-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 20px;
}

.product-item {
  background-color: #f8f8f8;
  border-radius: 12px;
  padding: 30px 20px;
  position: relative;
  border: 1px solid #eee;
  cursor: pointer;
}

.product-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ff4d4f;
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 10px;
}

.product-price {
  font-size: 18px;
  font-weight: bold;
  color: #ff6700;
  margin-bottom: 20px;
  text-align: center;
}

.product-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 20px;
}

.product-bottom-bar {
  width: 100%;
  padding: 15px 0;
  background: linear-gradient(to right, #ff9500, #ff6700);
  color: #fff;
  font-size: 14px;
  text-align: center;
  border-radius: 8px;
  margin-top: 10px;
}

/* 空内容提示 */
.empty-tip {
  text-align: center;
  padding: 40px 0;
  color: #999;
  font-size: 16px;
}

/* 功能菜单 */
.menu-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 99;
  display: none;
}

.menu-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  border-radius: 20px 20px 0 0;
  padding: 30px;
  z-index: 100;
  display: none;
}

.menu-item {
  margin-bottom: 30px;
}

.menu-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  display: block;
}

.font-size-control {
  display: flex;
  gap: 20px;
}

.font-btn {
  background-color: #f5f5f5;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.bg-color-control {
  display: flex;
  gap: 20px;
}

.bg-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.bg-item.white {
  background-color: #ffffff;
  border: 1px solid #eee;
}

.bg-item.yellow {
  background-color: #f9f2d6;
}

.bg-item.black {
  background-color: #282828;
}

.home-btn {
  width: 100%;
  padding: 15px 0;
  border-radius: 8px;
  font-size: 16px;
  background-color: #ff6700;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* 支付成功弹窗 */
.pay-success-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 101;
  display: none;
  align-items: center;
  justify-content: center;
}

.pay-success-panel {
  background-color: #fff;
  width: 60%;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
}

.success-icon {
  font-size: 40px;
  color: #4cd964;
  display: block;
  margin-bottom: 20px;
}

.success-text {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 30px;
  display: block;
}

.success-btn {
  background-color: #ff6700;
  color: #fff;
  border: none;
  padding: 15px 40px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

/* 测试支付弹窗 */
.fake-pay-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
}

.fake-pay-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 400px;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 30px;
  z-index: 999;
  display: none;
}

.fake-pay-title {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #333333;
}

.fake-pay-desc {
  font-size: 14px;
  color: #666666;
  margin-bottom: 30px;
  line-height: 1.6;
}

.fake-pay-btn-group {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.fake-pay-btn {
  flex: 1;
  height: 40px;
  line-height: 40px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  border: none;
}

.cancel-btn {
  background-color: #f5f5f5;
  color: #666666;
}

.confirm-btn {
  background-color: #ff4757;
  color: #ffffff;
}