/* ==========================================================================
   Novel99 v2 — Editorial Theme
   Clean, light, magazine-style re-skin. Skins the existing Bootstrap 3
   markup, loaded after all other stylesheets. Does not rename any
   id/class relied on by inline JS in html/*.html — structural mechanics
   (grid layout, search box positioning, popup plumbing) are unchanged
   from the previous theme; only the visual language is new.
   ========================================================================== */

:root {
  --color-bg:            #f6f3fc;
  --color-surface:       #ffffff;
  --color-surface-alt:   #efe9fb;
  --color-primary:       #7b2ff7;
  --color-primary-dark:  #5b1fc4;
  --color-primary-light: #a06bfa;
  --color-accent:        #ff2e63;
  --color-text:          #201a2e;
  --color-text-muted:    #766e8a;
  --color-border:        #e4dcf7;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 6px rgba(40, 15, 90, 0.08);
  --shadow-md: 0 10px 26px rgba(40, 15, 90, 0.16);
  --shadow-lg: 0 20px 46px rgba(40, 15, 90, 0.24);
  --shadow-glow: 0 6px 18px rgba(123, 47, 247, 0.35);
  --gradient-brand: linear-gradient(135deg, #ff2e63 0%, #7b2ff7 55%, #4b0fc4 100%);
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-display: 'Baloo 2', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------------- */
/* Base                                                                  */
/* -------------------------------------------------------------------- */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); }
a:hover, a:focus { color: var(--color-primary-dark); }

.btn { border-radius: var(--radius-sm); font-weight: 600; letter-spacing: .01em; }
.btn-default {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-default:hover, .btn-default:focus {
  background: var(--color-surface-alt);
  border-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* -------------------------------------------------------------------- */
/* Header / top bar                                                     */
/* -------------------------------------------------------------------- */
.page-header {
  background: var(--color-surface) !important;
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: none !important;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 500;
}
.page-header a { font-family: var(--font-sans); }

/* Two-tier newspaper masthead: a slim utility bar (menu / tagline /
   search) sits above a large centered nameplate row, instead of
   cramming the hamburger, title and search icon into one row. */
.header-utility {
  border-bottom: none;
  background: var(--color-text);
}
.header-utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}
@media (max-width: 767px) {
  .header-utility-row { padding: 6px 10px; }
}
#showLeft { cursor: pointer; line-height: 1; }
#showLeft .fa { color: rgba(255, 255, 255, 0.85); font-size: 17px; }
.header-utility-tagline {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-masthead {
  padding: 14px 0 16px;
  text-align: center;
  background: var(--color-surface);
  border-bottom: 3px solid transparent;
  border-image: var(--gradient-brand) 1;
}
.topC, .topC_v2 {
  float: none;
  width: auto !important;
  margin: 0 !important;
  text-align: center;
}
.topC .hlink, .topC_v2 .hlink {
  position: static !important;
  left: auto !important;
  right: auto !important;
}
.page-header .hlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px !important;
  letter-spacing: .01em;
  color: var(--color-primary);
}
.hlink-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 14px;
}

.topRm {
  position: relative !important;
  width: 28px !important;
  height: 28px !important;
}
.topRm .search-form,
.topRm .form-group {
  display: flex !important;
  align-items: center;
  margin: 0 !important;
}
/* At rest, show only the search icon (no pill/box) pinned to the right
   edge of the header. .form-group is sized to exactly the icon
   (28px) and has no background, so nothing but the icon is visible.
   On hover it widens with its right edge still pinned at 0 (icon's
   position never moves) and gains the pill background, opening
   leftward -- the only direction with room, since the icon already
   sits flush against the header's right/screen edge. */
.topRm .search-form .form-group {
  position: absolute !important;
  top: 0;
  right: 0;
  left: auto !important;
  height: 100%;
  width: 28px;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
}
.topRm .search-form .form-group:hover,
.topRm .search-form .form-group.hover {
  right: 0 !important;
  left: auto !important;
  width: 220px !important;
  background-color: var(--color-surface) !important;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}
.topRm .search-form .form-group input.form-control {
  flex: 1 1 auto;
  min-width: 0;
}
/* Recent-search history items are flex siblings of the <input> inside
   .form-group, so display:flex above was laying them out in the same
   row as the search box instead of as a dropdown underneath it. */
.search-history-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 99999;
  overflow: hidden;
}

