/* ========== CSS VARIABLES ========== */
:root {
  /* Primary */
  --ov-primary: #00C3A9;
  --ov-primary-hover: #00A892;
  /* Text */
  --ov-text-darkest: #15161A;
  --ov-text: #32343A;
  --ov-text-gray: #7C7F87;
  --ov-text-white: #fff;
  /* Background */
  --ov-bg-body: #fff;
  --ov-bg-gray: #f5f5f5;
  --ov-bg-placeholder: #eee;
  --ov-bg-green-light: #E6F9F5;
  /* Border */
  --ov-border: #EFEFEF;
  --ov-border-input: #d9d9d9;
  /* Shadow */
  --ov-shadow-sm: rgba(0, 0, 0, .1);
  --ov-shadow-lg: rgba(0, 0, 0, .16);
  --ov-overlay: rgba(0, 0, 0, .2);
  --ov-overlay-modal: rgba(0, 0, 0, .4);
  --ov-mask-overlay: rgba(0, 0, 0, .55);
  /* Toast */
  --ov-toast-info-bg: #E0F7FA;
  --ov-toast-info-text: #00796B;
  --ov-toast-success-bg: #E8F5E9;
  --ov-toast-success-text: #2E7D32;
  --ov-toast-error-bg: #FFEBEE;
  --ov-toast-error-text: #C62828;
  /* Special */
  --ov-rank-gold: #FFB347;
  --ov-rank-red: #FF6B6B;
  --ov-author-btn-start: #1EE7C3;
  --ov-author-btn-end: #62D6FE;
  --ov-spinner: #00C3A9;
  --ov-menu-btn-bar: #32343A;
  /* Genre card placeholders */
  --ov-genre-c1: #00C3A9;
  --ov-genre-c2: #FF6B6B;
  --ov-genre-c3: #845EF7;
  --ov-genre-c4: #339AF0;
  --ov-genre-c5: #F59F00;
  --ov-genre-c6: #20C997;
}

/* ========== DARK MODE VARIABLES ========== */
[data-theme="dark"] {
  --ov-primary: #00C3A9;
  --ov-primary-hover: #00D4B8;
  --ov-text-darkest: #E5E7EB;
  --ov-text: #D1D5DB;
  --ov-text-gray: #9CA3AF;
  --ov-text-white: #fff;
  --ov-bg-body: #0F1117;
  --ov-bg-gray: #15181D;
  --ov-bg-placeholder: #232730;
  --ov-bg-green-light: #1A2A27;
  --ov-border: #2A2D35;
  --ov-border-input: #2A2D35;
  --ov-shadow-sm: rgba(0, 0, 0, .25);
  --ov-shadow-lg: rgba(0, 0, 0, .3);
  --ov-overlay: rgba(0, 0, 0, .5);
  --ov-overlay-modal: rgba(0, 0, 0, .6);
  --ov-mask-overlay: rgba(0, 0, 0, .7);
  --ov-toast-info-bg: #1A3A38;
  --ov-toast-info-text: #4DD0E1;
  --ov-toast-success-bg: #1A3A20;
  --ov-toast-success-text: #69F0AE;
  --ov-toast-error-bg: #3A1A1A;
  --ov-toast-error-text: #EF9A9A;
  --ov-rank-gold: #FFB347;
  --ov-rank-red: #FF6B6B;
  --ov-author-btn-start: #1EE7C3;
  --ov-author-btn-end: #62D6FE;
  --ov-spinner: #00C3A9;
  --ov-menu-btn-bar: #D1D5DB;
}

/* ========== RESET ========== */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0
}

html,
body {
  color: var(--ov-text);
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--ov-bg-body);
  min-height: 100vh;
  width: 100%
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none
}

a:active,
a:focus {
  outline: none
}

h3,
li,
p,
ul {
  margin: 0;
  padding: 0;
  list-style: none
}

button {
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  line-height: inherit
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

.main-width {
  width: 1080px;
  margin: 0 auto;
  padding: 0;
  position: relative
}

.b-color {
  background: var(--ov-bg-gray)
}

/* ========== HEADER ========== */
.ov-header {
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
  height: 63px;
  background-color: var(--ov-bg-body);
  border-bottom: 1px solid var(--ov-border);
  box-sizing: content-box
}

.ov-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 20px
}

.ov-logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-family: SFUIDisplay-Bold, SFUIDisplay, PingFang SC, sans-serif;
  font-weight: 700;
  color: var(--ov-text-darkest);
  flex-shrink: 0;
  margin-right: 30px;
  text-decoration: none;
  overflow: hidden;
  min-width: 0
}

.ov-logo img {
  height: 32px;
  width: 32px;  
  border-radius: 4px;
  flex-shrink: 0
}

.ov-logo-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  margin-left: 9px;
}

.ov-nav {
  display: flex;
  align-items: center;
  height: 100%
}

.ov-nav a {
  height: 100%;
  line-height: 63px;
  margin-left: 20px;
  font-size: 16px;
  font-family: PingFangSC-Medium, PingFang SC, sans-serif;
  font-weight: 600;
  color: var(--ov-text);
  transition: color .2s
}

.ov-nav a:first-child {
  margin-left: 0
}

.ov-nav a:hover,
.ov-nav a.link-active {
  color: var(--ov-primary);
  text-decoration: none
}

.ov-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0
}

.ov-search-icon {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px
}

.ov-search-icon img,
.ov-search-icon i {
  color: var(--ov-text);
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center
}

