@charset "utf-8";
/* ============================================================
 * 小说推广样式（列表卡片 / 首页区块 / 详情页 / 试读区水印）
 * 命名前缀：nc- 卡片、ns- 详情、nbadge/ntag 角标与标签
 * 与短剧、游戏样式互不干扰
 * ============================================================ */

/* ---------- 列表页 ---------- */
.novel-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 40px;
}

.novel-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

.novel-list-head h1 {
  font-size: 22px;
  line-height: 1.4;
  margin: 0;
}

.novel-list-head .nl-count {
  color: #7b8494;
  font-size: 13px;
}

.novel-filter {
  background: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(20, 30, 50, .06);
}

.novel-filter .nf-row {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  align-items: flex-start;
  font-size: 13.5px;
}

.novel-filter .nf-row + .nf-row {
  border-top: 1px dashed #eceff3;
}

.novel-filter .nf-label {
  flex: 0 0 62px;
  color: #7b8494;
}

.novel-filter .nf-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.novel-filter .nf-opts a {
  padding: 2px 11px;
  border-radius: 999px;
  color: #465061;
  text-decoration: none;
}

.novel-filter .nf-opts a:hover {
  background: #eef3ff;
  color: #2c5bd0;
}

.novel-filter .nf-opts a.on {
  background: #2b6cf6;
  color: #fff;
}

/* ---------- 卡片网格 ---------- */
.novel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.novel-grid-home {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.novel-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(20, 30, 50, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.novel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 30, 50, .10);
}

.novel-card .nc-cover {
  position: relative;
  display: block;
  width: 92px;
  flex: 0 0 92px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1f5;
}

.novel-card .nc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.novel-card .nc-badges {
  position: absolute;
  left: 4px;
  top: 4px;
  right: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}

.nbadge {
  font-size: 11px;
  line-height: 1.5;
  padding: 1px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(28, 35, 48, .72);
  backdrop-filter: blur(2px);
}

.nbadge-score {
  background: rgba(245, 166, 35, .95);
}

.nbadge-new {
  background: rgba(43, 108, 246, .95);
}

.nbadge-status {
  background: rgba(24, 160, 88, .92);
}

.novel-card .nc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.novel-card .nc-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novel-card .nc-title a {
  color: #1c2330;
  text-decoration: none;
}

.novel-card .nc-sub {
  color: #7b8494;
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 7px;
}

.novel-card .nc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.ntag {
  background: #eef3ff;
  color: #2c5bd0;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  line-height: 1.6;
}

.ntag-cat {
  background: #fff4e6;
  color: #b26a00;
}

.novel-card .nc-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: #7b8494;
}

.novel-card .nc-free {
  color: #18a058;
  font-weight: 600;
}

.novel-empty {
  background: #fff;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  color: #7b8494;
  font-size: 14px;
}

/* ---------- 详情页 ---------- */
.novel-single {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px 90px;
}

.novel-single .ns-crumb {
  color: #7b8494;
  font-size: 13px;
  margin: 6px 0 14px;
}

.novel-single .ns-crumb a {
  color: #2b6cf6;
  text-decoration: none;
}

.ns-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(20, 30, 50, .06);
}

.ns-card + .ns-card {
  margin-top: 14px;
}

.ns-hero {
  display: flex;
  gap: 18px;
}

.ns-hero .ns-cover {
  width: 140px;
  flex: 0 0 140px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #eef1f5;
}

/* 必须给 height + object-fit：
   img 标签上带 width/height 属性（给出固有比例、避免 CLS），CSS 只覆盖了 width，
   height 属性值会被当成实际高度，导致封面被纵向拉伸 */
.ns-hero .ns-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ns-hero .ns-info {
  flex: 1;
  min-width: 0;
}

.ns-hero .ns-info h1 {
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 8px;
}

.ns-meta {
  color: #7b8494;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 10px;
}

.ns-meta b {
  color: #1c2330;
  font-weight: 600;
}

.ns-meta .ns-score {
  color: #f5a623;
  font-weight: 700;
}

.ns-tagrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.ns-copyright {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #8a6d3b;
  background: #fffaf0;
  border: 1px solid #f6e3bf;
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 12px;
}

.ns-copyright svg {
  flex: 0 0 16px;
}

.ns-sec-title {
  font-size: 16px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ns-sec-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: #2b6cf6;
  border-radius: 2px;
}

/* 作品简介（可折叠） */
.ns-intro {
  position: relative;
  overflow: hidden;
  max-height: 2400px;
  transition: max-height .28s ease;
  color: #39424f;
  line-height: 1.8;
}

.ns-intro.is-collapsed {
  max-height: 5.6em;
}

.ns-intro.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff);
}

.ns-intro p {
  margin: 0 0 10px;
}

.ns-intro p:last-child {
  margin-bottom: 0;
}

.ns-toggle {
  text-align: center;
  color: #2b6cf6;
  font-size: 13px;
  margin-top: 8px;
  cursor: pointer;
  user-select: none;
}

/* ---------- 在线试读 ---------- */
.ns-readhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ns-readhead .ns-chname {
  font-size: 13px;
  color: #5b6472;
}

.ns-readhead .ns-chcnt {
  color: #7b8494;
  font-size: 12.5px;
}