/* search pill */
.search-form .form-group {
  background-color: var(--color-surface-alt) !important;
  border-radius: var(--radius-pill) !important;
}
.search-form .form-group.hover,
.search-form .form-group:hover {
  background-color: var(--color-surface) !important;
  box-shadow: var(--shadow-sm);
}
.search-form .form-group input.form-control {
  font-family: var(--font-sans);
}
.search-form .form-group:hover input.form-control,
.search-form .form-group.hover input.form-control {
  color: var(--color-text) !important;
}
.search-form .form-group span.form-control-feedback {
  color: rgba(255, 255, 255, 0.85);
  display: flex !important;
  align-items: center;
  justify-content: center;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  line-height: normal;
  padding: 0 !important;
  margin: 0 !important;
}
.search-form .form-group:hover span.form-control-feedback,
.search-form .form-group.hover span.form-control-feedback {
  color: var(--color-primary);
}
.search-form .form-group span.form-control-feedback .fa { font-size: 13px; }

.search_css {
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-sans);
}
.search_css:hover { background: var(--color-surface-alt); }

/* slide-out menu */
#overlay {
  background: rgba(20, 12, 38, 0.82);
  backdrop-filter: blur(3px);
}
.menuTop a { border-radius: var(--radius-sm); margin: 0 12px; }
.menuTop a:hover, .menuTop a:active {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* -------------------------------------------------------------------- */
/* Home listing / carousels                                             */
/* -------------------------------------------------------------------- */
.edition-bar {
  text-align: center;
  padding: 14px 15px;
  font-size: 15px;
}
.edition-link { color: var(--color-text-muted); font-weight: 600; text-decoration: none; }
.edition-link:hover { color: var(--color-primary); }
.edition-sep { color: var(--color-border); margin: 0 10px; }

.shelf { padding-top: 26px; }
.shelf-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.shelf-header::before {
  content: "";
  display: block;
  width: 6px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  flex-shrink: 0;
}
.shelf-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--color-text);
  margin: 0;
}
.shelf-desc { color: var(--color-text-muted); margin: 2px 0 0; }

.novel-item,
.slick-slide .novel-cover {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: none;
  border-bottom: 1px solid var(--color-border) !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.novel-item:hover, .slick-slide:hover .novel-cover { border-color: var(--color-primary-light); box-shadow: var(--shadow-sm); }
.novel-cover img { display: block; }
.novel-title {
  font-family: var(--font-serif);
  color: var(--color-text);
  font-weight: 600;
  font-size: 13px;
}
.novel-author { color: var(--color-text-muted); font-size: 12px; font-style: italic; }
.novel-desc, .novel-genre, .novel-status { color: var(--color-text-muted); }

.slick-dots li button:before { color: var(--color-primary); opacity: .3; }
.slick-dots li.slick-active button:before { opacity: 1; color: var(--color-primary); }
.slick-prev:before, .slick-next:before { color: var(--color-primary); }

/* -------------------------------------------------------------------- */
/* Novel detail page (chapter.php)                                      */
/* -------------------------------------------------------------------- */
.novel-detailsbox {
  background: var(--gradient-brand);
  padding-top: 30px;
  padding-bottom: 26px;
  margin-bottom: 0;
}
.book-jacket { align-items: flex-end; }
.book-jacket-info { padding-top: 10px; }
.novel-detailsbox .novel-cover {
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.novel-detailsbox .novel-title {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.2;
}
.novel-detailsbox .novel-author { color: rgba(255,255,255,0.78); font-style: italic; margin: 0 0 6px; }
.btn-read-now {
  display: inline-block;
  background: var(--color-surface);
  color: var(--color-primary-dark) !important;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
}
.btn-read-now:hover { background: var(--color-surface-alt); }
@media (max-width: 480px) {
  .novel-detailsbox .novel-title { font-size: 17px; }
  .btn-read-now { padding: 8px 14px; font-size: 12px; }
}

.novel-contentbox { background: transparent; margin-top: 0; padding-top: 6px; }
.novel-content {
  text-align: center;
  border-top: none !important;
  padding-top: 6px !important;
  margin-bottom: 10px !important;
}
.novel-content a {
  display: inline-block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-primary-dark) !important;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.well { background: transparent; }

.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-text);
  font-size: 16px;
}

