/* NovelAnea - Modern Webnovel Platform CSS System */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --border-color: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --gold: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* User Initial Avatar Badge */
.avatar-initial-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  user-select: none;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.avatar-initial-circle-lg {
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}

/* Navbar */
.navbar-custom {
  background-color: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
}

.brand-logo {
  font-size: 1.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.brand-logo span {
  background: linear-gradient(135deg, #9b87f5 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(155, 135, 245, 0.35));
  transition: transform 0.25s ease;
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.06);
}

/* Hero Carousel Section */
.hero-banner {
  background: linear-gradient(135deg, rgba(30,41,59,0.9), rgba(15,23,42,0.95)), url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=1200&q=80');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-main);
  border: 1px solid var(--border-color);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-synopsis {
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Novel Cards Grid */
.novel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.novel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.novel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-primary);
}

.novel-cover-wrapper {
  position: relative;
  width: 100%;
  padding-top: 140%; /* 1:1.4 aspect ratio for book covers */
  overflow: hidden;
  background: #0f172a;
}

.novel-cover-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.novel-card:hover .novel-cover-img {
  transform: scale(1.05);
}

/* Default cover card inside fixed-ratio wrapper */
.novel-cover-wrapper .novel-default-cover-card {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: unset !important;
  min-height: unset !important;
  border-radius: 0 !important;
  border: none !important;
}

.novel-card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.novel-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.novel-card-author {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.badge-genre {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

/* Green Publication Genre Pill (Image 2 style) */
.badge-publication-genre {
  background-color: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
}

/* Dark Tag Pill (Image 2 style) */
.badge-publication-tag {
  background-color: #0f172a;
  color: #cbd5e1;
  border: 1px solid #1e293b;
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
  transition: all 0.2s ease;
}

.badge-publication-tag:hover {
  background-color: #1e293b;
  color: #ffffff;
}

/* Publication Info Rounded Box (Matching Image 2 style) */
.pub-info-box {
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  margin-bottom: 0.65rem;
}

.pub-info-label {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 140px;
}

.pub-info-value {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
}

.rating-stars {
  color: var(--gold);
  font-size: 0.85rem;
}

/* Detail Page Header */
.novel-detail-header {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid #1e293b !important;
  margin-bottom: 2rem;
  display: flex;
  gap: 2rem;
  box-shadow: var(--shadow-main);
}

.novel-detail-cover {
  width: 220px;
  height: 310px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.novel-detail-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

/* Filter Pill Buttons Styling (Catalog Style) */
.filter-pill-btn {
  background-color: #0f172a !important;
  color: #94a3b8 !important;
  border: 1px solid #1e293b !important;
  border-radius: 8px !important;
  padding: 0.35rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-pill-btn:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

.filter-pill-btn.active {
  background-color: rgba(99, 102, 241, 0.2) !important;
  color: #818cf8 !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 1px #6366f1;
}

/* Most Read Time Period Tab Pills (Border-free, Green Accent) */
.most-read-tabs-wrapper {
  background-color: #0f172a;
  padding: 4px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  border: none !important;
}

.most-read-tab-btn {
  background-color: transparent;
  color: #94a3b8;
  border: none !important;
  border-radius: 20px !important;
  padding: 0.4rem 1.1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.most-read-tab-btn:hover {
  color: #ffffff;
}

.most-read-tab-btn.active {
  background-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* Tag Chips Input Select Component */
.tag-chips-container {
  background-color: #0f172a !important;
  border: 1px solid #1e293b !important;
  border-radius: 10px !important;
  padding: 0.5rem 0.75rem !important;
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tag-chip {
  background-color: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.tag-chip.tag-chip-include {
  background-color: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.4);
}

.tag-chip.tag-chip-exclude {
  background-color: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.tag-chip .remove-tag-btn {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.tag-chip .remove-tag-btn:hover {
  opacity: 1;
  color: #ffffff;
}

.tag-select-dropdown {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 0.875rem !important;
  outline: none !important;
  flex-grow: 1;
  min-width: 140px;
  cursor: pointer;
}

.tag-select-dropdown option {
  background-color: #0f172a;
  color: #ffffff;
}

/* Custom Select Dropdowns */
.custom-filter-select {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #1e293b !important;
  border-radius: 10px !important;
  padding: 0.65rem 1rem !important;
  font-size: 0.9rem !important;
}

.custom-filter-select option {
  background-color: #0f172a;
  color: #ffffff;
  padding: 0.5rem;
}

/* Nav Tabs Dark Theme Overrides */
.nav-tabs-custom {
  border-bottom: 2px solid #1e293b !important;
}

.nav-tabs-custom .nav-link {
  color: #94a3b8 !important;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  padding: 0.85rem 1.5rem !important;
  transition: all 0.2s ease !important;
}

.nav-tabs-custom .nav-link:hover {
  color: #f8fafc !important;
  border-bottom-color: #334155 !important;
}

.nav-tabs-custom .nav-link.active {
  color: #818cf8 !important;
  background-color: #1e293b !important;
  border-bottom: 3px solid #6366f1 !important;
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
}

/* Chapter List & Items */
.chapter-list-container {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid #1e293b !important;
  padding: 1.5rem;
}

.chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #1e293b !important;
  transition: background 0.2s ease;
  border-radius: var(--radius-sm);
}

.chapter-item:last-child {
  border-bottom: none;
}

.chapter-item:hover {
  background: var(--bg-card-hover);
}

/* Footer */
footer {
  margin-top: auto;
  background-color: var(--bg-secondary);
  border-top: 1px solid #1e293b !important;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Bootstrap 5 Card & Container Dark Border Overrides */
.card, .p-4.bg-card, .border.rounded-3, .bg-card.border {
  border-color: #1e293b !important;
}

.card {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #1e293b !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden;
}

.card-header, .card-footer {
  background-color: #1e293b !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

.card-body {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

.border-secondary {
  border-color: #1e293b !important;
}

/* Modern Dark Bootstrap 5 Modal Overrides */
.modal-content {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #1e293b !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  border-bottom: 1px solid #1e293b !important;
  padding: 1.25rem 1.75rem !important;
}

.modal-title {
  color: #ffffff !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
}

.modal-body {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  padding: 1.75rem !important;
}

.modal-footer {
  background-color: #1e293b !important;
  border-top: 1px solid #1e293b !important;
  padding: 1rem 1.75rem !important;
}

/* Form Inputs Dark Styling & Crisp Text Contrast */
.form-control, .form-select {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #1e293b !important;
  border-radius: 10px !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
  padding-right: 1rem !important;
  padding-left: 1rem !important;
  font-size: 0.95rem !important;
}

/* Fix Icon & Text Overlap: Left padding for inputs with icons */
.form-control.ps-5, .form-select.ps-5, .toc-search-input {
  padding-left: 2.8rem !important;
}

/* Navbar Search Input Styling */
.search-bar-input {
  background-color: var(--bg-primary) !important;
  border: 1px solid #1e293b !important;
  color: #ffffff !important;
  border-radius: 20px !important;
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
  padding-right: 1.2rem !important;
  padding-left: 2.8rem !important;
  width: 260px;
  transition: all 0.3s ease;
}

.search-bar-input:focus {
  outline: none;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
  width: 320px;
}

.position-relative .fas, 
.position-relative .far {
  pointer-events: none;
  z-index: 5;
  color: #94a3b8 !important;
}

.form-control::placeholder {
  color: #94a3b8 !important;
  opacity: 0.85 !important;
}

.form-control:focus, .form-select:focus {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25) !important;
}

.form-label {
  color: #f8fafc !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  margin-bottom: 0.5rem !important;
}

.form-check-label {
  color: #e2e8f0 !important;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%) !important;
  opacity: 0.8;
}
.btn-close:hover {
  opacity: 1;
}

/* Dropdown Menu Dark Theme Overrides */
.dropdown-menu {
  background-color: #1e293b !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  border-radius: 12px !important;
  padding: 0.5rem !important;
}

.dropdown-item {
  color: #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 0.5rem 1rem !important;
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: #334155 !important;
  color: #ffffff !important;
}

/* Text Utilities & Helper Classes */
.text-indigo {
  color: #818cf8 !important;
}

.text-muted {
  color: #94a3b8 !important;
}

.text-light {
  color: #f8fafc !important;
}

/* Primary Indigo Buttons */
.btn-primary {
  background-color: #6366f1 !important;
  border-color: #6366f1 !important;
  color: #ffffff !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #4f46e5 !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-outline-indigo {
  color: #818cf8 !important;
  border: 1px solid #6366f1 !important;
  background-color: transparent !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-outline-indigo:hover {
  background-color: #6366f1 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-outline-secondary {
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}

.btn-outline-secondary:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}

/* Mobile & Tablet Responsive Media Queries */
@media (max-width: 991.98px) {
  .hero-banner {
    padding: 2rem 1.5rem;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .novel-detail-header {
    flex-direction: column;
    padding: 1.5rem;
    align-items: center;
    text-align: center;
  }
  .novel-detail-cover {
    width: 170px;
    height: 240px;
  }
  .search-bar-input {
    width: 100% !important;
  }
}

@media (max-width: 575.98px) {
  .hero-banner {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }
  .hero-title {
    font-size: 1.45rem;
  }
  .hero-synopsis {
    font-size: 0.875rem;
    -webkit-line-clamp: 2;
  }

  /* Force Nav Tabs to remain in 1 single horizontal row on mobile */
  .nav-tabs-custom {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    border-bottom: 2px solid #1e293b !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .nav-tabs-custom::-webkit-scrollbar {
    display: none !important;
  }
  .nav-tabs-custom .nav-link {
    padding: 0.6rem 0.85rem !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
  }

  /* Detail Page Action Buttons Full Width Stacking on Mobile */
  .novel-detail-btn-group {
    flex-direction: column !important;
    width: 100% !important;
  }
  .novel-detail-btn-group .btn {
    width: 100% !important;
    font-size: 0.95rem !important;
    padding: 0.65rem 1.25rem !important;
    white-space: nowrap !important;
  }

  /* Stack hero buttons cleanly on mobile phones */
  .hero-btn-group {
    flex-direction: column !important;
    width: 100% !important;
  }
  .hero-btn-group .btn {
    width: 100% !important;
    font-size: 0.95rem !important;
    padding: 0.6rem 1.25rem !important;
    white-space: nowrap !important;
  }

  /* Detail Page Chapter Item Mobile Layout */
  .chapter-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    padding: 0.85rem 0.75rem !important;
  }

  .chapter-item-action-row {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 0.25rem;
  }

  /* Chapter Header Control Controls Mobile Stacking */
  .chapter-control-inputs {
    flex-direction: column !important;
    width: 100% !important;
  }

  .chapter-control-inputs select,
  .chapter-control-inputs div {
    width: 100% !important;
    min-width: 100% !important;
  }

  /* Webnovel standard: 2 cover cards per row on smartphones */
  .novel-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .novel-card-title {
    font-size: 0.85rem !important;
  }
  .novel-card-info {
    padding: 0.6rem !important;
  }

  /* Most read time period tabs on mobile */
  .most-read-tabs-wrapper {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }
  .most-read-tab-btn {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.775rem !important;
    flex-grow: 1;
    text-align: center;
  }

  /* Catalog filter pills horizontal swipe container on mobile */
  .filter-pills-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .filter-pills-scroll::-webkit-scrollbar {
    display: none !important;
  }
  .filter-pills-scroll .filter-pill-btn {
    flex-shrink: 0 !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
  }

  /* Horizontal single-row touch scroll for genre badges */
  .badge-genre-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .badge-genre-scroll::-webkit-scrollbar {
    display: none !important;
  }
  .badge-genre-scroll .badge-genre {
    flex-shrink: 0 !important;
    font-size: 0.85rem !important;
    padding: 0.4rem 0.85rem !important;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Inkstone Author Sidebar & Dashboard Utilities */
.hover-indigo:hover {
  color: #818cf8 !important;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.catalog-list-card {
  min-height: 168px;
}

.extra-small {
  font-size: 0.775rem;
}

.font-monospace {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

.cursor-pointer {
  cursor: pointer;
}

@media (max-width: 991.98px) {
  .inkstone-sidebar {
    width: 100% !important;
    min-height: auto !important;
  }
}

/* Remove Number Input Spinner Arrows */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.no-spinner {
  -moz-appearance: textfield;
}

/* Table of Contents Offcanvas Drawer */
.bg-darker {
  background-color: #0b0f19 !important;
}

.hover-bg-secondary:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

.bg-indigo {
  background-color: #6366f1 !important;
}

.text-indigo {
  color: #818cf8 !important;
}

.btn-outline-indigo {
  color: #818cf8;
  border-color: #6366f1;
}

.btn-outline-indigo:hover {
  background-color: #6366f1;
  color: #ffffff;
}

.toc-chapter-list::-webkit-scrollbar {
  width: 6px;
}

.toc-chapter-list::-webkit-scrollbar-track {
  background: #0f172a;
}

.toc-chapter-list::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.toc-chapter-list::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* Catalog List View Styling */
.hover-card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hover-card-lift:hover {
  transform: translateY(-2px);
  border-color: #6366f1 !important;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.25) !important;
}

.bg-success-subtle {
  background-color: rgba(34, 197, 94, 0.15) !important;
}
.text-success {
  color: #4ade80 !important;
}
.border-success-subtle {
  border-color: rgba(34, 197, 94, 0.3) !important;
}

.bg-warning-subtle {
  background-color: rgba(245, 158, 11, 0.15) !important;
}
.text-warning {
  color: #fbbf24 !important;
}
.border-warning-subtle {
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.bg-primary-subtle {
  background-color: rgba(99, 102, 241, 0.15) !important;
}
.border-indigo-subtle {
  border-color: rgba(99, 102, 241, 0.3) !important;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Profile Authored Novels List ── responsive fluid text */
.profile-novel-item .novel-item-title {
  font-size: clamp(0.78rem, 1.8vw, 1rem);
  font-weight: 700;
  line-height: 1.3;
}
.profile-novel-item .novel-item-meta {
  font-size: clamp(0.62rem, 1.2vw, 0.75rem);
}
.profile-novel-item .novel-item-badge {
  font-size: clamp(0.55rem, 1vw, 0.65rem) !important;
  padding: 0.2em 0.5em !important;
}
.profile-novel-item .btn-read {
  font-size: clamp(0.7rem, 1.2vw, 0.8rem);
  padding: 0.3rem clamp(0.5rem, 1.5vw, 0.9rem);
}

@media (max-width: 576px) {
  .profile-novel-item {
    padding: 0.6rem !important;
    gap: 0.6rem !important;
  }
  .profile-novel-item img {
    width: 48px !important;
    height: 67px !important;
  }
  .profile-novel-item .novel-item-title {
    font-size: 0.78rem;
  }
  .profile-novel-item .novel-item-meta {
    font-size: 0.62rem;
  }
}

@media (max-width: 400px) {
  .profile-novel-item img {
    width: 40px !important;
    height: 56px !important;
  }
  .profile-novel-item .novel-item-title {
    font-size: 0.72rem;
  }
  .profile-novel-item .novel-item-meta {
    font-size: 0.58rem;
  }
}

/* ── Most Read Novels List ── responsive fluid text */
.home-novel-item .home-novel-title {
  font-size: clamp(0.78rem, 1.8vw, 1rem);
  font-weight: 700;
  line-height: 1.3;
}
.home-novel-item .home-novel-author {
  font-size: clamp(0.62rem, 1.1vw, 0.78rem);
}
.home-novel-item .home-novel-meta {
  font-size: clamp(0.62rem, 1.1vw, 0.78rem);
}
.home-novel-item .home-novel-rank {
  font-size: clamp(0.62rem, 1vw, 0.75rem) !important;
}
.home-novel-item .rating-stars {
  font-size: clamp(0.62rem, 1.1vw, 0.78rem);
}

@media (max-width: 576px) {
  .home-novel-item {
    padding: 0.6rem !important;
  }
  .home-novel-item .home-novel-cover {
    width: 60px !important;
    height: 84px !important;
  }
  .home-novel-item .home-novel-title {
    font-size: 0.78rem;
  }
  .home-novel-item .home-novel-author,
  .home-novel-item .home-novel-meta {
    font-size: 0.62rem;
  }
}

@media (max-width: 400px) {
  .home-novel-item .home-novel-cover {
    width: 48px !important;
    height: 67px !important;
  }
  .home-novel-item .home-novel-title {
    font-size: 0.72rem;
  }
}

/* ── Recently Updated List ── responsive fluid text */
.recently-updated-item .recently-updated-title {
  font-size: clamp(0.78rem, 1.8vw, 1rem);
  font-weight: 700;
  line-height: 1.3;
}
.recently-updated-item .recently-updated-author {
  font-size: clamp(0.62rem, 1.1vw, 0.78rem);
}
.recently-updated-item .recently-updated-ch-btn {
  font-size: clamp(0.62rem, 1vw, 0.75rem);
}

@media (max-width: 576px) {
  .recently-updated-item {
    padding: 0.6rem !important;
    gap: 0.6rem !important;
  }
  .recently-updated-item .recently-updated-cover {
    width: 48px !important;
    height: 67px !important;
  }
  .recently-updated-item .recently-updated-title {
    font-size: 0.78rem;
  }
  .recently-updated-item .recently-updated-author {
    font-size: 0.62rem;
  }
}

@media (max-width: 400px) {
  .recently-updated-item .recently-updated-cover {
    width: 40px !important;
    height: 56px !important;
  }
  .recently-updated-item .recently-updated-title {
    font-size: 0.72rem;
  }
}