.ns-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ns-tabs a {
  padding: 5px 13px;
  border: 1px solid #eceff3;
  border-radius: 999px;
  font-size: 13px;
  color: #465061;
  background: #fff;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.ns-tabs a:hover {
  border-color: #b9cdfb;
  color: #2c5bd0;
}

.ns-tabs a.on {
  background: #2b6cf6;
  border-color: #2b6cf6;
  color: #fff;
}

.ns-tabs--bottom {
  margin-top: 16px;
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px dashed #eceff3;
  align-items: center;
}

.ns-tabs--bottom::before {
  content: "切换章节";
  color: #7b8494;
  font-size: 12.5px;
  margin-right: 2px;
}

.ns-excerpt {
  position: relative;
  border-radius: 10px;
  background: #fbfcfe;
  border: 1px solid #eceff3;
  padding: 16px;
  overflow: hidden;
  line-height: 1.9;
}

/* 试读区背景水印：阅文版权书才渲染，纯 CSS 背景，不入选区、不被复制带走 */
.ns-excerpt .ns-wm {
  position: absolute;
  inset: -24%;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: .15;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27320%27%20height%3D%27170%27%3E%3Cg%20transform%3D%27rotate%28-22%20160%2085%29%27%3E%3Ctext%20x%3D%2710%27%20y%3D%2792%27%20font-family%3D%27PingFang%20SC%2CMicrosoft%20YaHei%2Csans-serif%27%20font-size%3D%2718%27%20fill%3D%27%231c2330%27%20fill-opacity%3D%271%27%3E%E4%BD%9C%E5%93%81%E6%9D%A5%E6%BA%90%E4%BA%8E%E9%98%85%E6%96%87%E9%9B%86%E5%9B%A2%E6%8E%88%E6%9D%83%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-repeat: repeat;
  background-size: 320px 170px;
  background-position: center;
}

.ns-excerpt .ns-text {
  position: relative;
  z-index: 1;
}

.ns-excerpt .ns-text p {
  margin: 0 0 10px;
  color: #39424f;
}

.ns-excerpt .ns-fold {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(251, 252, 254, 0), #fbfcfe);
}

.ns-excerpt.is-clamped {
  max-height: 340px;
}

.ns-excerpt.is-clamped .ns-fold {
  display: block;
}

.ns-readcta {
  margin-top: 14px;
  background: #f7f9fc;
  border: 1px solid #eceff3;
  border-radius: 10px;
  padding: 13px;
  text-align: center;
}

.ns-readcta .ns-ctal1 {
  font-size: 13px;
  color: #7b8494;
  margin-bottom: 10px;
}

.ns-readcta button {
  background: #2b6cf6;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ns-note {
  color: #7b8494;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 10px;
}

/* ---------- 口令领取卡 ---------- */
.ns-codebox {
  background: linear-gradient(180deg, #f4f8ff, #fff);
  border: 1px solid #dbe6ff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.ns-codebox .ns-tip {
  color: #7b8494;
  font-size: 13px;
  margin-bottom: 10px;
}

.ns-code {
  font-family: Consolas, Menlo, Monaco, monospace;
  font-size: 30px;
  letter-spacing: 6px;
  font-weight: 700;
  color: #1b3f9e;
  background: #fff;
  border: 1px dashed #b9cdfb;
  border-radius: 10px;
  padding: 10px 6px;
  margin-bottom: 12px;
  word-break: break-all;
}

.ns-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #2b6cf6;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 26px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-width: 190px;
}

.ns-copy-btn.is-done {
  background: #18a058;
}

.ns-steps {
  text-align: left;
  max-width: 430px;
  margin: 14px auto 0;
  color: #4a5364;
  font-size: 13px;
  line-height: 1.9;
}

.ns-steps b {
  color: #1c2330;
}

.ns-warn {
  color: #c0392b;
  font-size: 12.5px;
  margin-top: 10px;
}

/* ---------- 移动端常驻口令条 ---------- */
.ns-phonebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #eceff3;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -2px 10px rgba(20, 30, 50, .06);
  z-index: 60;
}

.ns-phonebar .ns-pc {
  font-family: Consolas, Menlo, monospace;
  font-size: 17px;
  font-weight: 700;
  color: #1b3f9e;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ns-phonebar button {
  background: #2b6cf6;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- 同类推荐 ---------- */
.ns-related .novel-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .novel-grid,
  .novel-grid-home {
    grid-template-columns: 1fr;
  }

  .novel-list-head h1 {
    font-size: 19px;
  }
}

@media (max-width: 640px) {
  .novel-single {
    padding-bottom: 84px;
  }

  .ns-hero {
    gap: 14px;
  }

  .ns-hero .ns-cover {
    width: 104px;
    flex: 0 0 104px;
  }

  .ns-hero .ns-info h1 {
    font-size: 19px;
  }

  .ns-code {
    font-size: 26px;
    letter-spacing: 4px;
  }

  .novel-card .nc-cover {
    width: 84px;
    flex: 0 0 84px;
  }
}

/* 主题的 .mobile-bottom-nav 高 60px 且在 ≤768.1px 才显示，
   这里把详情页的常驻口令条抬到它上方，避免两块固定元素重叠 */
@media only screen and (max-width: 768.1px) {
  .ns-phonebar {
    bottom: 60px;
  }

  .novel-single {
    padding-bottom: 56px;
  }
}