.ov-search-icon i:hover {
  color: var(--ov-primary)
}

[data-theme="dark"] .ov-search-icon i {
  color: var(--ov-primary)
}

.theme-btn {
  cursor: pointer;
  background: none;
  border: none;
  display: flex;
  padding: 4px
}

.ov-search-icon i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1.2rem;
  color: var(--ov-text)
}

.theme-btn:hover {
  color: var(--ov-primary)
}

[data-theme="dark"] .icon-sun {
  font-size: 1.2rem;
  color: var(--ov-primary);
  display: block
}

[data-theme="dark"] .icon-moon {
  display: none
}

:root:not([data-theme="dark"]) .icon-moon {
  font-size: 1.35rem;
  display: block
}

:root:not([data-theme="dark"]) .icon-sun {
  display: none
}

.author-btn {
  padding: 0 12px 0 14px;
  height: 25px;
  line-height: 25px;
  background: linear-gradient(270deg, var(--ov-author-btn-start) 0%, var(--ov-author-btn-end) 100%);
  border-radius: 25px;
  font-size: 13px;
  font-family: PingFangSC-Semibold, PingFang SC, sans-serif;
  font-weight: 600;
  color: var(--ov-text-white);
  white-space: nowrap;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.author-btn:hover {
  color: var(--ov-text-white);
  opacity: .9
}

.book-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ov-text);
  margin: 0
}

.book-icon img,
.book-icon i {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px
}

[data-theme="dark"] .book-icon i {
  color: var(--ov-primary)
}

.book-icon:hover,
.book-icon:hover i {
  color: var(--ov-primary)
}

.avatar-box {
  display: flex;
  align-items: center
}

.avatar-box img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer
}

.user-logged-wrapper {
  position: relative;
  display: flex;
  align-items: center
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--ov-bg-body);
  border-radius: 8px;
  box-shadow: 0 6px 20px var(--ov-shadow-sm);
  border: 1px solid var(--ov-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all .3s;
  z-index: 1000;
  padding: 0
}

.user-logged-wrapper:hover .user-dropdown,
.user-logged-wrapper.active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

.user-info {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ov-border)
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ov-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ov-text);
  text-decoration: none;
  transition: background .2s
}

.dropdown-item:hover {
  background: var(--ov-bg-gray);
  color: var(--ov-primary)
}

.dropdown-item i {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0
}

.mobile-user-links {
  display: none
}

.login-links {
  display: flex;
  gap: 8px;
  align-items: center
}

.login-links a {
  font-size: 14px;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 600;
  color: var(--ov-text)
}

.login-links a:hover {
  color: var(--ov-primary)
}

.login-links .btn-outline:hover, .footer-desc .btn-outline:hover {
  color: var(--ov-text-white)
}

.ov-menu-btn {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px
}

.ov-menu-btn span {
  display: block;
  height: 2px;
  background: var(--ov-menu-btn-bar);
  border-radius: 1px;
  transition: all .2s
}

.ov-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px)
}

.ov-menu-btn.active span:nth-child(2) {
  opacity: 0
}

.ov-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px)
}

/* ========== SEARCH OVERLAY ========== */
.search-overlay {
  position: fixed;
  top: 63px;
  left: 0;
  width: 100%;
  background: var(--ov-bg-body);
  padding: 14px 0;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s;
  border-bottom: 1px solid var(--ov-border)
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

.search-box {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px
}

.search-box input {
  flex: 1;
  padding: 6px 14px;
  border: 1px solid var(--ov-border-input);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  color: var(--ov-text);
  background: var(--ov-bg-body)
}

.search-box input:focus {
  border-color: var(--ov-primary)
}

.search-box button {
  background: var(--ov-primary);
  color: var(--ov-text-white);
  border: none;
  border-radius: 21px;
  padding: 6px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer
}

/* ========== BOOK CARD ========== */
.book-item {
  display: flex;
  gap: 14px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  color: inherit
}

.book-item:hover h3 {
  color: var(--ov-primary)
}

.book-cover-wrap {
  flex-shrink: 0;
  width: 120px;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ov-bg-placeholder)
}

.book-cover-wrap img {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px
}

.book-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px
}

.book-left h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ov-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.label-author {
  font-size: 12px;
  color: var(--ov-text-gray);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap
}

.label-author .label {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--ov-primary);
  border-radius: 3px;
  color: var(--ov-primary);
  font-size: 11px;
  font-weight: 500
}

.book-left p {
  font-size: 12px;
  color: var(--ov-text-gray);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.book-num {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ov-text-gray)
}

.book-num .eye-icon {
  width: 16px;
  height: 14px;
  opacity: .55
}

.book-num .dian {
  margin: 0 2px
}

.book-status {
  color: var(--ov-primary)
}

/* ========== SECTION ========== */
.index-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-top: 20px
}

.index-title h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ov-text);
  display: flex;
  align-items: center;
  gap: 6px
}

.more-link {
  font-size: 13px;
  color: var(--ov-text-gray);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color .2s
}

.more-link:hover {
  color: var(--ov-primary)
}

.more-link img {
  width: 8px;
  height: 12px
}

.book-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 20px
}

.sec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px
}

.sec-hd h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ov-text);
  margin: 0
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px
}

.book-card {
  cursor: pointer;
  transition: transform 0.2s
}

.book-card:hover {
  transform: translateY(-4px)
}

.book-card .cover {
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px var(--ov-shadow-sm)
}

.book-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.book-card .title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 4px
}

