/*
Theme Name: EroticNovel
Theme URI: https://eroticnovel.org
Description: A premium from-scratch WordPress theme for erotic novels, taboo stories, cultivation erotica, and forbidden desire manga. Built around Custom Post Types for Series and Chapters with Genre taxonomy. Designed for adult content platforms that need scalability, beautiful dark UI, and full creative control.
Author: Your Name
Version: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eroticnovel
*/

/* Minimal base styles - Tailwind handles 95% of the design */
:root {
  --accent: #9f1239;
  --accent-dark: #be123c;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Floating back-to-top (bottom left) */
.scroll-to-top {
  position: fixed;
  left: 1rem;
  bottom: 1.25rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  box-shadow: 0 10px 25px -10px rgb(0 0 0 / 0.55);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease,
              background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top[hidden] {
  display: inline-flex !important;
}

.scroll-to-top:not(.is-visible) {
  pointer-events: none;
}

.scroll-to-top:hover {
  background: #9f1239;
  border-color: #be123c;
  color: #fff;
}

.scroll-to-top:focus-visible {
  outline: 2px solid #fda4af;
  outline-offset: 2px;
}

.scroll-to-top__icon {
  width: 1.25rem;
  height: 1.25rem;
}

@media (min-width: 768px) {
  .scroll-to-top {
    left: 1.5rem;
    bottom: 1.5rem;
    width: 3rem;
    height: 3rem;
  }

  .scroll-to-top__icon {
    width: 1.35rem;
    height: 1.35rem;
  }
}

/* Site branding (Customizer → Site Identity) */
.site-logo-image {
  height: 2.25rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.group:hover .site-logo-image {
  transform: scale(1.05);
}

@media (min-width: 640px) {
  .site-logo-image {
    height: 2.5rem;
    max-width: 12rem;
  }
}

/* Chapter content styling for novel text */
.chapter-content {
  font-size: 1.05rem;
  line-height: 1.85;
  max-width: 72ch;
  margin: 0 auto;
}

.chapter-content p {
  margin-bottom: 1.25em;
}

/* Series card hover effect */
.series-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.series-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Chapter list item */
.chapter-item {
  transition: background-color 0.1s ease;
}

.chapter-item:hover {
  background-color: #1f2937;
}

.chapter-number-search {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.chapter-number-search__input {
  width: 7.5rem;
  height: 3rem;
  padding: 0 0.9rem;
  border-radius: 1rem;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chapter-number-search__input::placeholder {
  color: #64748b;
}

.chapter-number-search__input:focus {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
}

.chapter-number-search__btn {
  height: 3rem;
  padding: 0 1.25rem;
  border-radius: 1rem;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chapter-number-search__btn:hover {
  background: #334155;
  border-color: #475569;
}

.chapter-number-search__error {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.75rem;
  color: #fda4af;
}

.chapter-number-search__error[hidden] {
  display: none !important;
}

.chapter-list-body--scrollable {
  max-height: 37rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #475569 transparent;
}

.chapter-list-body--scrollable::-webkit-scrollbar {
  width: 8px;
}

.chapter-list-body--scrollable::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 9999px;
}

.chapter-list-body--scrollable::-webkit-scrollbar-track {
  background: transparent;
}

/* Reader navigation */
.reader-nav a {
  transition: all 0.2s ease;
}

.reader-nav a:hover {
  background-color: #374151;
  transform: translateY(-1px);
}

/* Genre tag */
.genre-tag {
  font-size: 0.75rem;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  background-color: #374151;
  color: #d1d5db;
  transition: background-color 0.2s;
}

.genre-tag:hover {
  background-color: #4b5563;
}

/* Status badges */
.status-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.status-ongoing { background-color: #166534; color: #86efac; }
.status-completed { background-color: #1e40af; color: #93c5fd; }
.status-hiatus { background-color: #854d0e; color: #fcd34d; }

/* ========================================
   HERO CAROUSEL - AsuraScans style sliding posters
   Center = bigger + sharp & clean (full cover)
   Blurred active cover = large background (no box)
======================================== */
.hero-section {
  isolation: isolate;
  min-height: 22rem;
}

.hero-carousel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-carousel-bg__image {
  position: absolute;
  inset: -35%;
  width: 170%;
  height: 170%;
  object-fit: cover;
  object-position: center center;
  filter: blur(48px) brightness(0.5) saturate(1.2);
  transform: scale(1.2);
  opacity: 0;
  transition: opacity 0.9s ease;
  will-change: opacity;
}

.hero-carousel-bg__image.is-active {
  opacity: 1;
}

.hero-carousel-bg__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(2, 6, 23, 0.45) 55%, rgba(2, 6, 23, 0.82) 100%),
    radial-gradient(ellipse at center 40%, rgba(2, 6, 23, 0.05) 0%, rgba(2, 6, 23, 0.55) 78%);
}

.hero-carousel-wrap {
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.hero-swiper {
  overflow: hidden !important;
  padding: 20px 0 36px;
  max-width: 100%;
}

.hero-swiper .swiper-slide,
.hero-swiper .hero-slide {
  width: 9.5rem;
  height: auto;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.45s ease,
              opacity 0.45s ease;
  transform-origin: center center;
  will-change: transform, filter;
}

@media (min-width: 640px) {
  .hero-swiper .swiper-slide,
  .hero-swiper .hero-slide {
    width: 11.5rem;
  }
}

@media (min-width: 768px) {
  .hero-swiper .swiper-slide,
  .hero-swiper .hero-slide {
    width: 13.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-swiper .swiper-slide,
  .hero-swiper .hero-slide {
    width: 15rem;
  }
}

.hero-slide-card {
  position: relative;
  display: block;
}

.hero-slide-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  border-radius: 0.85rem;
  box-shadow: 0 20px 40px -12px rgb(0 0 0 / 0.55);
  transition: box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide-rating {
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 0.35rem;
  display: flex;
  justify-content: center;
  padding: 0.3rem 0.45rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.hero-slide-rating__stars {
  gap: 0.25rem;
}

.hero-slide-rating__stars .star-rating__average {
  color: #fff;
  font-size: 0.7rem;
}

.hero-slide-rating__stars .star-rating__count {
  color: #cbd5e1;
  font-size: 0.65rem;
}

/* === CENTER / ACTIVE SLIDE (full sharp cover) === */
.hero-swiper .swiper-slide-active {
  transform: scale(1.12) !important;
  z-index: 30;
  filter: blur(0px) !important;
  opacity: 1 !important;
}

.hero-swiper .swiper-slide-active .hero-slide-image {
  box-shadow: 0 36px 70px -16px rgb(0 0 0 / 0.78);
  border-radius: 1rem;
}

/* === ALL OTHER SLIDES (blurred + smaller) === */
.hero-swiper .swiper-slide:not(.swiper-slide-active) {
  transform: scale(0.88) !important;
  filter: blur(2px) !important;
  opacity: 0.65 !important;
  z-index: 1;
}

/* Make immediate left/right neighbors slightly clearer */
.hero-swiper .swiper-slide-prev,
.hero-swiper .swiper-slide-next {
  opacity: 0.8 !important;
  filter: blur(1px) !important;
  transform: scale(0.94) !important;
}

/* Mobile: contain carousel & scroll sections within viewport */
@media (max-width: 767px) {
  .hero-section {
    min-height: 18rem;
  }

  .hero-swiper {
    padding: 12px 0 24px;
  }

  .hero-carousel-bg__image {
    filter: blur(40px) brightness(0.48) saturate(1.15);
  }

  .hero-swiper .swiper-slide-active {
    transform: scale(1.08) !important;
  }

  .hero-swiper .swiper-slide:not(.swiper-slide-active) {
    transform: scale(0.92) !important;
    filter: blur(1px) !important;
    opacity: 0.7 !important;
  }

  .hero-swiper .swiper-slide-prev,
  .hero-swiper .swiper-slide-next {
    opacity: 0.85 !important;
    filter: blur(0.5px) !important;
    transform: scale(0.96) !important;
  }

  .hero-slide-image {
    box-shadow: 0 12px 24px -8px rgb(0 0 0 / 0.45);
  }

  .latest-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 1rem;
  }
}

/* Desktop: allow carousel peek effect */
@media (min-width: 768px) {
  .hero-section {
    min-height: 26rem;
  }

  .hero-swiper {
    overflow: visible !important;
  }
}

/* Legal / informational pages */
.legal-document {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 1.5rem;
  padding: 1.75rem 1.5rem;
}

@media (min-width: 768px) {
  .legal-document {
    padding: 2.5rem 2.75rem;
  }
}

.legal-document__header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}

.legal-document__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fafc;
  margin: 0;
}

.legal-document__meta {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.legal-document__body h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #f1f5f9;
}

.legal-document__body p,
.legal-document__body li {
  color: #cbd5e1;
  line-height: 1.75;
}

.legal-document__body ul {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}

.legal-document__body li {
  margin-bottom: 0.35rem;
}

.legal-document__body strong {
  color: #fecdd3;
}

/* Homepage — exclusive collection CTA */
.home-exclusive-cta__inner {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(159, 18, 57, 0.35);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 17, 34, 0.92) 48%, rgba(15, 23, 42, 0.95) 100%);
  padding: 1.75rem 1.5rem;
}

@media (min-width: 768px) {
  .home-exclusive-cta__inner {
    padding: 2.25rem 2.5rem;
  }
}

.home-exclusive-cta__glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 18rem;
  height: 18rem;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(190, 18, 60, 0.28) 0%, rgba(190, 18, 60, 0) 70%);
  pointer-events: none;
}

.home-exclusive-cta__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}

.home-exclusive-cta__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  margin-bottom: 0.85rem;
  border-radius: 9999px;
  background: rgba(159, 18, 57, 0.22);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fda4af;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-exclusive-cta__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #f8fafc;
}

