/**
 * Theme gần phong cách đọc truyện kiểu HDV: nền xám nhạt + sóng nhẹ, navbar xanh đậm, thẻ trắng, accent xanh lá.
 * Không sao chép asset/CSS của bên thứ ba — chỉ bố cục & tông màu tương tự.
 */
:root {
  --hdv-bg: #f0f2f5;
  --hdv-card: #ffffff;
  --hdv-border: #e2e8f0;
  --hdv-accent: #2e7d32;
  --hdv-accent-hover: #1b5e20;
  --hdv-link: #1565c0;
  --hdv-navy: #1e3a5f;
  --hdv-navy-soft: #2c5282;
  --hdv-footer: #263238;
  --hdv-radius: 14px;
  --hdv-radius-lg: 18px;
  --hdv-shadow-card: 0 4px 18px rgba(15, 23, 42, 0.08);
}

/* Sóng nền nhẹ (SVG inline, tự vẽ — không dùng asset ngoài) */
body.light-mode {
  background-color: var(--hdv-bg) !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%231565c0' fill-opacity='0.04' d='M0 160L60 154.7C120 149 240 139 360 149.3C480 160 600 192 720 186.7C840 181 960 139 1080 128C1200 117 1320 139 1380 149.3L1440 160V320H0Z'/%3E%3Cpath fill='%23475569' fill-opacity='0.05' d='M0 224L80 213.3C160 203 320 181 480 181.3C640 181 800 203 960 208C1120 213 1280 203 1360 197.3L1440 192V320H0Z'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 85% 55% at 12% -8%, rgba(30, 58, 95, 0.09), transparent 52%),
    radial-gradient(ellipse 70% 45% at 92% 4%, rgba(44, 82, 130, 0.07), transparent 48%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(46, 125, 50, 0.05), transparent 55%);
  background-size: 100% 220px, auto, auto, auto;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: top center, 0 0, 0 0, 0 0;
  background-attachment: scroll, fixed, fixed, fixed;
}

body.dark-mode {
  --hdv-bg: #0c101b;
  --hdv-card: #151d2e;
  --hdv-border: rgba(148, 163, 184, 0.22);
  --hdv-accent: #66bb6a;
  --hdv-accent-hover: #81c784;
  --hdv-link: #90caf9;
  --hdv-navy: #94a3b8;
  --hdv-navy-soft: #cbd5e1;
  --hdv-shadow-card: 0 8px 28px rgba(0, 0, 0, 0.45);
  background-color: var(--hdv-bg) !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'%3E%3Cpath fill='%2364748b' fill-opacity='0.12' d='M0 96L48 90.7C96 85 192 75 288 80C384 85 480 107 576 101.3C672 96 768 64 864 58.7C960 53 1056 75 1152 80C1248 85 1344 75 1392 69.3L1440 64V200H0Z'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(30, 41, 59, 0.9), transparent 55%);
  background-size: 100% 140px, auto;
  background-repeat: no-repeat, no-repeat;
  background-position: top center, 0 0;
  background-attachment: scroll, fixed;
}