.book-card .title a {
  color: var(--ov-text);
  text-decoration: none
}

.book-card .title a:hover {
  color: var(--ov-primary)
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px
}

/* 分页 */
.ov-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap
}

.ov-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background: var(--ov-bg-body);
  color: var(--ov-text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s
}

.ov-page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--ov-primary);
  color: var(--ov-primary)
}

.ov-page-btn.active {
  background: var(--ov-primary);
  border-color: var(--ov-primary);
  color: var(--ov-text-white);
  font-weight: 600
}

.ov-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed
}

.ov-page-ellipsis {
  padding: 0 4px;
  color: var(--ov-text-gray);
  font-size: 13px
}

/* 书籍列表页网格 */
.book-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px
}

.book-card-h {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  transition: box-shadow 0.2s
}

.book-card-h:hover {
  box-shadow: 0 4px 16px var(--ov-shadow-sm)
}

.book-card-h .cover {
  width: 90px;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0
}

.book-card-h .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.book-card-h .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.book-card-h .title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical
}

.book-card-h .title a {
  color: var(--ov-text);
  text-decoration: none
}

.book-card-h .title a:hover {
  color: var(--ov-primary)
}

.book-card-h .author {
  font-size: 12px;
  color: var(--ov-text-gray)
}

/* 列表简介：最多 2 行，超出省略（字数截断由 JS 处理，这里兜底） */
.book-card-h .desc {
  font-size: 12px;
  color: var(--ov-text-gray);
  line-height: 1.5;
  max-height: 5em;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical
}

.book-card-h .desc:empty {
  display: none
}

.book-card-h .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto
}

@media (max-width: 768px) {
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px
  }

  .book-card .title {
    font-size: 13px
  }
}

@media (max-width: 480px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px
  }
}

/* ========== SLIDE ========== */
.ov-slide{width:100%;margin-top: 20px;}
.ov-slide-inner{position:relative;width:100%;max-width:1080px;margin:0 auto;height:240px;overflow:hidden;border-radius:12px}
.ov-slide-item{position:absolute;inset:0;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:0;transition:opacity .6s ease;display:block}
.ov-slide-item.active{opacity:1}
.ov-slide-dots{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:2}
.ov-slide-dot{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.45);cursor:pointer;transition:all .3s}
.ov-slide-dot.active{background:#fff;transform:scale(1.25)}

/* ========== GENRE BOX ========== */
.genre-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 20px
}

.genre-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border: 1px solid var(--ov-border);
  border-radius: 21px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ov-text);
  background: var(--ov-bg-body);
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap
}

.genre-item:hover {
  border-color: var(--ov-primary);
  color: var(--ov-primary);
  background: var(--ov-bg-green-light)
}

/* ========== LINKS ========== */
.ov-links{display:flex;flex-wrap:wrap;gap:10px;padding-bottom:20px}
.ov-links a{padding:6px 16px;border:1px solid var(--ov-border);border-radius:17px;font-size:13px;color:var(--ov-text-gray);background:var(--ov-bg-body);transition:all .2s;white-space:nowrap}
.ov-links a:hover{border-color:var(--ov-primary);color:var(--ov-primary)}

/* ========== FOOTER ========== */
.footer {
  background: var(--ov-bg-body);
  padding: 32px 0 20px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--ov-text-gray)
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px
}

.footer h5 {
  color: var(--ov-text);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px
}

.footer a {
  font-size: 13px;
  color: var(--ov-text-gray);
  line-height: 2;
  display: block
}

.footer a:hover {
  color: var(--ov-primary)
}

.footer-logo img {
  height: 24px;
  margin-bottom: 8px
}

.footer-desc {
  line-height: 1.6
}

.footer-bottom {
  border-top: 1px solid var(--ov-border);
  padding-top: 14px;
  margin-top: 24px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px
}

/* ========== DETAIL ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 0;
  font-size: 13px;
  color: var(--ov-text-gray);
  flex-wrap: wrap
}

.breadcrumb a {
  color: var(--ov-text-gray)
}

.breadcrumb a:hover {
  color: var(--ov-primary)
}

.book-header {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 20px;
  padding: 20px;
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  margin-bottom: 20px
}

.book-cover {
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: 0 4px 16px var(--ov-shadow-sm)
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.book-info h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--ov-text)
}

.book-info .author {
  font-size: 14px;
  color: var(--ov-primary);
  margin-bottom: 8px
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px
}

.book-tags span {
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 11px;
  border: 1px solid var(--ov-primary);
  color: var(--ov-primary)
}

.book-desc {
  font-size: 13px;
  color: var(--ov-text-gray);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  margin-bottom: 10px
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 22px;
  border-radius: 21px;
  font-size: 14px;
  font-weight: 600;
  background: var(--ov-primary);
  color: var(--ov-text-white);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap
}

.btn-primary:hover {
  background: var(--ov-primary-hover);
  color: var(--ov-text-white)
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 20px;
  border-radius: 21px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--ov-primary);
  border: 1px solid var(--ov-primary);
  cursor: pointer
}

.btn-outline:hover {
  background: var(--ov-primary);
  color: var(--ov-text-white)
}

.btn-sm {
  padding: 5px 14px;
  font-size: 12px
}

.btn-lg {
  padding: 10px 24px;
  font-size: 15px
}

.btn-block {
  width: 100%
}

.author-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  margin-bottom: 20px
}

.author-profile-full {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 12px;
  margin-bottom: 24px
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ov-primary);
  flex-shrink: 0
}

.author-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ov-primary);
  flex-shrink: 0;
}

.author-profile-body {
  flex: 1;
  min-width: 0
}

.author-profile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px
}

.author-profile-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ov-text);
  line-height: 1.2
}

/* 作者统计列表 */
.author-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--ov-text-gray);
  list-style: none
}