.novel-commentbox textarea.form-control {
  border-radius: var(--radius-sm);
  border-color: var(--color-border);
  box-shadow: none;
  resize: none;
}
.novel-commentbox textarea.form-control:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(123, 47, 247, 0.15);
}
.btn-normal {
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 24px;
  margin-top: 10px;
  box-shadow: var(--shadow-glow);
}
.btn-normal:hover { color: #fff; opacity: .92; }

.novel-comments {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border) !important;
  border-radius: var(--radius-sm);
  padding: 12px !important;
  margin-bottom: 10px !important;
}
.novel-comments .user-pic {
  width: 42px !important;
  height: 42px;
  object-fit: cover;
  border: 2px solid var(--color-primary-light);
}
.novel-comments .username { color: var(--color-text); font-size: 13px; font-weight: 600; }
.novel-comments .commentstxt { color: var(--color-text-muted); font-size: 13px; }
.novel-comments .dates { color: #9891ac; }

/* -------------------------------------------------------------------- */
/* Chapter list (chapter_list.php)                                      */
/* -------------------------------------------------------------------- */
.novel-chaptersbox { padding-top: 20px; }
.chapterlist .list-group { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--color-border); box-shadow: none; }
.chapterlistitem {
  background: var(--color-surface);
  border: none !important;
  border-bottom: 1px solid var(--color-border) !important;
  color: var(--color-text) !important;
  font-size: 13px;
  transition: background .12s ease;
}
.chapterlistitem:hover { background: var(--color-surface-alt); color: var(--color-primary-dark) !important; }
.chapterlistitem.inactive { color: #c6c0dc !important; }

/* -------------------------------------------------------------------- */
/* Reading page                                                         */
/* -------------------------------------------------------------------- */
.readingbox { padding-top: 18px; }
.reading-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
  padding: 26px 22px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.9;
  color: var(--color-text);
}
.reading-content #novel_title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-align: center;
}

.reading-navigation { margin: 20px 0 !important; }
#div_read_btn {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: none;
  padding: 10px 14px;
  border-radius: 0;
}
#div_read_btn .btn-group .btn,
#div_read_btn .btn-group-justified .btn {
  background: transparent;
  border: none;
  color: var(--color-text) !important;
  font-weight: 600;
  font-family: var(--font-sans);
}
#div_read_btn .btn-group .btn:hover { color: var(--color-primary-dark) !important; }
#div_read_btn .glyphicon { color: var(--color-primary) !important; }
.dropdown-menu {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  padding: 6px;
}
.dropdown-menu li { color: var(--color-text); font-family: var(--font-sans); }
.dropdown-menu a.is-current-chapter li {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

/* -------------------------------------------------------------------- */
/* Search                                                                */
/* -------------------------------------------------------------------- */
.searchpagebox { background: var(--color-bg); }
.wellsection { background: transparent; color: var(--color-text-muted); }
.searchlist a {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  padding: 12px 14px !important;
  box-shadow: none;
  color: var(--color-text);
}
.searchlist .list-group-item { border: none; }

#container .actionDiv {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Centered confirmation-card layout, shared by unsub.html and novel_not_found.html */
#container {
  height: auto !important;
  min-height: calc(100vh - 60px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px 16px !important;
  background: var(--color-bg) !important;
}

.unsub-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
  padding: 30px 22px !important;
  border: 1px solid var(--color-border);
}
.unsub-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(123, 47, 247, 0.12);
  color: var(--color-primary);
  font-size: 24px;
}
.unsub-title { font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--color-text); margin: 0 0 10px; }
.unsub-card .help-block { font-size: 13px; color: var(--color-text-muted); line-height: 1.5; }
.unsub-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px !important;
}
.btn-unsub-cancel, .btn-unsub-confirm {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  cursor: pointer;
}
.btn-unsub-cancel {
  background: var(--gradient-brand);
  color: #fff !important;
  box-shadow: var(--shadow-glow);
}
.btn-unsub-cancel:hover { opacity: .92; }
.btn-unsub-confirm {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-unsub-confirm:hover { color: var(--color-primary); }

/* -------------------------------------------------------------------- */
/* Popups / modals                                                      */
/* -------------------------------------------------------------------- */
#PopupOverlay, #PopupOverlay_v2 {
  background: rgba(20, 12, 38, 0.82);
  backdrop-filter: blur(3px);
}
.actionDiv {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: none;
}
.innerAction { color: var(--color-text); }
.closeSubs { color: var(--color-text-muted); }

/* Subscribe popup */
#subsPopup {
  height: auto !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: 88% !important;
  max-width: 360px;
}
.subscribe-card { position: relative; padding: 34px 24px 28px !important; }
.subscribe-card .closeSubs {
  position: absolute;
  top: 12px;
  right: 14px;
  margin: 0;
  font-size: 16px;
  cursor: pointer;
}
.subscribe-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 24px;
  box-shadow: var(--shadow-glow);
}
.subscribe-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px !important;
  color: var(--color-text);
}
.subscribe-sub {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0 0 18px;
}
.btn-subscribe-cta {
  display: inline-block;
  width: 100%;
  background: var(--gradient-brand);
  color: #fff !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 0;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-glow);
  text-decoration: none !important;
  letter-spacing: .02em;
}
.btn-subscribe-cta:hover { opacity: .92; }