.home-exclusive-cta__price {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 600;
  color: #fecdd3;
}

.home-exclusive-cta__subtitle {
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.home-exclusive-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.home-exclusive-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.5rem;
  padding: 0.8rem 1.35rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-exclusive-cta__btn:hover {
  transform: translateY(-1px);
}

.home-exclusive-cta__btn--secondary {
  border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
}

.home-exclusive-cta__btn--secondary:hover {
  background: #1e293b;
  border-color: #64748b;
  color: #fff;
}

.home-exclusive-cta__btn--primary {
  border: 1px solid #9f1239;
  background: #9f1239;
  color: #fff;
}

.home-exclusive-cta__btn--primary:hover {
  background: #be123c;
  border-color: #be123c;
}

/* Responsive chapter list */
@media (max-width: 640px) {
  .chapter-list {
    grid-template-columns: 1fr;
  }
}

/* Hide scrollbar for horizontal scroll areas (Latest Updates etc.) */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Login / Register Forms */
#eroticnovel-login-form input[type="text"],
#eroticnovel-login-form input[type="password"] {
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 9999px;
    padding: 14px 20px;
    width: 100%;
    color: white;
}

#eroticnovel-login-form input[type="submit"] {
    background-color: white;
    color: #0f172a;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 9999px;
    width: 100%;
    margin-top: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#eroticnovel-login-form input[type="submit"]:hover {
    background-color: #f1f5f9;
}