.author-stats li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.author-stats li i {
  font-size: 14px;
  color: var(--ov-text-gray)
}

/* 分隔符：非首项前面加竖线 */
.author-stats li + li::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--ov-border);
  margin: 0 10px;
  flex-shrink: 0
}

.author-stat-value {
  font-weight: 600;
  color: var(--ov-primary)
}

@media (max-width: 768px) {
  .author-profile-full {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px
  }

  .author-avatar-lg {
    width: 56px;
    height: 56px
  }

  .author-profile-header h2 {
    font-size: 17px
  }

  .author-stats {
    font-size: 12px
  }

  /* 移动端：每个 li 独占一行 */
  .author-stats li {
    width: 100%;
  }

  .author-stats li + li::before {
    display: none
  }
}

.author-meta h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ov-text)
}

.badge-sign {
  background: var(--ov-primary);
  color: var(--ov-text-white);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px
}

.author-sidebar {
  text-align: center
}

.author-sidebar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ov-primary);
  margin: 0 auto 4px
}

.author-sidebar .as-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ov-text)
}

.author-stats {
  display: flex;
  justify-content: flex-start;
  font-size: 11px;
  color: var(--ov-text-gray)
}

.author-stats b {
  display: block;
  font-size: 14px;
  color: var(--ov-primary);
  font-weight: 700
}

.tabs {
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--ov-border);
  background: var(--ov-bg-body)
}

.tab-nav li {
  padding: 12px 20px;
  font-size: 14px;
  color: var(--ov-text-gray);
  cursor: pointer;
  position: relative;
  font-weight: 500
}

.tab-nav li.active {
  color: var(--ov-primary)
}

.tab-nav li.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--ov-primary)
}

.tab-panel {
  display: none;
  padding: 20px;
  background: var(--ov-bg-body)
}

.tab-panel.active {
  display: block
}

.chapter-preview {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--ov-border)
}

.chapter-preview h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ov-text);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--ov-border)
}

.chapter-content {
  font-size: 15px;
  line-height: 2;
  color: var(--ov-text);
  word-break: break-word;
  max-height: 300px;
  overflow: hidden;
  position: relative
}

.chapter-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--ov-bg-body));
  pointer-events: none
}

@media (max-width: 768px) {
  .chapter-preview h2 {
    font-size: 16px
  }

  .chapter-content {
    font-size: 14px;
    line-height: 1.8;
    max-height: 240px
  }
}

.chapter-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 4px
}

.chapter-item:hover {
  background: var(--ov-bg-gray)
}

.chapter-item .ch-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.chapter-item .ch-time {
  color: var(--ov-text-gray);
  font-size: 12px;
  margin-left: 12px
}

.chapter-paging {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ov-border);
  font-size: 13px
}

.ch-info {
  color: var(--ov-text-gray);
  padding: 0 4px;
  white-space: nowrap
}

.ch-jump {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--ov-border);
  border-radius: 6px;
  background: var(--ov-bg-body);
  color: var(--ov-text);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  appearance: auto
}

.ch-jump:focus {
  border-color: var(--ov-primary)
}

/* ========== READER ========== */
.reader {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 0 40px
}

.reader-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ov-border);
  margin-bottom: 16px
}

.reader-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ov-text);
  margin: 0 0 12px;
  line-height: 1.4
}

.reader-meta {
  font-size: 13px;
  color: var(--ov-text-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap
}

.reader-meta > span:not(.meta-divider) {
  padding: 4px 10px
}

.reader-meta i {
  font-size: 13px;
  margin-right: 2px
}

.meta-divider {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--ov-border);
  flex-shrink: 0;
  align-self: center
}

.reader-tools {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap
}

.reader-tools-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 20px;
  padding: 2px 4px 2px 10px
}

.reader-tools-group label {
  font-size: 14px;
  color: var(--ov-text-gray);
  display: flex;
  align-items: center
}

.reader-tools-group select {
  padding: 6px 10px 6px 4px;
  border: none;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  color: var(--ov-text);
  outline: none
}

.reader-content {
  font-size: 20px;
  line-height: 2;
  color: var(--ov-text);
  padding: 24px;
  min-height: 50vh
}

.reader-content p {
  margin-bottom: 1em;
  text-indent: 2em
}

.reader-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ov-border);
  gap: 8px
}

.reader-nav a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  background: var(--ov-bg-gray);
  color: var(--ov-text);
  text-decoration: none;
  transition: all 0.2s
}

.reader-nav a:hover {
  background: var(--ov-primary);
  color: var(--ov-text-white)
}

@media (max-width: 768px) {
  .reader {
    padding: 16px 16px 32px
  }

  .reader-header h1 {
    font-size: 20px
  }

  .reader-meta {
    font-size: 12px
  }

  .reader-meta > span {
    padding: 4px 6px
  }

  .reader-content {
    font-size: 18px;
    line-height: 1.9;
    padding: 16px;
  }

  .reader-nav {
    flex-direction: column;
    gap: 8px
  }

  .reader-nav a {
    width: 100%;
    justify-content: center;
    text-align: center
  }

  .reader-tools {
    gap: 6px
  }

  .reader-tools-group {
    padding: 2px 3px 2px 8px
  }

  .reader-tools-group select {
    font-size: 12px;
    padding: 5px 8px 5px 2px
  }
}