#myModal.modal { background: rgba(20, 12, 38, 0.82); z-index: 99999; }
#myModal .modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 30px 24px 24px !important;
}
.share-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 22px;
  box-shadow: var(--shadow-glow);
}
.share-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px !important;
  color: var(--color-text);
}
.share-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0 0 18px;
}
#myModal .share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 5px 20px;
  transition: transform .12s ease;
}
#myModal .share-icon:hover { transform: translateY(-2px); }
#myModal .share-icon svg { width: 22px; height: 22px; }
#myModal .share-icon-telegram { background: #0088cc; }
#myModal .share-icon-whatsapp { background: #25D366; }
#myModal .share-icon-mail     { background: #62C2E4; }

/* -------------------------------------------------------------------- */
/* Shelf grid (novel listing on home / search)                          */
/* -------------------------------------------------------------------- */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 16px;
  padding: 4px 15px 6px;
}
@media (min-width: 600px)  { .shelf-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .shelf-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .shelf-grid { grid-template-columns: repeat(6, 1fr); } }

.shelf-grid .grid-card { display: block; }
.shelf-grid .grid-card.is-hidden { display: none; }

/* Poster-style cover with the title/author overlaid on a gradient scrim
   at the bottom of the art, instead of plain text underneath -- the
   signature look of novel/comic reading apps. */
.shelf-grid .novel-cover {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-md);
  transition: transform .15s ease, box-shadow .15s ease;
}
.shelf-grid a:hover .novel-cover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.shelf-grid .novel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shelf-grid .novel-cover-scrim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 10px 10px;
  background: linear-gradient(to top, rgba(10, 6, 20, 0.92) 0%, rgba(10, 6, 20, 0.55) 55%, transparent 100%);
}
.shelf-grid .novel-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shelf-grid .novel-author {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.load-more-wrap { text-align: center; margin: 4px 0 22px; }
.btn-load-more {
  display: inline-block;
  background: var(--gradient-brand);
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-glow);
  cursor: pointer;
}
.btn-load-more:hover { opacity: .92; }
.btn-load-more.is-done { display: none; }

/* -------------------------------------------------------------------- */
/* Pagination (search results)                                          */
/* -------------------------------------------------------------------- */
.pagination-modern {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 18px 0 28px;
  flex-wrap: wrap;
}
.pagination-modern a, .pagination-modern span {
  min-width: 34px;
  height: 34px;
  line-height: 32px;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: none;
  padding: 0 4px;
}
.pagination-modern a:hover { color: var(--color-primary-dark); border-color: var(--color-primary-light); text-decoration: none; }
.pagination-modern .is-active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.pagination-modern .is-disabled { opacity: .4; pointer-events: none; }

/* -------------------------------------------------------------------- */
/* Novel detail tabs                                                    */
/* -------------------------------------------------------------------- */
.novel-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 15px;
}
.novel-tabs .tab-btn {
  border: none;
  background: var(--color-surface-alt);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.novel-tabs .tab-btn.is-active {
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: var(--shadow-glow);
}
.tab-panel { display: none; padding-top: 10px; }
.tab-panel.is-active { display: block; }

.chapter-quicklist { padding: 4px 15px 6px; }
.chapter-quicklist .chapterlistitem { height: auto !important; padding: 12px 14px; }
.chapter-quicklist-more {
  display: block;
  text-align: center;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-dark);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  box-shadow: none;
}

/* -------------------------------------------------------------------- */
/* Chapter list groups                                                  */
/* -------------------------------------------------------------------- */
.chapter-group { margin-bottom: 10px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--color-border); box-shadow: none; }
.chapter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  padding: 13px 16px;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
}
.chapter-group-header .fa { color: var(--color-primary); transition: transform .15s ease; }
.chapter-group.is-open .chapter-group-header .fa { transform: rotate(180deg); }
.chapter-group-body { display: none; }
.chapter-group.is-open .chapter-group-body { display: block; }

/* -------------------------------------------------------------------- */
/* Reading toolbar                                                      */
/* -------------------------------------------------------------------- */
.reading-progress-track {
  position: sticky;
  top: 0;
  height: 3px;
  width: 100%;
  background: var(--color-border);
  z-index: 400;
}
.reading-progress-bar { height: 100%; width: 0%; background: var(--color-accent); transition: width .1s linear; }

.reading-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.font-ctrl { display: flex; gap: 8px; }
.font-ctrl button {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.font-ctrl button:hover { border-color: var(--color-primary-light); color: var(--color-primary-dark); }