/* Star ratings */
.star-rating {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.star-rating__stars {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.star-rating__star {
  color: #475569;
  line-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.star-rating--interactive .star-rating__star {
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.star-rating--interactive .star-rating__star:hover,
.star-rating--interactive .star-rating__star.is-filled,
.star-rating--interactive .star-rating__star.is-preview {
  color: #fbbf24;
  transform: scale(1.05);
}

.star-rating__star.is-filled,
.star-rating__star.is-half {
  color: #fbbf24;
}

.star-rating--xs .star-rating__star svg {
  width: 0.7rem;
  height: 0.7rem;
}

.star-rating--sm .star-rating__star svg {
  width: 0.9rem;
  height: 0.9rem;
}

.star-rating--md .star-rating__star svg {
  width: 1.15rem;
  height: 1.15rem;
}

.star-rating__meta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.star-rating.text-white .star-rating__meta,
.star-rating.text-white .star-rating__empty {
  color: #e2e8f0;
}

.star-rating__average {
  font-weight: 600;
  color: #f8fafc;
}

.star-rating__count {
  color: #cbd5e1;
}

.star-rating__empty {
  font-size: 0.75rem;
  color: #94a3b8;
}

.series-rating-summary .star-rating__average {
  color: #f8fafc;
}

/* Single series — full cover, no crop */
.series-cover-wrap {
  display: inline-block;
  width: 100%;
  line-height: 0;
}

.series-cover-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center top;
}

/* Bookmark button */
.series-bookmark-btn.is-bookmarked {
  background: rgba(159, 18, 57, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.series-bookmark-btn.is-bookmarked .bookmark-icon-outline {
  display: none;
}

.series-bookmark-btn.is-bookmarked .bookmark-icon-filled,
.series-bookmark-btn:not(.is-bookmarked) .bookmark-icon-outline {
  display: block;
}

.series-bookmark-btn:not(.is-bookmarked) .bookmark-icon-filled {
  display: none;
}

.series-bookmark-btn.is-loading,
.star-rating.is-loading,
.chapter-votes.is-loading,
.comment-reactions.is-loading,
.chapter-reactions.is-loading,
.series-reactions.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Membership — payment logos */
.membership-patreon-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #ff424d;
  color: #fff;
  flex-shrink: 0;
}

.membership-patreon-logo .fa-patreon {
  font-size: 1.25rem;
  line-height: 1;
}

.membership-usdt-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #009393;
  flex-shrink: 0;
  padding: 0.35rem;
}

.membership-usdt-logo img {
  display: block;
  width: 1.35rem;
  height: auto;
  filter: brightness(0) invert(1);
}

.payment-logos__label {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.payment-logos__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.payment-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  height: 2rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.payment-logo .fa-brands {
  font-size: 1.65rem;
  line-height: 1;
}

.payment-logo--visa {
  min-width: 3.75rem;
}

.payment-logo--visa .fa-cc-visa {
  color: #1a1f71;
}

.payment-logo--mastercard {
  min-width: 3.75rem;
}

.payment-logo--mastercard .fa-cc-mastercard {
  color: #eb001b;
}

.payment-logo--amex {
  background: #016fd0;
  border-color: #016fd0;
  min-width: 3.75rem;
}

.payment-logo--amex .fa-cc-amex {
  color: #fff;
}

.payment-logo--paypal {
  min-width: 3.75rem;
}

.payment-logo--paypal .fa-cc-paypal {
  color: #003087;
}

.payment-logo--gpay {
  min-width: 4.25rem;
}

.payment-logo--gpay .fa-google-pay {
  color: #5f6368;
  font-size: 1.85rem;
}

.payment-logo--applepay {
  min-width: 4.25rem;
}

.payment-logo--applepay .fa-apple-pay {
  color: #111827;
  font-size: 1.85rem;
}

.membership-price-hero {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem 0.65rem;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  background: rgba(159, 18, 57, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.32);
}

.membership-price-hero__amount {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fecdd3;
  line-height: 1;
}

.membership-price-hero__period {
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
}

.membership-card-price {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fecdd3;
  line-height: 1.1;
}

.membership-card-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
}

.membership-usdt-amount {
  text-align: center;
}

.membership-benefits {
  color: #cbd5e1;
}

/* Account — free member upsell */
.account-free-member {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.45) 100%);
}

.account-notice {
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  font-size: 0.875rem;
}

.account-notice--success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.account-notice--error {
  background: rgba(159, 18, 57, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}

.account-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
}

.account-profile__preview {
  flex: 0 0 auto;
}

.account-profile__avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #334155;
  box-shadow: 0 10px 25px -12px rgb(0 0 0 / 0.55);
}