/* ========== AUTH ========== */
.auth-wrap {
  max-width: 600px;
  margin: 48px auto;
  padding: 0 20px
}

.auth-card {
  padding: 32px;
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 8px
}

.auth-card h2 {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--ov-text);
  margin-bottom: 4px
}

.auth-sub {
  text-align: center;
  font-size: 13px;
  color: var(--ov-text-gray);
  margin-bottom: 20px
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--ov-border);
  margin-bottom: 20px
}

.auth-tabs li {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: var(--ov-text-gray);
  cursor: pointer;
  position: relative;
  font-weight: 500
}

.auth-tabs li.active {
  color: var(--ov-primary)
}

.auth-tabs li.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--ov-primary)
}

.auth-panel {
  display: none
}

.auth-panel.active {
  display: block
}

.form-group {
  margin-bottom: 12px
}

.form-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ov-border-input);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  color: var(--ov-text);
  background: var(--ov-bg-body)
}

.form-group input:focus {
  border-color: var(--ov-primary)
}

.form-row {
  display: flex;
  gap: 6px;
  align-items: flex-end
}

.form-row .form-group {
  flex: 1
}

.captcha-img {
  height: 42px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--ov-border)
}

.auth-footer {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ov-text-gray)
}

.auth-footer a {
  color: var(--ov-primary);
  font-weight: 600
}

.auth-footer .btn {
  margin-top: 10px
}

.form-agreement {
  margin-bottom: 12px
}

.agreement-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  color: var(--ov-text-gray);
  cursor: pointer
}

.agreement-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--ov-primary);
  cursor: pointer
}

.ov-agreement-link {
  color: var(--ov-primary);
  font-weight: 500
}

.ov-agreement-link:hover {
  text-decoration: underline
}

/* ========== MODAL (generic) ========== */
.ov-modal, .ov-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s
}

.ov-modal.active, .ov-modal-overlay.active {
  opacity: 1;
  visibility: visible
}

.ov-modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ov-overlay-modal)
}

.ov-modal-dialog {
  position: relative;
  z-index: 1;
  background: var(--ov-bg-body);
  border-radius: 8px;
  box-shadow: 0 8px 24px var(--ov-shadow-lg);
  width: 90%;
  max-width: 640px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden
}

.ov-modal-sm { max-width: 380px }
.ov-modal-lg { max-width: 800px; max-height: 85vh }

.ov-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ov-border);
  flex-shrink: 0
}

.ov-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ov-text)
}

.ov-modal-close {
  font-size: 18px;
  color: var(--ov-text-gray);
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none
}

.ov-modal-close:hover {
  color: var(--ov-text)
}

.ov-modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ov-text);
  flex: 1
}

.ov-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--ov-border);
  flex-shrink: 0
}

/* ========== FILTER / RANK ========== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center
}

.filter-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--ov-text)
}

.filter-tag {
  padding: 4px 12px;
  border-radius: 17px;
  font-size: 12px;
  border: 1px solid var(--ov-border);
  cursor: pointer;
  color: var(--ov-text-gray);
  background: var(--ov-bg-body)
}

.filter-tag.active,
.filter-tag:hover {
  border-color: var(--ov-primary);
  color: var(--ov-primary)
}

.sort-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 14px
}

.sort-item {
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ov-text-gray)
}

.sort-item.active,
.sort-item:hover {
  color: var(--ov-primary)
}

.rank-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px
}

.rank-tab {
  padding: 7px 18px;
  border-radius: 17px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--ov-border);
  color: var(--ov-text);
  background: var(--ov-bg-body)
}

.rank-tab.active,
.rank-tab:hover {
  background: var(--ov-primary);
  color: var(--ov-text-white);
  border-color: var(--ov-primary)
}

.rank-list {
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  overflow: hidden
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ov-border);
  background: var(--ov-bg-body)
}

.rank-item:hover {
  background: var(--ov-bg-gray)
}

.rank-num {
  width: 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ov-text-gray)
}

.rank-item:nth-child(1) .rank-num {
  color: var(--ov-rank-red)
}

.rank-item:nth-child(2) .rank-num {
  color: var(--ov-rank-gold)
}

.rank-item:nth-child(3) .rank-num {
  color: var(--ov-primary)
}

.rank-cover {
  width: 40px;
  height: 53px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--ov-bg-placeholder);
  flex-shrink: 0
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

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

.rank-info .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ov-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.rank-info .title a {
  color: var(--ov-text);
  text-decoration: none
}

.rank-info .title a:hover {
  color: var(--ov-primary)
}

.rank-info .author {
  font-size: 12px;
  color: var(--ov-text-gray)
}

.rank-stat {
  font-size: 12px;
  color: var(--ov-primary);
  white-space: nowrap
}

/* 排行面板多列布局 */
.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px
}

.rank-panel {
  border: 1px solid var(--ov-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ov-bg-body)
}

.rank-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--ov-bg-gray);
  border-bottom: 1px solid var(--ov-border);
  font-size: 15px;
  font-weight: 600;
  color: var(--ov-text)
}

.rank-panel-header i {
  font-size: 16px;
  color: var(--ov-primary)
}

.rank-panel-body {
  padding: 0
}

.rank-panel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ov-border);
  transition: background 0.15s
}

.rank-panel-item:last-child {
  border-bottom: none
}

