* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
body {
  background: #f7f8f9;
  color: #333;
  line-height: 1.7;
}

/* ========== 页头 加高+搜索框 ========== */
.header {
  background: #2c3e50;
  color: #fff;
  padding: 20px 0;
  margin-bottom: 30px;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0 20px;
}
.logo {
  font-size: 24px;
  font-weight: bold;
}
/* 搜索框样式 */
.search-box {
  display: flex;
  height: 38px;
}
.search-input {
  width: 280px;
  padding: 0 15px;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  outline: none;
}
.search-btn {
  background: #4299e1;
  color: #fff;
  border: none;
  padding: 0 18px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 14px;
}
.search-btn:hover {
  background: #3182ce;
}
.nav a {
  color: #eee;
  margin-left: 18px;
  text-decoration: none;
  font-size: 15px;
}
.nav a:hover {
  color: #4299e1;
}

/* ========== 容器 ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 50px;
}

/* ========== 图书主卡片 ========== */
.book-card {
  background: #fff;
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  margin-bottom: 40px;
}
/* 左右布局：左封面 右按钮信息 */
.book-main {
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 35px;
}

/* 超大封面 视觉拉满 */
.cover-wrapper {
  flex-shrink: 0;
}
.book-cover , .book-cover-detail{
  width: 310px;
  height: 510px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0,0,0, 0.1);
  margin-bottom: 8px;
}

.book-side {
  flex: 1;
  min-width: 300px;
}
.book-title {
  font-size: 28px;
  font-weight: bold;
  color: #111;
  margin-bottom: 20px;
}
.meta {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
}
.rating {
  color: #ff6f00;
  font-weight: bold;
  font-size: 17px;
}

/* 按钮组 截图同款浅蓝配色 不刺眼 */
.btn-group {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.down-btn, .preview-btn {
  display: block;
  width: 200px;
  text-align: center;
  padding: 12px 0;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  background: #48b0d9;
  color: #fff;
  border: none;
}
.down-btn:hover, .preview-btn:hover {
  background: #3698bf;
}

/* 简介区域 */
.book-summary h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #222;
}
.summary-content {
  font-size: 16px;
  line-height: 2;
  color: #333;
  white-space: pre-line;
}

/* 猜你喜欢 */
.section-title {
  font-size: 22px;
  margin-bottom: 22px;
}
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 18px;
}
.rec-item {
  text-align: center;
}
.rec-cover {
  width: 120px;
  height: 170px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}
.rec-title {
  font-size: 13px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a {
  text-decoration: none;
  color: #37a;
}

/* ========== 页尾 ========== */
.footer {
  background: #2c3e50;
  color: #ccc;
  padding: 35px 0;
  margin-top: 50px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
.footer-links {
  margin-bottom: 20px;
}
.footer-links a {
  color: #ccc;
  margin: 0 12px;
  font-size: 14px;
  text-decoration: none;
}
.footer-links a:hover {
  color: #fff;
}
.footer-disclaimer {
  font-size: 13px;
  line-height: 1.8;
  color: #999;
  max-width: 900px;
  margin: 0 auto 12px;
}
.copyright {
  font-size: 12px;
  color: #777;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    padding: 15px;
  }
  .search-input {
    width: 220px;
  }
  .book-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
  }
  .book-cover {
    width: 240px;
    height: 350px;
  }
  .btn-group {
    align-items: center;
  }
  .book-title {
    font-size: 24px;
  }
}

/* ====================== 首页左右双栏布局 ====================== */
.home-container {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}
.home-left {
    flex: 3;
}
.home-right {
    flex: 1;
    min-width: 280px;
}
.home-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #222;
    font-weight: bold;
}




/* 左侧今日推荐网格 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}
.book-item {
    text-align: center;
}
.book-cover {
    width: 130px;
    height: 190px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}
.book-name {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 右侧最受欢迎榜单 */
.hot-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hot-item {
    padding: 8px 10px;
    border-radius: 4px;
    background: #f9f9f9;
}
.hot-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}
.hot-num {
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #48b0d9;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
}
.hot-name {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== 首页网格卡片 ==================== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}
.book-item {
  text-align: center;
}
.book-item img {
  width: 140px;
  height: 210px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}
.book-item .book-title {
  font-size: 14px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 移动端适配：小屏自动变成上下布局 */
@media (max-width: 768px) {
    .home-container {
        flex-direction: column;
        gap: 30px;
    }
}

#pwdModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 40px 10px;
}

#pwdModal .modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  width: 100%;
  max-width: 600px;
}

#pwdModal img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

#pwdModal .close-btn {
  margin-top: 20px;
  padding: 8px 20px;
  border: none;
  background: #48b0d9;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}