.account-profile__actions {
  flex: 1 1 14rem;
  min-width: 0;
}

.account-profile__upload-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.account-profile__file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.account-profile__file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.65rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid #475569;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.account-profile__file-label:hover {
  background: #334155;
  border-color: #64748b;
}

.account-profile__hint {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.account-profile__submit,
.account-profile__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.7rem 1.1rem;
  border-radius: 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.account-profile__submit {
  border: 1px solid #9f1239;
  background: #9f1239;
  color: #fff;
}

.account-profile__submit:hover {
  background: #be123c;
  border-color: #be123c;
}

.account-profile__remove-form {
  margin-top: 0.75rem;
}

.account-profile__remove {
  border: 1px solid #475569;
  background: transparent;
  color: #cbd5e1;
}

.account-profile__remove:hover {
  background: #1e293b;
  border-color: #64748b;
  color: #fff;
}

/* Premium access badges */
.chapter-access-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chapter-access-badge--premium {
  background: rgba(159, 18, 57, 0.2);
  border: 1px solid rgba(159, 18, 57, 0.4);
  color: #fda4af;
}

.chapter-paywall {
  margin-bottom: 1.5rem;
}

.chapter-paywall__icon {
  color: #fda4af;
}

/* Chapter like / dislike */
.chapter-votes {
  padding: 0.5rem 0;
}

.chapter-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chapter-vote-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.chapter-vote-btn:hover {
  background: #1e293b;
  color: #fff;
}

.chapter-vote-btn--like.is-active {
  background: rgba(22, 101, 52, 0.25);
  border-color: #166534;
  color: #86efac;
}

.chapter-vote-btn--dislike.is-active {
  background: rgba(127, 29, 29, 0.25);
  border-color: #991b1b;
  color: #fca5a5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Chapter reactions (above comments) */
.chapter-reactions-panel {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 1.5rem;
}

@media (min-width: 768px) {
  .chapter-reactions-panel {
    padding: 2rem;
  }
}

.chapter-reactions-panel__header {
  margin-bottom: 1.25rem;
  text-align: center;
}

.chapter-reactions-panel__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.chapter-reactions-panel__subtitle {
  margin: 0.4rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.chapter-reactions,
.series-reactions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.chapter-reaction-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 4.75rem;
  padding: 0.65rem 0.55rem 0.5rem;
  border-radius: 1rem;
  border: 1px solid #334155;
  background: #1e293b;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chapter-reaction-btn:hover {
  background: #334155;
  border-color: #475569;
  transform: translateY(-2px);
}

.chapter-reaction-btn.is-active {
  background: rgba(159, 18, 57, 0.2);
  border-color: #9f1239;
  box-shadow: 0 0 0 2px rgba(159, 18, 57, 0.15);
}

.chapter-reaction-btn__emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.chapter-reaction-btn__label {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: #94a3b8;
}

.chapter-reaction-btn.is-active .chapter-reaction-btn__label {
  color: #fda4af;
}

.chapter-reaction-btn__count {
  display: none;
  font-size: 0.625rem;
  font-weight: 700;
  color: #64748b;
}

.chapter-reaction-btn.has-count .chapter-reaction-btn__count {
  display: inline;
}

.chapter-reaction-btn.is-active .chapter-reaction-btn__count {
  color: #fda4af;
}

/* Comments */
.comments-section {
  margin-bottom: 3rem;
}

.comments-area {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 1.5rem;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .comments-area {
    padding: 2rem;
  }
}

.comments-area__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #1e293b;
}

.comments-area__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0;
}