.rank-panel-item:hover {
  background: var(--ov-bg-gray)
}

.rank-panel-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  color: var(--ov-text-gray);
  background: var(--ov-bg-gray);
  flex-shrink: 0
}

.rank-panel-item:nth-child(1) .rank-panel-num {
  background: #ef4444;
  color: #fff
}

.rank-panel-item:nth-child(2) .rank-panel-num {
  background: #f59e0b;
  color: #fff
}

.rank-panel-item:nth-child(3) .rank-panel-num {
  background: var(--ov-primary);
  color: #fff
}

.rank-panel-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.rank-panel-text a {
  color: var(--ov-text);
  text-decoration: none
}

.rank-panel-text a:hover {
  color: var(--ov-primary)
}

.rank-panel-stat {
  font-size: 12px;
  color: var(--ov-primary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0
}

@media (max-width: 768px) {
  .rank-grid {
    grid-template-columns: 1fr;
    gap: 14px
  }

  .rank-panel-header {
    font-size: 14px;
    padding: 12px 14px
  }

  .rank-panel-item {
    padding: 8px 14px;
    gap: 10px
  }
}

/* ========== UCenter ========== */
.ucenter {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  width: 1080px;
  margin: 0 auto;
  padding: 20px 0
}

.ucenter-sidebar {
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  padding: 16px
}

.ucenter-sidebar .user-card {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ov-border);
  margin-bottom: 12px
}

.ucenter-sidebar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  border: 2px solid var(--ov-primary)
}

.ucenter-sidebar h4 {
  font-size: 14px;
  color: var(--ov-text)
}

.ucenter-sidebar p {
  font-size: 12px;
  color: var(--ov-text-gray)
}

.ucenter-menu {
  display: flex;
  flex-direction: column;
  gap: 2px
}

.ucenter-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--ov-text)
}

.ucenter-menu a:hover,
.ucenter-menu a.active {
  background: var(--ov-bg-green-light);
  color: var(--ov-primary)
}

.ucenter-content {
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  padding: 20px;
  min-height: 400px
}

.profile-form {
  max-width: 400px;
  margin-top: 20px
}

.profile-form .btn {
  margin-top: 8px
}

/* 阅读记录 */
.readlog-list {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.readlog-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--ov-bg-body);
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  transition: box-shadow 0.2s
}

.readlog-item:hover {
  box-shadow: 0 2px 10px var(--ov-shadow-sm)
}

.readlog-cover {
  width: 56px;
  height: 75px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0
}

.readlog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.readlog-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.readlog-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.readlog-title a {
  color: var(--ov-text);
  text-decoration: none
}

.readlog-title a:hover {
  color: var(--ov-primary)
}

.readlog-meta {
  font-size: 12px;
  color: var(--ov-text-gray)
}

.readlog-progress {
  height: 4px;
  background: var(--ov-bg-gray);
  border-radius: 2px;
  overflow: hidden
}

.readlog-progress-bar {
  display: block;
  height: 100%;
  background: var(--ov-primary);
  border-radius: 2px;
  transition: width 0.3s
}

.readlog-continue {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--ov-primary);
  border-radius: 16px;
  font-size: 12px;
  color: var(--ov-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s
}

.readlog-continue:hover {
  background: var(--ov-primary);
  color: var(--ov-text-white)
}

@media (max-width: 768px) {
  .readlog-item {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px
  }

  .readlog-cover {
    width: 48px;
    height: 64px
  }

  .readlog-continue {
    width: 100%;
    justify-content: center
  }
}

/* ========== TOAST / LOADING / PAGE / MODAL ========== */
#ov-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 300px
}

.ov-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 6px 16px var(--ov-shadow-sm);
  transform: translateX(120%);
  opacity: 0;
  transition: all .3s
}

.ov-toast.show {
  transform: translateX(0);
  opacity: 1
}

.ov-toast-info {
  background: var(--ov-toast-info-bg);
  color: var(--ov-toast-info-text)
}

.ov-toast-success {
  background: var(--ov-toast-success-bg);
  color: var(--ov-toast-success-text)
}

.ov-toast-error {
  background: var(--ov-toast-error-bg);
  color: var(--ov-toast-error-text)
}

.ov-toast-warning {
  background: #FFF3E0;
  color: #E65100
}

.ov-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  background: var(--ov-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s
}

.ov-loading-overlay.active {
  opacity: 1;
  visibility: visible
}

.ov-spinner {
  display: flex;
  gap: 6px;
  padding: 20px
}

.ov-spinner div {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ov-spinner);
  animation: bounce .5s infinite alternate
}

.ov-spinner div:nth-child(2) {
  animation-delay: .12s
}

.ov-spinner div:nth-child(3) {
  animation-delay: .24s
}

@keyframes bounce {
  to {
    transform: translateY(-8px)
  }
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  margin-top: 20px
}

.page-btn {
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ov-border);
  border-radius: 4px;
  background: var(--ov-bg-body);
  font-size: 13px;
  cursor: pointer;
  color: var(--ov-text)
}

.page-btn.active {
  background: var(--ov-primary);
  color: var(--ov-text-white);
  border-color: var(--ov-primary)
}

.page-btn.disabled {
  opacity: .35;
  cursor: not-allowed
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: var(--ov-overlay-modal);
  display: flex;
  align-items: center;
  justify-content: center
}