.hdv-header-fixed {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.hdv-utility-bar {
  position: relative;
  background: linear-gradient(180deg, rgba(44, 62, 80, 0.94) 0%, rgba(30, 43, 55, 0.96) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hdv-utility-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 10px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 12' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' fill-opacity='0.06' d='M0 8Q300 0 600 6T1200 4V12H0Z'/%3E%3C/svg%3E")
    center bottom / 100% 100% no-repeat;
  opacity: 0.9;
}

body.dark-mode .hdv-utility-bar {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.94) 100%);
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

.hdv-utility-meta {
  opacity: 0.92;
}

.hdv-utility-link-mini {
  color: rgba(226, 232, 240, 0.88);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.hdv-utility-link-mini:hover {
  color: #fff;
}

.hdv-utility-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  vertical-align: middle;
}

.hdv-util-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 3.25rem;
  padding: 0.2rem 0.35rem 0.35rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.hdv-util-stack:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hdv-util-ico {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.95;
}

.hdv-util-label {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 4.5rem;
}

@media (min-width: 640px) {
  .hdv-util-label {
    font-size: 0.65rem;
    max-width: none;
  }

  .hdv-util-stack {
    min-width: 3.5rem;
    padding: 0.25rem 0.5rem 0.4rem;
  }

  .hdv-util-ico {
    font-size: 1.05rem;
  }
}

/* Navbar chính — navy gradient (light & dark content theme) */
.hdv-topnav {
  background: linear-gradient(180deg, #1b3557 0%, #152a45 55%, #102238 100%);
  color: #e8eef5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 14px 38px rgba(8, 20, 40, 0.42),
    0 6px 16px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-mode .hdv-topnav {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 48%, #0a0f1a 100%);
  color: #e2e8f0;
  border-bottom-color: rgba(148, 163, 184, 0.2);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.55),
    0 6px 18px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hdv-logo-text {
  font-family: "Roboto Condensed", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  animation: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hdv-logo-text:hover {
  color: #c8e6c9;
}

body.light-mode .hdv-header-fixed .hdv-logo-text {
  color: #fff;
}

body.light-mode .hdv-header-fixed .hdv-logo-text:hover {
  color: #c8e6c9;
}

body.dark-mode .hdv-logo-text {
  color: rgba(248, 250, 252, 0.96);
}

body.dark-mode .hdv-logo-text:hover {
  color: #c8e6c9;
}

.hdv-topnav .hdv-nav-link {
  color: rgba(241, 245, 249, 0.94);
  font-size: 0.9375rem;
}

.hdv-topnav .hdv-nav-link:hover {
  color: #fff;
  border-radius: 6px;
}

body.light-mode .hdv-topnav .hdv-nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
}

body.dark-mode .hdv-topnav .hdv-nav-link:hover {
  background: rgba(148, 163, 184, 0.12);
}

/* Icon trong menu trên nền tối — ghi đè màu Tailwind (theo theme nội dung) */
body.light-mode .hdv-topnav .hdv-nav-link i.text-green-700,
body.light-mode .hdv-topnav .hdv-nav-link i.dark\:text-green-400 {
  color: #b9f6ca !important;
}

body.light-mode .hdv-topnav .hdv-nav-link i.text-orange-500 {
  color: #ffe082 !important;
}

body.dark-mode .hdv-topnav .hdv-nav-link i.text-green-700,
body.dark-mode .hdv-topnav .hdv-nav-link i.dark\:text-green-400 {
  color: #a5d6a7 !important;
}

body.dark-mode .hdv-topnav .hdv-nav-link i.text-orange-500 {
  color: #ffcc80 !important;
}

.hdv-topnav .hdv-nav-link .opacity-70 {
  color: rgba(241, 245, 249, 0.75) !important;
}

/* Ô tìm kiếm trên navbar */
.hdv-topnav .hdv-search-input {
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

.hdv-topnav .hdv-search-input::placeholder {
  color: rgba(226, 232, 240, 0.48);
}

.hdv-topnav .hdv-search-input:focus {
  outline: none;
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28);
}

body.light-mode .hdv-topnav .hdv-search-input {
  background: rgba(15, 23, 42, 0.48);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

body.light-mode .hdv-topnav .hdv-search-input::placeholder {
  color: rgba(226, 232, 240, 0.55);
  opacity: 0.72;
}

body.dark-mode .hdv-topnav .hdv-search-input {
  background: rgba(2, 6, 23, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}

body.light-mode #mobile-search.hdv-topnav {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

body.dark-mode #mobile-search.hdv-topnav {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

/* Nút icon mobile trên thanh tối */
.hdv-topnav .hdv-topnav-icon-btn {
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: rgba(241, 245, 249, 0.95) !important;
}

.hdv-topnav .hdv-topnav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Đăng ký — viền/outline trên nav tối */
.hdv-topnav .hdv-topnav-reg {
  border: 1px solid rgba(165, 214, 167, 0.82) !important;
  color: #e8f5e9 !important;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.hdv-topnav .hdv-topnav-reg:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

.hdv-topnav-avatar-ring {
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.hdv-dropdown {
  background: #fff;
  border: 1px solid var(--hdv-border);
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body.dark-mode .hdv-dropdown {
  background: #0f172a;
  border-color: var(--hdv-border);
}

.hdv-dropdown a:hover {
  color: var(--hdv-accent) !important;
}

.hdv-search-input {
  background: #f1f5f9;
  border: 1px solid var(--hdv-border);
  color: #1e293b;
}

body.dark-mode .hdv-search-input {
  background: #0f172a;
  border-color: var(--hdv-border);
  color: #e2e8f0;
}

.hdv-main-wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.hdv-section-title {
  font-family: "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  border-left: 4px solid var(--hdv-navy-soft);
  padding-left: 0.65rem;
  margin-bottom: 1rem;
}

body.dark-mode .hdv-section-title {
  color: #f1f5f9;
}

.hdv-card {
  background: var(--hdv-card);
  border: 1px solid var(--hdv-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hdv-footer {
  background: var(--hdv-footer);
  color: #eceff1;
  border-top: 3px solid var(--hdv-accent);
}

.hdv-footer a:hover {
  color: #a5d6a7;
}

/* Trang chủ: bỏ max-width 68vw chật */
main.hdv-home {
  max-width: 100% !important;
}

/* Hộp trang chủ (dropFrame) — gọn, giống thẻ nội dung HDV */
body.light-mode .dropFrame,
body.light-mode .dropFrameStrong {
  background: var(--hdv-card) !important;
  border: 1px solid var(--hdv-border) !important;
  border-radius: var(--hdv-radius-lg) !important;
  box-shadow: var(--hdv-shadow-card) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.dark-mode .dropFrame,
body.dark-mode .dropFrameStrong {
  background: rgba(21, 29, 46, 0.92) !important;
  color: #e2e8f0 !important;
  border: 1px solid var(--hdv-border) !important;
  border-radius: var(--hdv-radius-lg) !important;
  box-shadow: var(--hdv-shadow-card) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.dark-mode main.hdv-home .dropFrame .text-gray-800,
body.dark-mode main.hdv-home .dropFrameStrong .text-gray-800 {
  color: #e2e8f0 !important;
}

/* Dải 3 cột dưới: nền trong suốt / gradient nhẹ */
.hdv-bottom-band.dropFrame {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.55) 0%, rgba(248, 250, 252, 0.9) 100%) !important;
}

body.dark-mode .hdv-bottom-band.dropFrame {
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.35) 0%, rgba(12, 16, 27, 0.55) 100%) !important;
}

.hdv-panel {
  background: var(--hdv-card);
  border: 1px solid var(--hdv-border);
  border-radius: var(--hdv-radius-lg);
  box-shadow: var(--hdv-shadow-card);
}

.hdv-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hdv-rank-badge.hdv-rank-1 {
  background: linear-gradient(145deg, #ffc107 0%, #ff8f00 100%);
  color: #3e2723;
}

.hdv-rank-badge.hdv-rank-2 {
  background: linear-gradient(145deg, #1e88e5 0%, #1565c0 100%);
}

.hdv-rank-badge.hdv-rank-3 {
  background: linear-gradient(145deg, #fb8c00 0%, #ef6c00 100%);
}

.hdv-rank-badge.hdv-rank-n {
  background: #64748b;
  color: #f1f5f9;
  font-weight: 700;
}

/* Hàng Độc quyền (truyện đã hoàn) */
.hdv-doc-quyen-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 125, 50, 0.45) transparent;
}

.hdv-doc-quyen-scroll::-webkit-scrollbar {
  height: 6px;
}

.hdv-doc-quyen-scroll::-webkit-scrollbar-thumb {
  background: rgba(46, 125, 50, 0.45);
  border-radius: 4px;
}

.hdv-badge-hoan {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

body.dark-mode .hdv-badge-hoan {
  background: linear-gradient(135deg, #4db6ac 0%, #26a69a 100%);
  color: #0f172a;
}

/* Ribbon chéo góc trên-trái (giống thẻ “15 giờ” trên bìa nhỏ) */
.hdv-ribbon-update {
  position: absolute;
  top: 0.55rem;
  left: -0.35rem;
  z-index: 3;
  max-width: 4.2rem;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0.28rem 0.85rem 0.28rem 0.45rem;
  background: linear-gradient(120deg, #0d47a1 0%, #1976d2 45%, #42a5f5 100%);
  color: #fff;
  transform: rotate(-14deg);
  transform-origin: left center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  text-align: center;
}

/* Cho ribbon không bị cắt bởi overflow của khung ảnh */
.hdv-hot-cover {
  overflow: visible !important;
}

.hdv-dl-feature {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--hdv-border);
  text-decoration: none;
  color: inherit;
}

.hdv-dl-feature:hover .hdv-dl-feature-title {
  color: var(--hdv-link);
}

.hdv-chapter-row {
  border-bottom: 1px dotted var(--hdv-border) !important;
}

.hdv-chapter-row:last-child {
  border-bottom: none !important;
}

/* Banner / hero trang chủ */
.hdv-hero-wrap {
  border-radius: var(--hdv-radius-lg);
}

.hdv-hero-inner {
  border-radius: var(--hdv-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(30, 58, 95, 0.14);
  box-shadow: var(--hdv-shadow-card);
  background: rgba(255, 255, 255, 0.35);
}

body.dark-mode .hdv-hero-inner {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.35);
}

.hdv-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, transform 0.15s ease;
}

.hdv-hero-nav:hover {
  background: rgba(21, 101, 192, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hdv-hero-nav--prev {
  left: 0.5rem;
}

.hdv-hero-nav--next {
  right: 0.5rem;
}

@media (max-width: 639px) {
  .hdv-hero-nav {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
  }

  .hdv-hero-nav--prev {
    left: 0.35rem;
  }

  .hdv-hero-nav--next {
    right: 0.35rem;
  }
}

/* Ribbon nhỏ hơn trên swiper mobile */
.hdv-ribbon-update--sm {
  font-size: 0.52rem;
  max-width: 3.6rem;
  padding: 0.22rem 0.55rem 0.22rem 0.35rem;
  top: 0.4rem;
  left: -0.2rem;
}

/* Nút đăng ký trên navbar tối */
.hdv-btn-register {
  border: 1px solid rgba(165, 214, 167, 0.82) !important;
  color: #e8f5e9 !important;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.hdv-btn-register:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

/* Menu mobile — cùng tông header */
#mobile-menu.hdv-mobile-menu {
  background: linear-gradient(180deg, #1b3557 0%, #152a45 100%);
  color: rgba(241, 245, 249, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#mobile-menu.hdv-mobile-menu a {
  color: rgba(241, 245, 249, 0.92);
}

#mobile-menu.hdv-mobile-menu a:hover {
  color: #fff;
}

#mobile-menu.hdv-mobile-menu hr {
  border-color: rgba(255, 255, 255, 0.12);
}

#mobile-menu.hdv-mobile-menu #mobile-genre-menu {
  background: rgba(15, 23, 42, 0.45) !important;
  border-radius: 8px;
  padding: 0.5rem;
}

body.dark-mode #mobile-menu.hdv-mobile-menu {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

/* Trang chi tiết truyện */
.hdv-btn-primary {
  display: block;
  text-align: center;
  text-decoration: none;
  color: #fff !important;
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(27, 94, 32, 0.35);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.hdv-btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

body.dark-mode .hdv-btn-primary {
  background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hdv-story-top .hdv-author-card {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid var(--hdv-border);
  box-shadow: var(--hdv-shadow-card);
}

body.dark-mode .hdv-story-top .hdv-author-card {
  background: rgba(30, 41, 59, 0.65);
  border-color: var(--hdv-border);
}

body.dark-mode .hdv-story-top .text-gray-600,
body.dark-mode .hdv-story-top .text-gray-700 {
  color: #cbd5e1 !important;
}

body.dark-mode .hdv-story-top .text-gray-800 {
  color: #e2e8f0 !important;
}

body.dark-mode .hdv-story-top a.ten_tacgia {
  color: #7dd3fc !important;
}

/* —— Trang đọc chương (chuong.php + .hdv-reader) —— */
.hdv-reader {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .hdv-reader {
    max-width: 48rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.hdv-reader .chapter-info {
  border-radius: var(--hdv-radius-lg);
  box-shadow: var(--hdv-shadow-card);
  border: 1px solid var(--hdv-border);
  padding: 0.85rem 1rem 1.1rem !important;
}

body.dark-mode .hdv-reader .chapter-info {
  background-color: rgba(21, 29, 46, 0.88);
  color: #e2e8f0;
}

.hdv-reader .chapter-info .prev-chapter a:not(.disabled) {
  color: #1565c0 !important;
  border-color: rgba(21, 101, 192, 0.45) !important;
  background: #fff !important;
}

.hdv-reader .chapter-info .next-chapter a:not(.disabled) {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%) !important;
  border-color: rgba(27, 94, 32, 0.55) !important;
  color: #fff !important;
}

.hdv-reader .chapter-info .prev-chapter a.disabled,
.hdv-reader .chapter-info .next-chapter a.disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.hdv-reader .settings-icon,
.hdv-reader .chapter-icon,
.hdv-reader .bookmark-icon,
.hdv-reader .bookmark-icon-123 {
  background: linear-gradient(180deg, #1b3557 0%, #152a45 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  width: auto !important;
  min-width: 6.5rem;
  padding: 0.35rem 0.65rem !important;
  border-radius: 8px !important;
  line-height: 1.35 !important;
}

.hdv-reader .bookmark-icon-123 {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%) !important;
}

.hdv-reader .settings-menu {
  margin-top: 1rem !important;
  flex-wrap: wrap;
  gap: 0.6rem !important;
  justify-content: center;
}

.hdv-reader .settings-panel {
  border-radius: var(--hdv-radius-lg);
  border: 1px solid var(--hdv-border);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  background: var(--hdv-card);
}

.hdv-reader #settingsPanel.settings-panel {
  display: none;
  position: fixed;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  z-index: 1001;
  max-width: 22rem;
  width: calc(100vw - 1.5rem);
  max-height: 85vh;
  overflow-y: auto;
  margin-top: 0;
  padding: 1.25rem 1rem 1.5rem;
}

body.dark-mode .hdv-reader #settingsPanel.settings-panel {
  background: var(--hdv-card);
  color: #e2e8f0;
}

.hdv-reader #settingsPanel .close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 0.25rem 0.45rem;
}

.hdv-reader #settingsPanel .close-btn:hover {
  color: #1e293b;
}

body.dark-mode .hdv-reader #settingsPanel .close-btn {
  color: #94a3b8;
}

.hdv-reader a.tentieude {
  color: var(--hdv-link);
  text-decoration: none;
}

.hdv-reader a.tentieude:hover {
  color: var(--hdv-accent-hover);
}

.hdv-reader .hdv-reader-title {
  font-size: 1.15rem;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .hdv-reader .hdv-reader-title {
    font-size: 1.35rem;
  }
}

.hdv-reader .chapter-info .chapter-dropdown select {
  margin-top: 1rem !important;
  border-radius: 10px !important;
  border-color: var(--hdv-border) !important;
}

.hdv-reader .chapter-content {
  margin-top: 1.25rem;
  padding: 1.15rem 1rem;
  border-radius: var(--hdv-radius);
  border: 1px solid var(--hdv-border);
  background: rgba(255, 255, 255, 0.65);
}

body.dark-mode .hdv-reader .chapter-content {
  background: rgba(15, 23, 42, 0.4);
}

.hdv-reader-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 9999px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #1b3557 0%, #152a45 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.hdv-reader-fab:hover {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.hdv-reader-fab--accent {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
  border-color: rgba(255, 255, 255, 0.2);
}
