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

body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.search-shell,
.continue-reading-shell {
  margin-bottom: 20px;
}

.mobile-search-toggle,
.continue-reading-toggle {
  display: none;
}

/* 搜索框 */
.search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  max-width: 600px;
}

.search-container input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.search-container input:focus {
  outline: none;
  border-color: #3498db;
}

.search-container select {
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
  background: white;
  color: #2c3e50;
  cursor: pointer;
}

.search-container select:focus {
  outline: none;
  border-color: #3498db;
}

.search-container button {
  padding: 12px 24px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.search-container button:hover {
  background: #2980b9;
}

.no-results {
  text-align: center;
  color: #7f8c8d;
  padding: 40px;
  font-size: 16px;
}

#searchResults h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.novel-desc {
  color: #7f8c8d;
  font-size: 13px;
  margin-top: 5px;
  line-height: 1.4;
}

.chapter-count {
  color: #95a5a6;
  font-size: 12px;
  margin-top: 5px;
}

header {
  background: #2c3e50;
  color: white;
  padding: 20px 0;
  margin-bottom: 30px;
}

header h1 {
  text-align: center;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.nav a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.3s;
}

.nav a:hover {
  background: #34495e;
}

.form-container {
  max-width: 400px;
  margin: 50px auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.btn {
  width: 100%;
  padding: 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.btn:hover {
  background: #2980b9;
}

.novel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.catalog-main {
  min-width: 0;
}

.category-intro {
  display: none;
  background:
    radial-gradient(circle at top right, rgba(201, 155, 103, 0.18), transparent 30%),
    linear-gradient(180deg, #fff8ee, #fffdf8);
  border: 1px solid rgba(91, 66, 41, 0.08);
  border-radius: 22px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 12px 28px rgba(73, 49, 27, 0.06);
}

.category-intro-kicker {
  color: #a46831;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin-bottom: 10px;
}

.category-intro-title {
  color: #2f2014;
  margin-bottom: 10px;
}

.category-intro-copy,
.category-intro-meta {
  color: #73553b;
  line-height: 1.8;
}

.category-intro-meta {
  margin-top: 8px;
  font-size: 14px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.catalog-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.catalog-subtitle {
  color: #7f8c8d;
  font-size: 14px;
}

.catalog-meta {
  color: #3498db;
  font-size: 14px;
  font-weight: 600;
  background: rgba(52, 152, 219, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
}

.category-sidebar {
  position: sticky;
  top: 20px;
}

.category-sidebar-toggle {
  display: none;
}

.category-sidebar-inner {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 18px;
}

.category-sidebar-inner h3 {
  color: #2c3e50;
  margin-bottom: 14px;
  font-size: 18px;
}

.category-current-label {
  color: #7f8c8d;
  font-size: 13px;
  margin-bottom: 14px;
}

.category-link {
  width: 100%;
  border: none;
  background: #f8f9fa;
  color: #2c3e50;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.2s, color 0.2s;
}

.category-link:hover {
  background: #e9ecef;
}

.category-link.active {
  background: #3498db;
  color: white;
  box-shadow: 0 8px 18px rgba(52, 152, 219, 0.24);
  transform: translateX(4px);
}

.member-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.member-sidebar {
  position: sticky;
  top: 20px;
}

.member-sidebar-card {
  background:
    radial-gradient(circle at top right, rgba(214, 172, 122, 0.24), transparent 42%),
    linear-gradient(160deg, #1d2431, #3c2e22 72%, #5f4834);
  color: #f7efe4;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(29, 36, 49, 0.2);
  margin-bottom: 16px;
}

.member-sidebar-kicker,
.member-section-kicker,
.member-hero-eyebrow,
.benefit-badge,
.plan-badge,
.member-summary-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.member-sidebar-card h2 {
  font-size: 28px;
  margin: 10px 0 12px;
}

.member-sidebar-copy {
  color: rgba(247, 239, 228, 0.82);
  line-height: 1.7;
}

.member-sidebar-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.member-sidebar-stat,
.member-account-fact {
  background: rgba(255, 247, 232, 0.08);
  border: 1px solid rgba(255, 239, 220, 0.12);
  border-radius: 16px;
  padding: 14px;
}

.member-sidebar-stat-label,
.member-account-fact span {
  display: block;
  color: rgba(247, 239, 228, 0.68);
  font-size: 12px;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.member-sidebar-stat strong,
.member-account-fact strong {
  display: block;
  color: #fff8ef;
  line-height: 1.5;
}

.member-account-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.member-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  width: 100%;
  border: 1px solid rgba(255, 239, 220, 0.18);
  background: rgba(255, 247, 232, 0.08);
  color: #fff8ef;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.member-mobile-status {
  display: none;
}

.member-sidebar-copy,
.member-sidebar-summary,
.member-account-facts {
  display: none;
}

.member-sidebar.expanded .member-sidebar-copy {
  display: block;
}

.member-sidebar.expanded .member-sidebar-summary {
  display: grid;
}

.member-sidebar.expanded .member-account-facts {
  display: grid;
}

.member-nav {
  background: #fffdf8;
  border: 1px solid rgba(91, 66, 41, 0.08);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 12px 32px rgba(73, 49, 27, 0.08);
}

.member-nav-link {
  width: 100%;
  border: none;
  background: transparent;
  color: #49311b;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.member-nav-link + .member-nav-link {
  margin-top: 8px;
}

.member-nav-link:hover {
  background: rgba(201, 155, 103, 0.12);
}

.member-nav-link.active {
  background: linear-gradient(135deg, #c99b67, #9f7142);
  color: white;
  transform: translateX(4px);
  box-shadow: 0 12px 24px rgba(159, 113, 66, 0.22);
}

.member-main {
  min-width: 0;
}

.member-hero,
.member-panel,
.member-section,
.member-summary-card,
.plan-card,
.benefit-card,
.member-history-item {
  background: #fffdf8;
  border: 1px solid rgba(91, 66, 41, 0.08);
  box-shadow: 0 14px 30px rgba(73, 49, 27, 0.08);
}

.member-hero {
  border-radius: 28px;
  padding: 30px 32px;
  margin-bottom: 20px;
  background:
    radial-gradient(circle at top right, rgba(212, 173, 122, 0.2), transparent 30%),
    linear-gradient(135deg, #fff7e8, #fffdf8 45%, #f8efe0);
}

.member-hero h2 {
  font-size: 34px;
  color: #2f2014;
  margin: 10px 0 12px;
}

.member-hero-copy {
  max-width: 720px;
  color: #73553b;
  line-height: 1.8;
}

.member-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.member-hero-primary,
.member-hero-secondary,
.member-history-action,
.member-panel-link {
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.member-hero-primary,
.member-history-action {
  background: linear-gradient(135deg, #ad7642, #8e5c34);
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  box-shadow: 0 12px 24px rgba(173, 118, 66, 0.22);
}

.member-hero-secondary {
  color: #7b5837;
  background: rgba(201, 155, 103, 0.12);
  padding: 12px 18px;
  border-radius: 999px;
}

.member-section {
  display: none;
  border-radius: 24px;
  padding: 24px;
}

.member-section.active {
  display: block;
}

.member-section-header,
.member-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.member-section-header h3,
.member-panel-header h4 {
  color: #2f2014;
}

.member-panel-link {
  background: transparent;
  color: #a46831;
  font-weight: 600;
}

.member-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.member-summary-card {
  border-radius: 20px;
  padding: 20px;
}

.member-summary-card.accent {
  background: linear-gradient(140deg, #2d231b, #5b4636);
  color: #f8efe3;
}

.member-summary-card h4 {
  font-size: 24px;
  margin: 10px 0 8px;
}

.member-summary-value {
  color: #7b5837;
  line-height: 1.6;
}

.member-summary-card.accent .member-summary-value,
.member-summary-card.accent .member-summary-label {
  color: rgba(248, 239, 227, 0.8);
}

.member-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.member-panel {
  border-radius: 22px;
  padding: 22px;
}

.member-history-list,
.benefit-list,
.membership-plans.enhanced,
.benefit-list.compact {
  display: grid;
  gap: 16px;
}

.member-history-item {
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.member-history-item.compact {
  padding: 16px 18px;
}

.member-history-copy h4 {
  color: #2f2014;
  margin-bottom: 8px;
}

.member-history-copy p {
  color: #7b6653;
  line-height: 1.7;
}

.benefit-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.benefit-list.compact {
  grid-template-columns: 1fr;
}

.benefit-card {
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(180deg, #fffdf8, #faf1e2);
}

.benefit-card h4 {
  color: #2f2014;
  margin: 10px 0 8px;
}

.benefit-card p {
  color: #6f5a47;
  line-height: 1.7;
}

.membership-plans.enhanced {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card {
  border-radius: 22px;
  padding: 24px;
  position: relative;
}

.plan-card.recommended {
  background: linear-gradient(160deg, #fff2de, #fffdf8 48%, #f8e8ce);
  border-color: rgba(173, 118, 66, 0.22);
  transform: translateY(-4px);
}

.plan-badge {
  color: #9d6b3b;
}

.plan-card h3 {
  color: #2f2014;
  margin: 10px 0 12px;
}

.plan-card .price {
  font-size: 36px;
  color: #8e5c34;
  font-weight: 700;
  margin-bottom: 12px;
}

.plan-card p {
  color: #6f5a47;
  line-height: 1.7;
  margin-bottom: 20px;
}

.member-message {
  margin-bottom: 18px;
}

.member-message-card {
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.member-message-card.success {
  background: #edf8f0;
  color: #26633b;
}

.member-message-card.error {
  background: #fff1ef;
  color: #ab3f31;
}

.member-empty {
  color: #7b6653;
  line-height: 1.8;
}

@media (max-width: 1024px) {
  .member-shell,
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .member-sidebar,
  .category-sidebar {
    position: static;
  }

  .member-summary-grid,
  .member-panel-grid,
  .benefit-list,
  .membership-plans.enhanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .member-summary-grid,
  .member-panel-grid,
  .benefit-list,
  .membership-plans.enhanced,
  .novel-list {
    grid-template-columns: 1fr;
  }

  .member-history-item,
  .member-message-card,
  .catalog-header,
  .search-container {
    flex-direction: column;
    align-items: stretch;
  }

  .member-hero {
    padding: 24px 20px;
  }

  .member-hero h2 {
    font-size: 28px;
  }

  .member-sidebar {
    display: grid;
    gap: 12px;
  }

  .member-nav {
    order: 1;
    position: sticky;
    top: 12px;
    z-index: 5;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .member-main {
    display: grid;
    gap: 12px;
  }

  .member-nav-link {
    width: auto;
    flex: 0 0 auto;
    margin-top: 0;
    min-height: 42px;
    padding: 10px 14px;
  }

  .member-nav-link + .member-nav-link {
    margin-top: 0;
  }

  .member-nav-link.active {
    transform: none;
  }

  .member-sidebar-card {
    order: 3;
    padding: 14px 16px;
    margin-bottom: 0;
    border-radius: 18px;
  }

  .member-mobile-status {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fffdf8;
    border: 1px solid rgba(91, 66, 41, 0.08);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 12px 32px rgba(73, 49, 27, 0.08);
  }

  .member-mobile-status-copy {
    min-width: 0;
  }

  .member-mobile-status-copy strong {
    display: block;
    color: #2f2014;
    margin-bottom: 4px;
    font-size: 14px;
  }

  .member-mobile-status-copy span {
    display: block;
    color: #7b6653;
    font-size: 12px;
    line-height: 1.5;
  }

  .member-mobile-status-action {
    flex: 0 0 auto;
    border: none;
    background: rgba(201, 155, 103, 0.12);
    color: #7b5837;
    border-radius: 999px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
  }

  .member-sidebar-card h2 {
    font-size: 18px;
    margin: 6px 0 4px;
  }

  .member-sidebar-copy,
  .member-account-facts {
    display: none;
  }

  .member-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .member-sidebar.expanded .member-sidebar-copy,
  .member-sidebar.expanded .member-account-facts {
    display: grid;
  }

  .member-sidebar.expanded .member-sidebar-copy {
    display: block;
  }

  .member-sidebar-summary {
    grid-template-columns: 1fr 1fr;
    margin-top: 10px;
    gap: 8px;
  }

  .member-summary-grid {
    gap: 12px;
  }

  .member-sidebar-stat,
  .member-account-fact {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .member-sidebar-stat strong,
  .member-account-fact strong {
    font-size: 13px;
  }

  .member-hero {
    display: none;
  }

  .member-section {
    padding: 18px 16px;
    border-radius: 20px;
  }

  body[data-member-section="history"] .member-sidebar-card,
  body[data-member-section="benefits"] .member-sidebar-card,
  body[data-member-section="plans"] .member-sidebar-card {
    display: none;
  }

  .member-section,
  .member-panel,
  .member-history-item,
  .benefit-card,
  .plan-card {
    scroll-margin-top: 76px;
  }
}

.category-count {
  font-size: 12px;
  opacity: 0.85;
}

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

.pagination button {
  border: none;
  background: #3498db;
  color: white;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
}

.pagination button:disabled {
  background: #c8d6e5;
  cursor: not-allowed;
}

.pagination span {
  color: #7f8c8d;
  font-size: 14px;
}

/* 小说卡片 CSS 封面 */
.novel-card {
  background: white;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
  overflow: hidden;
}

.novel-card:hover {
  transform: translateY(-5px);
}

.novel-cover {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: rgba(255,255,255,0.9);
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

.novel-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.novel-card-info {
  padding: 15px;
}

.novel-card-info h3 {
  margin-bottom: 8px;
  color: #2c3e50;
  font-size: 16px;
}

.novel-card-info .author {
  color: #7f8c8d;
  font-size: 13px;
}

.novel-card-info .novel-category {
  color: #3498db;
  font-size: 12px;
  margin-top: 5px;
}

.novel-card-info .novel-desc {
  color: #7f8c8d;
  font-size: 13px;
  margin-top: 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novel-card-info .chapter-count {
  color: #95a5a6;
  font-size: 12px;
  margin-top: 5px;
}

.premium-badge {
  display: inline-block;
  background: #e74c3c;
  color: white;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  margin-left: 10px;
}

.novel-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.membership-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.plan-card {
  background: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.plan-card h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.plan-card .price {
  font-size: 32px;
  color: #e74c3c;
  margin: 20px 0;
}

.error {
  color: #e74c3c;
  margin-top: 10px;
  text-align: center;
}

.success {
  color: #27ae60;
  margin-top: 10px;
  text-align: center;
}

/* 继续阅读区域 */
.continue-reading-section {
  margin-bottom: 40px;
}

.continue-reading-section h2 {
  color: #2c3e50;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

.continue-reading-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.continue-reading-card {
  background: white;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid #3498db;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.continue-reading-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.continue-reading-card h4 {
  margin-bottom: 8px;
  color: #2c3e50;
}

.continue-reading-card .reading-progress {
  color: #3498db;
  font-size: 14px;
  margin-bottom: 5px;
}

/* 小说详情页 */
.novel-header {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.novel-header h2 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.novel-detail-cover-wrap {
  margin-bottom: 18px;
}

.novel-detail-cover {
  width: 140px;
  height: 186px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.novel-detail-cover-fallback {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: rgba(255,255,255,0.92);
  font-size: 56px;
  font-weight: bold;
  align-items: center;
  justify-content: center;
  display: flex;
}

.novel-meta {
  color: #7f8c8d;
  margin-bottom: 15px;
}

.novel-description {
  line-height: 1.6;
  margin-bottom: 20px;
  color: #555;
}

/* 评分区域 */
.rating-section {
  margin: 15px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
}

.rating-display {
  margin-bottom: 10px;
}

.rating-stars {
  color: #f39c12;
  font-size: 20px;
  margin-right: 8px;
}

.rating-score {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  margin-right: 5px;
}

.rating-count {
  color: #7f8c8d;
  font-size: 14px;
}

.user-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

.user-rating .star {
  color: #ddd;
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.user-rating .star:hover,
.user-rating .star.active {
  color: #f39c12;
}

.user-rating span:first-child {
  color: #7f8c8d;
  font-size: 14px;
  margin-right: 5px;
}

.btn-primary {
  padding: 12px 30px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-secondary,
.btn-link {
  padding: 12px 20px;
  background: rgba(52, 152, 219, 0.1);
  color: #2c6da3;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 章节列表 */
.chapter-list-container {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chapter-list-container h3 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.chapter-item:hover {
  background: #e9ecef;
}

.chapter-item.premium {
  background: #fff3cd;
}

.chapter-title {
  font-weight: 500;
  color: #2c3e50;
}

.chapter-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7f8c8d;
  font-size: 14px;
}

.lock-icon {
  font-size: 16px;
}

.free-icon {
  color: #27ae60;
  font-size: 16px;
  font-weight: bold;
}

.novel-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  background:
    radial-gradient(circle at top right, rgba(52, 152, 219, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff, #f8fbff 55%, #eef5fb);
}

.novel-hero-cover {
  min-width: 0;
}

.novel-hero-body {
  min-width: 0;
}

.novel-kicker {
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin-bottom: 10px;
}

.novel-category-link {
  color: #2c6da3;
  text-decoration: none;
  font-weight: 600;
}

.novel-reading-hint {
  background: rgba(52, 152, 219, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 18px 0 18px;
  color: #315d7f;
}

.novel-reading-hint strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 6px;
}

.novel-reading-hint p {
  margin: 0;
  line-height: 1.7;
}

.novel-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.novel-membership-card {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(173, 118, 66, 0.14);
  background:
    radial-gradient(circle at top right, rgba(212, 173, 122, 0.2), transparent 34%),
    linear-gradient(135deg, #fff8eb, #fffdf8 55%, #f7efe2);
  box-shadow: 0 12px 28px rgba(73, 49, 27, 0.08);
}

.novel-membership-kicker {
  color: #8c6a46;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  margin-bottom: 8px;
}

.novel-membership-card h3 {
  color: #2f2014;
  margin-bottom: 10px;
}

.novel-membership-copy {
  color: #73553b;
  line-height: 1.7;
  margin-bottom: 14px;
}

.novel-membership-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.novel-membership-benefit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(201, 155, 103, 0.12);
  color: #7b5837;
  font-size: 14px;
}

.novel-membership-benefit::before {
  content: '•';
  color: #a46831;
}

.novel-membership-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.novel-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.novel-status-card {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(44, 109, 163, 0.1);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.novel-status-card strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 8px;
}

.novel-status-card p {
  margin: 0;
  color: #5e6d79;
  line-height: 1.6;
}

.novel-status-label {
  display: block;
  color: #7f8c8d;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.chapter-list-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.chapter-list-copy {
  color: #7f8c8d;
  max-width: 360px;
  text-align: right;
  line-height: 1.6;
}

.chapter-list-actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chapter-list-panel {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #edf1f5;
}

.chapter-list-progress {
  font-weight: 600;
  color: #5e6d79;
}

.chapter-list-load-more {
  justify-content: flex-start;
  align-items: center;
}

.chapter-collapse-btn {
  padding-inline: 0;
  background: transparent;
}

.novel-recommendations {
  margin-top: 30px;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.recommendation-card {
  background: #f8fbff;
  border: 1px solid rgba(44, 109, 163, 0.08);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recommendation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(44, 109, 163, 0.12);
}

.recommendation-cover-wrap {
  margin-bottom: 12px;
}

.recommendation-cover {
  width: 100%;
  max-width: 120px;
  height: 160px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.recommendation-cover-fallback {
  width: 120px;
  height: 160px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 40px;
  font-weight: bold;
}

.recommendation-body h4 {
  color: #2c3e50;
  margin-bottom: 8px;
}

.recommendation-meta,
.recommendation-foot {
  color: #7f8c8d;
  font-size: 13px;
}

.recommendation-copy {
  color: #5e6d79;
  line-height: 1.7;
  margin: 10px 0 12px;
}

/* 阅读器 */
.reader-container {
  max-width: 800px;
}

.chapter-content {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 80px;
}

.reader-secondary-nav {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: auto;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(44, 62, 80, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 980;
  transition: all 0.3s ease;
}

.reader-secondary-action {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reader-secondary-action:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.reader-secondary-action:active {
  transform: translateY(0) scale(0.98);
}

.chapter-content h2 {
  margin-bottom: 10px;
  color: #2c3e50;
}

.chapter-meta {
  color: #7f8c8d;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.chapter-text {
  line-height: 2;
  font-size: 18px;
  color: #333;
}

.reader-ad-banner {
  margin-top: 36px;
  padding: 24px 20px;
  border-top: 1px solid #edf1f5;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px dashed #adb5bd;
  text-align: center;
  position: relative;
}

.reader-ad-label {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  color: #adb5bd;
  letter-spacing: 0.5px;
}

.reader-ad-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
}

.reader-ad-desc {
  margin: 0 0 16px;
  color: #5e6d79;
  line-height: 1.7;
  font-size: 14px;
}

.reader-ad-contact {
  display: inline-block;
  padding: 9px 24px;
  border-radius: 999px;
  background: #2c3e50;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.reader-ad-contact:hover {
  background: #3d5166;
  transform: translateY(-1px);
}

.reader-membership-prompt {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(52, 152, 219, 0.08);
  color: #315d7f;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.reader-membership-prompt strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 6px;
}

.reader-membership-prompt p {
  margin: 0;
  line-height: 1.7;
}

/* 阅读器导航 */
.reader-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.reader-nav button {
  padding: 10px 20px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.reader-nav button:hover:not(:disabled) {
  background: #2980b9;
}

.reader-nav button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

#progressIndicator {
  color: #7f8c8d;
  font-size: 14px;
}

/* 错误提示框 */
.error-box {
  background: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.error-box h3 {
  color: #e74c3c;
  margin-bottom: 15px;
}

/* 阅读设置按钮 */
.settings-btn {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 50px;
  height: 50px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 999;
}

.settings-btn:hover {
  background: #2980b9;
  transform: scale(1.1);
}

/* 书签按钮 */
.bookmark-btn {
  position: fixed;
  right: 20px;
  bottom: 140px;
  width: 50px;
  height: 50px;
  background: #e67e22;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 999;
}

.bookmark-btn:hover {
  background: #d35400;
  transform: scale(1.1);
}

/* 评论按钮 */
.comment-btn {
  position: fixed;
  right: 20px;
  bottom: 200px;
  width: 50px;
  height: 50px;
  background: #9b59b6;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 999;
}

.comment-btn:hover {
  background: #8e44ad;
  transform: scale(1.1);
}

/* 设置面板 */
.settings-panel {
  position: fixed;
  right: -300px;
  top: 0;
  width: 300px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
  padding: 20px;
  transition: right 0.3s;
  z-index: 1001;
  overflow-y: auto;
}

.settings-panel.active {
  right: 0;
}

.settings-panel h3 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.setting-group {
  margin-bottom: 25px;
}

.setting-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: #2c3e50;
}

.font-size-options {
  display: flex;
  gap: 10px;
}

.font-size-options button {
  flex: 1;
  padding: 8px;
  background: #ecf0f1;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.font-size-options button:hover {
  background: #d5dbdb;
}

.font-size-options button.active {
  background: #3498db;
  color: white;
  border-color: #2980b9;
}

.setting-group input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.close-settings {
  width: 100%;
  padding: 10px;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 20px;
}

.close-settings:hover {
  background: #7f8c8d;
}

/* 阅读器弹层 */
.reader-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reader-modal.active {
  display: flex;
}

.reader-modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.reader-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}

.reader-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #2c3e50;
}

.reader-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #7f8c8d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.reader-modal-close:hover {
  background: #f0f0f0;
}

.reader-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.catalog-chapters {
  display: grid;
  gap: 8px;
}

.catalog-chapter-item {
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.catalog-chapter-item:hover {
  background: #e9ecef;
}

.catalog-chapter-item.active {
  background: #3498db;
  color: #fff;
}

.recommendations-grid {
  display: grid;
  gap: 12px;
}

.recommendation-card-mini {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.recommendation-card-mini:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.recommendation-card-mini h4 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #2c3e50;
}

.rec-meta {
  margin: 0 0 8px;
  font-size: 13px;
  color: #7f8c8d;
}

.rec-desc {
  margin: 0;
  font-size: 14px;
  color: #5e6d79;
  line-height: 1.6;
}

.reader-action-bar {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
}

.reader-action-btn {
  padding: 12px 32px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.reader-action-btn:hover {
  background: #2980b9;
  transform: translateY(-1px);
}

/* 字体大小样式 */
.chapter-text.font-small {
  font-size: 16px;
}

.chapter-text.font-medium {
  font-size: 18px;
}

.chapter-text.font-large {
  font-size: 20px;
}

.chapter-text.font-xlarge {
  font-size: 24px;
}

/* 夜间模式 */
body.night-mode {
  background: #1a1a1a;
  color: #e0e0e0;
}

body.night-mode header {
  background: #2d2d2d;
}

body.night-mode .chapter-content {
  background: #2d2d2d;
  color: #e0e0e0;
}

body.night-mode .chapter-content h2 {
  color: #e0e0e0;
}

body.night-mode .chapter-meta {
  color: #999;
  border-bottom-color: #444;
}

body.night-mode .chapter-text {
  color: #d0d0d0;
}

body.night-mode .reader-nav {
  background: #2d2d2d;
  border-top: 1px solid #444;
}

body.night-mode .novel-membership-card {
  background:
    radial-gradient(circle at top right, rgba(140, 96, 54, 0.24), transparent 34%),
    linear-gradient(135deg, #342a21, #2b241d 55%, #241e18);
  border-color: rgba(212, 173, 122, 0.12);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

body.night-mode .novel-membership-kicker,
body.night-mode .novel-membership-copy {
  color: #d8c3aa;
}

body.night-mode .novel-membership-card h3 {
  color: #fff4e6;
}

body.night-mode .novel-membership-benefit {
  background: rgba(212, 173, 122, 0.14);
  color: #f0ddc7;
}

body.night-mode .reader-secondary-nav {
  background: rgba(31, 41, 51, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.night-mode .reader-secondary-action {
  background: rgba(255, 255, 255, 0.12);
  color: #ecf2f6;
}

body.night-mode .reader-secondary-action:hover {
  background: rgba(255, 255, 255, 0.22);
}

.reader-secondary-nav.reader-controls-hidden {
  opacity: 0;
  transform: translate(-50%, -20px);
  pointer-events: none;
}

.settings-btn.reader-controls-hidden,
.bookmark-btn.reader-controls-hidden,
.comment-btn.reader-controls-hidden {
  opacity: 0;
  transform: translateX(12px);
  pointer-events: none;
}

body.night-mode .reader-membership-prompt {
  background: rgba(73, 127, 170, 0.18);
  color: #d2e6f6;
}

body.night-mode .reader-membership-prompt strong {
  color: #ffffff;
}

body.night-mode .reader-ad-banner {
  background: linear-gradient(135deg, #1f2933 0%, #2a3542 100%);
  border-color: #3d4f5e;
}

body.night-mode .reader-ad-title {
  color: #ecf2f6;
}

body.night-mode .reader-ad-desc {
  color: #8fa8bc;
}

body.night-mode .reader-ad-contact {
  background: #3d5166;
}

body.night-mode .reader-ad-contact:hover {
  background: #4e6880;
}

body.night-mode .reader-ad-label {
  color: #5e7a8e;
}

body.night-mode .reader-exit-copy p {
  color: #c8d3db;
}

body.night-mode .settings-panel {
  background: #2d2d2d;
  color: #e0e0e0;
}

body.night-mode .settings-panel h3 {
  color: #e0e0e0;
}

body.night-mode .reader-modal-content {
  background: #2d2d2d;
  color: #e0e0e0;
}

body.night-mode .reader-modal-header {
  border-bottom-color: #3d3d3d;
}

body.night-mode .reader-modal-header h3 {
  color: #e0e0e0;
}

body.night-mode .catalog-chapter-item,
body.night-mode .recommendation-card-mini {
  background: #3d3d3d;
  color: #e0e0e0;
}

body.night-mode .catalog-chapter-item:hover,
body.night-mode .recommendation-card-mini:hover {
  background: #4d4d4d;
}

body.night-mode .catalog-chapter-item.active {
  background: #2980b9;
}

body.night-mode .recommendation-card-mini h4 {
  color: #e0e0e0;
}

body.night-mode .comment-item {
  background: #3d3d3d;
  border-color: #4d4d4d;
}

body.night-mode .setting-group label {
  color: #e0e0e0;
}

body.night-mode .font-size-options button {
  background: #3a3a3a;
  color: #e0e0e0;
}

body.night-mode .font-size-options button:hover {
  background: #4a4a4a;
}

body.night-mode .font-size-options button.active {
  background: #3498db;
  color: white;
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: #7f8c8d;
  font-size: 16px;
}

.loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* 书签列表 */
.bookmark-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.bookmark-item:hover {
  background: #e9ecef;
}

.bookmark-info {
  flex: 1;
}

.bookmark-note {
  color: #7f8c8d;
  font-size: 14px;
  margin: 5px 0;
}

.delete-btn {
  padding: 5px 12px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}

.delete-btn:hover {
  background: #c0392b;
}

/* 评论区域 */
.comment-input-area {
  margin-bottom: 20px;
}

.comment-input-area textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 10px;
  resize: vertical;
}

.comment-items {
  max-height: 400px;
  overflow-y: auto;
}

.comment-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #7f8c8d;
  font-size: 13px;
}

.comment-content {
  color: #2c3e50;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* 夜间模式下的书签和评论 */
body.night-mode .bookmark-item,
body.night-mode .comment-item {
  background: #3a3a3a;
  color: #e0e0e0;
}

body.night-mode .bookmark-item:hover {
  background: #4a4a4a;
}

body.night-mode .comment-input-area textarea {
  background: #3a3a3a;
  color: #e0e0e0;
  border-color: #555;
}

/* 阅读历史页面 */
.history-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.history-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.history-info {
  flex: 1;
}

.history-info h3 {
  margin-bottom: 8px;
  color: #2c3e50;
}

.progress-text {
  color: #3498db;
  margin: 8px 0;
  font-size: 14px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #ecf0f1;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  transition: width 0.3s;
}

.progress-percent {
  color: #7f8c8d;
  font-size: 13px;
  margin: 5px 0;
}

.last-read {
  color: #95a5a6;
  font-size: 12px;
  margin-top: 5px;
}

.continue-btn {
  padding: 12px 24px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.continue-btn:hover {
  background: #2980b9;
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
  .home-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .home-container .search-shell {
    order: 1;
  }

  .home-container .catalog-layout {
    order: 2;
  }

  .home-container #searchResults {
    order: 3;
  }

  .home-container .continue-reading-shell {
    order: 4;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    position: fixed;
    top: 60px;
    right: 16px;
    z-index: 200;
    width: auto;
  }

  /* 折叠状态：只显示触发按钮 */
  .category-sidebar-inner {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.15);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
  }

  .category-sidebar.open .category-sidebar-inner {
    display: grid;
  }

  /* 触发按钮 */
  .category-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: #2c3e50;
    color: #fff;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    white-space: nowrap;
  }

  .category-sidebar-toggle .toggle-label {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .category-sidebar-inner h3,
  .category-current-label {
    display: none;
  }

  .catalog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .novel-list,
  .continue-reading-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .novel-cover {
    height: 120px;
    font-size: 48px;
  }

  .membership-plans {
    grid-template-columns: 1fr;
  }

  .search-container {
    flex-direction: column;
    max-width: 100%;
  }

  .search-shell,
  .continue-reading-shell {
    margin-bottom: 14px;
  }

  .home-container .catalog-main {
    display: grid;
    gap: 14px;
  }

  .home-container .catalog-header {
    margin-bottom: 0;
  }

  .home-container .category-intro {
    margin-bottom: 0;
  }

  .home-container .pagination {
    margin-top: 10px;
  }

  .mobile-search-toggle,
  .continue-reading-toggle {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border: none;
    background: #fff;
    color: #2c3e50;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    cursor: pointer;
  }

  .mobile-search-toggle {
    display: none;
  }

  .mobile-search-toggle::after,
  .continue-reading-toggle::after {
    content: '展开';
    color: #7f8c8d;
    font-size: 13px;
  }

  .search-shell.expanded .mobile-search-toggle::after,
  .continue-reading-shell.expanded .continue-reading-toggle::after {
    content: '收起';
  }

  .continue-reading-shell #continueReading {
    display: none;
  }

  .continue-reading-shell.expanded #continueReading {
    display: flex;
  }

  .search-shell .search-container {
    display: flex;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.08);
    margin-bottom: 0;
  }

  .continue-reading-shell.expanded #continueReading {
    flex-direction: column;
  }

  .category-sidebar-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    overflow: hidden;
  }

  .category-sidebar-inner h3,
  .category-current-label {
    display: none;
  }

  .category-link {
    width: 100%;
    margin-bottom: 0;
    min-height: 42px;
    min-width: 0;
    padding: 10px 12px;
  }

  .category-link.active {
    transform: none;
  }

  .category-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .novel-list,
  .continue-reading-list {
    grid-template-columns: 1fr;
  }

  .novel-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .novel-cover {
    height: 100%;
    min-height: 132px;
    font-size: 38px;
  }

  .novel-card-info {
    padding: 12px;
    min-width: 0;
  }

  .novel-card-info h3 {
    font-size: 15px;
    line-height: 1.4;
  }

  .novel-card-info .novel-desc {
    -webkit-line-clamp: 3;
  }

  .nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav a {
    padding: 10px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .settings-btn,
  .bookmark-btn,
  .comment-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .bookmark-btn {
    bottom: 138px;
  }

  .comment-btn {
    bottom: 196px;
  }

  .settings-panel {
    width: 100%;
    right: -100%;
  }

  .reader-modal-content {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }

  .reader-modal {
    padding: 0;
    align-items: flex-end;
  }

  .history-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .novel-hero {
    grid-template-columns: 1fr;
  }

  .novel-detail-cover,
  .recommendation-cover,
  .recommendation-cover-fallback {
    max-width: none;
  }

  .novel-status-grid,
  .recommendation-grid {
    grid-template-columns: 1fr;
  }

  .chapter-list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chapter-list-copy {
    text-align: left;
    max-width: none;
  }

  .continue-btn {
    width: 100%;
    text-align: center;
    min-height: 44px;
  }

  .chapter-content {
    padding: 20px 16px;
  }

  .reader-secondary-nav {
    top: 8px;
    padding: 6px 10px;
    gap: 12px;
  }

  .reader-secondary-action {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 18px;
    min-width: 48px;
    min-height: 44px;
  }

  .chapter-text {
    line-height: 2.2;
  }

  .container {
    padding: 15px;
  }

  .reader-nav button {
    min-height: 44px;
    min-width: 80px;
    padding: 10px 16px;
    font-size: 15px;
  }

  .chapter-item {
    padding: 14px 15px;
    min-height: 48px;
  }

  .font-size-options button {
    min-height: 44px;
  }
}

/* 响应式设计 - 手机 */
@media (max-width: 480px) {
  .home-container {
    gap: 10px;
  }

  header h1 {
    font-size: 1.2em;
  }

  .novel-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .novel-cover {
    min-height: 124px;
    font-size: 34px;
  }

  .novel-card-info {
    padding: 10px;
  }

  .novel-card-info h3 {
    font-size: 14px;
  }

  .member-hero {
    display: none;
  }

  .member-sidebar-summary {
    grid-template-columns: 1fr;
  }

  .member-nav {
    top: 8px;
    gap: 8px;
  }

  .member-nav-link {
    padding: 10px 12px;
    font-size: 14px;
  }

  .member-sidebar-card {
    padding: 12px;
  }

  .category-sidebar-inner {
    padding: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-shell .search-container {
    padding: 10px;
    border-radius: 14px;
  }

  .member-mobile-status {
    padding: 10px 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .member-mobile-status-action {
    width: 100%;
    justify-content: center;
    display: inline-flex;
  }

  .novel-header,
  .chapter-list-container {
    padding: 20px 16px;
  }

  .novel-hero-actions,
  .chapter-list-actions {
    flex-direction: column;
  }

  .novel-membership-benefits,
  .novel-membership-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-link {
    width: 100%;
  }

  .chapter-text {
    font-size: 17px;
    line-height: 2.2;
  }

  .chapter-text.font-large {
    font-size: 19px;
  }

  .chapter-text.font-xlarge {
    font-size: 21px;
  }

  .form-container {
    margin: 20px 10px;
    padding: 20px;
  }

  .plan-card {
    padding: 20px;
  }

  .novel-header {
    padding: 20px;
  }

  .chapter-content {
    padding: 15px 12px;
  }

  .reader-nav {
    padding: 10px 12px;
  }

  .reader-nav button {
    padding: 10px 14px;
    font-size: 14px;
  }

  .reader-secondary-nav {
    top: 8px;
    padding: 6px 8px;
    gap: 10px;
  }

  .reader-secondary-action {
    padding: 10px 14px;
    font-size: 17px;
    min-width: 46px;
    min-height: 44px;
  }

  .continue-reading-list {
    grid-template-columns: 1fr;
  }
}

/* ============ 页面标题 ============ */
.page-header {
  margin-bottom: 30px;
}

.page-header h2 {
  font-size: 24px;
  color: #2c3e50;
  margin-bottom: 6px;
}

.page-header-desc {
  color: #7f8c8d;
  font-size: 15px;
}

/* ============ 分类浏览页 ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.category-card-icon {
  font-size: 36px;
  line-height: 1;
}

.category-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.category-card-count {
  font-size: 13px;
  color: #95a5a6;
}

/* ============ 榜单页 ============ */
.ranking-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ranking-tabs {
  display: flex;
  gap: 4px;
  background: #eef2f7;
  border-radius: 8px;
  padding: 4px;
}

.ranking-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  color: #555;
  transition: background 0.2s, color 0.2s;
}

.ranking-tab:hover {
  color: #2c3e50;
}

.ranking-tab.active {
  background: white;
  color: #2c3e50;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.ranking-filter select {
  padding: 8px 14px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #2c3e50;
  cursor: pointer;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ranking-item:hover {
  transform: translateX(4px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.ranking-rank {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #7f8c8d;
  background: #f0f0f0;
}

.ranking-rank.rank-top {
  color: white;
}

.ranking-rank.rank-1 {
  background: linear-gradient(135deg, #f6d365, #f5a623);
}

.ranking-rank.rank-2 {
  background: linear-gradient(135deg, #a8c0d6, #8fa8be);
}

.ranking-rank.rank-3 {
  background: linear-gradient(135deg, #d4a373, #c2855a);
}

.ranking-cover {
  flex-shrink: 0;
  width: 56px;
  height: 72px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  overflow: hidden;
}

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

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

.ranking-info h3 {
  font-size: 16px;
  color: #2c3e50;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-info .author {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 4px;
}

.ranking-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #95a5a6;
}

.ranking-category {
  background: #eef2f7;
  padding: 2px 8px;
  border-radius: 4px;
  color: #5a7ea6;
}

@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .category-card {
    padding: 18px 12px;
  }

  .ranking-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .ranking-tabs {
    overflow-x: auto;
  }

  .ranking-cover {
    width: 44px;
    height: 56px;
  }
}