.modal-dialog {
  background: var(--ov-bg-body);
  border-radius: 8px;
  box-shadow: 0 6px 16px var(--ov-shadow-sm);
  width: 90%;
  max-width: 380px;
  overflow: hidden
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ov-border);
  font-size: 15px;
  font-weight: 600
}

.modal-body {
  padding: 16px;
  font-size: 14px;
  color: var(--ov-text)
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--ov-border)
}

.backtop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--ov-primary);
  color: var(--ov-text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .2s;
  border: none;
  font-size: 18px
}

.backtop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

/* ========== DARK MODE OVERRIDES (structural only) ========== */
[data-theme="dark"] .ov-nav {
  background: var(--ov-bg-body)
}

[data-theme="dark"] .ov-nav a {
  border-color: var(--ov-border)
}

/* ========== REPORT ========== */
.report-form {
  max-width: 600px
}

.report-field {
  margin-bottom: 16px
}

.report-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ov-text);
  margin-bottom: 6px
}

.report-required {
  color: #ef4444;
  font-weight: 700
}

.report-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background: var(--ov-bg-body);
  color: var(--ov-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box
}

.report-input:focus {
  border-color: var(--ov-primary);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1)
}

.report-input::placeholder {
  color: var(--ov-text-gray)
}

.report-captcha {
  display: flex;
  align-items: center;
  gap: 10px
}

.report-captcha-img {
  flex-shrink: 0
}

.report-captcha-img img {
  height: 40px;
  border-radius: 6px;
  cursor: pointer
}

/* ========== COMMENT ========== */
.comment-textarea {
  width: 100%;
  height: 80px;
  resize: vertical;
  padding: 10px 14px;
  border: 1px solid var(--ov-border);
  border-radius: 8px;
  background: var(--ov-bg-body);
  color: var(--ov-text);
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box
}

.comment-textarea:focus {
  border-color: var(--ov-primary);
  box-shadow: 0 0 0 3px rgba(var(--ov-primary-rgb, 124, 77, 255), 0.1)
}

.comment-textarea::placeholder {
  color: var(--ov-text-gray)
}

.comment-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--ov-border)
}

.comment-item:last-child {
  border-bottom: none
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0
}

.comment-nickname {
  font-size: 14px;
  font-weight: 600;
  color: var(--ov-text)
}

.comment-time {
  font-size: 12px;
  color: var(--ov-text-gray);
  margin-left: auto
}

.comment-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ov-text);
  word-break: break-word;
  padding-left: 42px
}

.comment-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-left: 42px
}

.comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--ov-border);
  border-radius: 14px;
  background: var(--ov-bg-body);
  color: var(--ov-text-gray);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s
}

.comment-btn:hover {
  color: var(--ov-primary);
  border-color: var(--ov-primary)
}

.comment-btn i {
  font-size: 13px
}

.comment-reply-item {
  padding: 10px 0;
  padding-left: 42px;
  border-bottom: 1px dashed var(--ov-border);
  font-size: 13px
}

.comment-reply-item:last-child {
  border-bottom: none
}

@media (max-width: 768px) {
  .comment-textarea {
    height: 64px;
    font-size: 13px
  }

  .comment-body {
    padding-left: 0
  }

  .comment-actions {
    padding-left: 0
  }

  .comment-reply-item {
    padding-left: 24px
  }
}

/* ========== RESPONSIVE ========== */
@media(max-width:1100px) {
  .main-width {
    width: 100%;
    padding: 0 16px
  }

  .ucenter {
    width: 100%;
    padding: 20px 16px
  }
}

@media(max-width:768px) {
  .ov-menu-btn {
    display: flex
  }

  .ov-logo {
    flex-shrink: 1;
    margin-right: 8px;
    font-size: 16px
  }

  .ov-nav {
    position: fixed;
    top: 63px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--ov-bg-body);
    border-bottom: 1px solid var(--ov-border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    z-index: 998;
    padding: 8px 0
  }

  .ov-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible
  }

  .ov-nav a {
    height: auto;
    line-height: normal;
    padding: 14px 20px;
    margin: 0;
    border-bottom: 1px solid var(--ov-border);
    font-size: 16px
  }

  .ov-search {
    gap: 6px
  }

  .ov-slide{margin-top: 0;}

  .ov-slide-inner{height:150px;border-radius:0}

  .genre-box {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch
  }

  .genre-box::-webkit-scrollbar {
    display: none
  }

  .book-box {
    grid-template-columns: repeat(2, 1fr)
  }

  .book-list-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .book-actions {
    flex-wrap: nowrap;
    gap: 4px
  }

  .book-actions .btn {
    flex: 1;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    font-size: 12px;
    white-space: nowrap
  }

  .book-header {
    grid-template-columns: 1fr;
    padding: 16px
  }

  .book-header .author-sidebar {
    display: none
  }

  .book-cover {
    max-width: 150px
  }

  .book-item .book-left p {
    display: none
  }

  .book-item .book-cover-wrap {
    width: 80px;
    height: 106px
  }

  .book-item .book-cover-wrap img {
    width: 80px;
    height: 106px
  }

  .footer {
    padding: 30px 0 20px;
    margin-top: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-nav {
    display: none;
  }

  .footer-help{
    display: none;
  }

  .footer-report {
    display: none;
  }

  .ucenter {
    grid-template-columns: 1fr
  }

  .ucenter-menu {
    flex-direction: row;
    flex-wrap: wrap
  }

  .reader-nav {
    flex-direction: column;
    gap: 6px
  }

  .reader-nav a {
    text-align: center
  }

  body.menu-open {
    overflow: hidden
  }

  .user-dropdown {
    display: none
  }

  .mobile-user-links.active {
    display: block;
    border-top: 1px solid var(--ov-border);
    padding-top: 12px;
    margin: 0 20px 8px
  }

  .mobile-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-size: 15px;
    color: var(--ov-text);
    text-decoration: none
  }

  .mobile-user-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0
  }

  .mobile-user-link:hover {
    color: var(--ov-primary)
  }
}