.comments-area__subtitle,
.comments-area__empty,
.comments-area__closed {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.comment-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.comment-list .children {
  list-style: none;
  margin: 0.75rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid #334155;
}

.comment-item {
  margin: 0 0 1rem;
}

.comment-body {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 1rem;
  padding: 1rem 1.125rem;
}

.comment-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-avatar__wrap {
  position: relative;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
}

.comment-avatar__image {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 2px solid #334155;
  display: block;
}

.comment-avatar__wrap.is-premium .comment-avatar__image {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.comment-avatar__badge {
  position: absolute;
  right: -0.2rem;
  bottom: -0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  border: 2px solid #1e293b;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.comment-avatar__badge-icon {
  width: 0.625rem;
  height: 0.625rem;
}

.comment-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: #f8fafc;
  font-size: 0.9375rem;
}

.comment-author__premium {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fcd34d;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comment-author a {
  color: inherit;
  text-decoration: none;
}

.comment-metadata {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.comment-metadata a {
  color: inherit;
  text-decoration: none;
}

.comment-metadata a:hover,
.comment-author a:hover {
  color: #fda4af;
}

.comment-edit {
  margin-left: 0.5rem;
}

.comment-awaiting-moderation {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(159, 18, 57, 0.15);
  border: 1px solid rgba(159, 18, 57, 0.35);
  color: #fda4af;
  font-size: 0.8125rem;
}

.comment-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.comment-content p {
  margin: 0 0 0.75rem;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

/* Comment emoji reactions */
.comment-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid #334155;
}

.comment-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.8125rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-reaction-btn:hover {
  background: #334155;
  border-color: #475569;
  transform: translateY(-1px);
}

.comment-reaction-btn.is-active {
  background: rgba(159, 18, 57, 0.2);
  border-color: #9f1239;
  box-shadow: 0 0 0 2px rgba(159, 18, 57, 0.15);
}

.comment-reaction-btn__emoji {
  font-size: 1rem;
  line-height: 1;
}

.comment-reaction-btn__count {
  display: none;
  min-width: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #94a3b8;
}

.comment-reaction-btn.has-count .comment-reaction-btn__count {
  display: inline;
}

.comment-reaction-btn.is-active .comment-reaction-btn__count {
  color: #fda4af;
}

.comment-reply {
  margin-top: 0.75rem;
}

.comment-reply a,
.comment-reply-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fda4af;
  text-decoration: none;
}

.comment-reply a:hover,
.comment-reply-link:hover {
  color: #fff;
}

.comment-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
}

.comment-navigation a {
  color: #94a3b8;
  text-decoration: none;
}

.comment-navigation a:hover {
  color: #fff;
}

.comments-area__form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
}