@media(max-width:480px) {
  .footer {
    padding: 30px 0 20px;
    margin-top: 0;
  }

  .ov-slide-inner{height:130px}
  .ov-slide-dot{width:8px;height:8px}

  .ov-logo {
    font-size: 14px;
    margin-right: 4px
  }

  .book-box {
    grid-template-columns: 1fr
  }

  .book-list-grid {
    grid-template-columns: 1fr
  }

  .book-item .book-cover-wrap {
    width: 70px;
    height: 93px
  }

  .book-item .book-cover-wrap img {
    width: 70px;
    height: 93px
  }

  .book-item .book-left h3 {
    font-size: 14px
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    display: none;
  }

  .footer-help{
    display: none;
  }

  .footer-report {
    display: none;
  }
}

/* ========== AUDIOBOOK PLAYER ========== */
.audiobook-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    background: var(--ov-bg-body);
    border: 1px solid var(--ov-border);
    border-radius: 24px;
    flex-wrap: wrap;
}
.audiobook-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--ov-primary);
    color: #fff;
    white-space: nowrap;
    min-width: 90px;
    position: relative;
}
.audiobook-btn:hover {
    background: var(--ov-primary-hover);
}
.audiobook-btn.paused {
    background: var(--ov-bg-gray);
    color: var(--ov-text);
}
.audiobook-btn.paused:hover {
    background: var(--ov-border);
}
.audiobook-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}
.audiobook-btn i {
    font-size: 16px;
}
.audiobook-btn .btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: audiobook-spin 0.6s linear infinite;
    position: absolute;
}
.audiobook-btn.loading .btn-spinner {
    display: inline-block;
}
.audiobook-btn.loading i,
.audiobook-btn.loading .btn-label {
    visibility: hidden;
}
.audiobook-btn.paused .btn-spinner {
    border-color: rgba(0,0,0,0.15);
    border-top-color: var(--ov-text);
}

@keyframes audiobook-spin {
    to { transform: rotate(360deg); }
}

/* Loading overlay on progress bar */
.audiobook-progress-wrap {
    flex: 1;
    min-width: 80px;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.audiobook-time {
    font-size: 12px;
    color: var(--ov-text-gray);
    min-width: 70px;
    text-align: center;
    white-space: nowrap;
}
.audiobook-progress {
    flex: 1;
    height: 4px;
    background: var(--ov-border);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}
.audiobook-progress-fill {
    height: 100%;
    background: var(--ov-primary);
    border-radius: 2px;
    transition: width 0.1s linear;
    position: relative;
}
.audiobook-progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--ov-primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}
.audiobook-progress:hover .audiobook-progress-fill::after {
    opacity: 1;
}
.audiobook-progress.loading .audiobook-progress-fill {
    background: linear-gradient(90deg, var(--ov-border) 0%, var(--ov-primary) 50%, var(--ov-border) 100%);
    background-size: 200% 100%;
    animation: audiobook-progress-pulse 1.5s ease-in-out infinite;
}
@keyframes audiobook-progress-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Inline settings (voice/speed/pitch) inside the bar */
.audiobook-inline-opt {
    display: flex;
    align-items: center;
    gap: 3px;
    background: var(--ov-bg-gray);
    border-radius: 14px;
    padding: 2px 2px 2px 8px;
    font-size: 12px;
}
.audiobook-inline-opt i {
    font-size: 13px;
    color: var(--ov-text-gray);
}
.audiobook-inline-opt select {
    padding: 4px 4px 4px 2px;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    background: transparent;
    color: var(--ov-text);
    cursor: pointer;
    outline: none;
    max-width: 120px;
}

/* Sentence highlighting */
.reader-content p {
    transition: background 0.3s, color 0.3s, border-radius 0.3s;
    padding: 4px 8px;
    margin-bottom: 0.6em;
    border-radius: 6px;
    cursor: pointer;
}
.reader-content p.speaking {
    background: rgba(0, 195, 169, 0.12);
    border-left: 3px solid var(--ov-primary);
    padding-left: 5px;
}
.reader-content p.spoken {
    opacity: 0.6;
}

[data-theme="dark"] .reader-content p.speaking {
    background: rgba(0, 195, 169, 0.18);
}

/* Error state */
.audiobook-error {
    display: none;
    padding: 8px 14px;
    margin-bottom: 12px;
    background: var(--ov-toast-error-bg);
    color: var(--ov-toast-error-text);
    border-radius: 12px;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 768px) {
    .audiobook-bar {
        gap: 6px;
        padding: 8px 10px;
        border-radius: 16px;
    }
    .audiobook-btn {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 80px;
    }
    .audiobook-progress-wrap {
        max-width: 100%;
        order: 10;
        flex-basis: 100%;
    }
    .audiobook-time {
        font-size: 11px;
        min-width: 60px;
    }
    .audiobook-inline-opt {
        padding: 1px 1px 1px 6px;
    }
    .audiobook-inline-opt select {
        font-size: 11px;
        max-width: 90px;
    }
}