.comments-login-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px dashed #334155;
  background: #1e293b;
}

.comments-login-prompt__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: rgba(159, 18, 57, 0.2);
  color: #fda4af;
}

.comments-login-prompt__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #f8fafc;
}

.comments-login-prompt__text {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.comments-login-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.comments-login-prompt__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid #334155;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.comments-login-prompt__btn:hover {
  background: #334155;
  color: #fff;
}

.comments-login-prompt__btn--primary {
  background: #fff;
  border-color: #fff;
  color: #0f172a;
}

.comments-login-prompt__btn--primary:hover {
  background: #e2e8f0;
  border-color: #e2e8f0;
  color: #0f172a;
}

.comment-form--theme .comment-form-title,
.comment-respond .comment-reply-title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #f8fafc;
}

.comment-form-error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.95rem;
  border-radius: 0.75rem;
  background: rgba(159, 18, 57, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fecdd3;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.comment-form-error[hidden] {
  display: none !important;
}

.comment-form--theme .logged-in-as {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.comment-form--theme .logged-in-as__name {
  color: #e2e8f0;
  font-weight: 600;
}

.comment-form--theme .logged-in-as__logout {
  color: #fda4af;
  text-decoration: none;
}

.comment-form--theme .logged-in-as__logout:hover {
  color: #fff;
}

.comment-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
}

.comment-form-textarea {
  width: 100%;
  min-height: 7rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.9375rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form-textarea::placeholder {
  color: #64748b;
}

.comment-form-textarea:focus {
  border-color: #9f1239;
  box-shadow: 0 0 0 3px rgba(159, 18, 57, 0.2);
}

.comment-form--theme .form-submit {
  margin: 1rem 0 0;
}

.comment-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 9999px;
  background: #9f1239;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.comment-submit-btn:hover {
  background: #be123c;
}

.comment-submit-btn:active {
  transform: scale(0.98);
}

#cancel-comment-reply-link {
  margin-left: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
}

#cancel-comment-reply-link:hover {
  color: #fff;
}
