.manga-list-page {
  min-height: calc(100vh - 76px);
  color: #e8edf5;
  background:
    radial-gradient(ellipse at 75% 0, rgba(66, 169, 225, 0.055), transparent 35%),
    var(--primary, #111828);
}

.manga-filter-sidebar {
  padding: 1.25rem 0.75rem 1.25rem 1.25rem;
  background: transparent;
}

.manga-filter-panel {
  border: 0;
  background: transparent;
}

.manga-filter-panel .offcanvas-header {
  display: none;
}

.manga-filter-panel .offcanvas-body {
  padding: 0;
}

.manga-filter-form {
  position: sticky;
  top: 96px;
  padding: 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 1rem;
  background: linear-gradient(155deg, rgba(27, 41, 65, 0.98), rgba(22, 33, 62, 0.98));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.manga-filter-form > .d-flex:first-child {
  margin-bottom: 1.15rem !important;
}

.manga-list-page .filter-title,
.manga-filter-form legend {
  color: #eff4fa !important;
  font-size: 0.91rem;
  font-weight: 700 !important;
}

.manga-filter-form .form-label,
.manga-filter-form legend {
  margin-bottom: 0.5rem;
}

.manga-filter-form .input-group {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.7rem;
  background: #111b2c;
}

.manga-filter-form .input-group .form-control {
  min-height: 42px;
  border: 0;
  color: #edf2f8;
  background: transparent;
  box-shadow: none;
}

.manga-filter-form .form-control::placeholder {
  color: #8291a6;
}

.manga-filter-form .input-group .btn {
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.17);
  color: #99dafa;
  background: rgba(66, 169, 225, 0.08);
}

.manga-filter-form .filter-section {
  max-height: 170px;
  padding: 0.55rem 0.65rem !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  border-radius: 0.7rem !important;
  background: rgba(12, 21, 36, 0.58) !important;
}

.manga-filter-form .filter-genre-list {
  max-height: 210px;
}

.manga-filter-form .form-check {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding-left: 0;
}

.manga-filter-form .form-check-input {
  flex: 0 0 auto;
  float: none;
  margin: 0;
  border-color: #65758b;
  background-color: #152238;
  cursor: pointer;
}

.manga-filter-form .form-check-input:checked {
  border-color: var(--custom-blue);
  background-color: var(--custom-blue);
}

.manga-filter-form .form-check-label {
  color: #c4cedb;
  cursor: pointer;
  font-size: 0.88rem;
}

.manga-filter-form .form-select {
  min-height: 42px;
  border-radius: 0.7rem;
  background-color: #111b2c;
}

.manga-filter-form .filter-submit-button {
  min-height: 43px;
  border-radius: 0.7rem;
  color: #071827;
  font-weight: 700;
}

.manga-filter-form .btn-outline-secondary {
  border-color: rgba(203, 213, 225, 0.22);
  border-radius: 0.7rem;
  color: #b9c5d4;
}

.manga-filter-form .btn-outline-secondary:hover {
  border-color: rgba(66, 169, 225, 0.6);
  color: #fff;
  background: rgba(66, 169, 225, 0.1);
}

.manga-results-area {
  min-height: calc(100vh - 76px);
  background: transparent;
}

.manga-results {
  max-width: 1580px;
  padding: 1.5rem clamp(1rem, 2.2vw, 2rem) 3rem !important;
}

.manga-results-header {
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.manga-results-header .section-header {
  margin: 0;
  padding: 0;
}

.manga-results-header .section-title {
  margin: 0;
  padding-left: 1rem;
  color: #f3f6fb;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.035em;
  text-shadow: none;
}

.manga-results-header .section-title::before {
  width: 4px;
  background: linear-gradient(180deg, var(--custom-blue), #7bd2f3);
}

.manga-results-count {
  color: #92a5bb;
  font-size: 0.9rem;
  white-space: nowrap;
}

.manga-active-filters {
  margin-bottom: 1.25rem !important;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 0.85rem;
  background: rgba(26, 39, 64, 0.6);
}

.manga-active-filters > div > span:first-child {
  margin-right: 0.25rem;
  color: #aebbd0 !important;
  font-size: 0.85rem;
}

.manga-active-filters .badge {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.manga-active-filters > div > .btn {
  border-color: rgba(203, 213, 225, 0.22);
  border-radius: 999px;
  color: #c0ccda;
}

.manga-grid {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
  margin-top: 0.25rem;
}

.manga-grid-item {
  min-width: 0;
}

.manga-list-page .manga-grid .manga-card {
  height: 100%;
  padding: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.95rem;
  color: #e9eef6;
  background: #1a2740;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.manga-list-page .manga-grid .manga-card:hover {
  border-color: rgba(66, 169, 225, 0.42);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25) !important;
  transform: translateY(-3px);
}

.manga-list-page .manga-grid .manga-card-image {
  aspect-ratio: 0.72;
  margin-bottom: 0.45rem;
  border-radius: 0.65rem;
  object-fit: cover;
  transition: transform 220ms ease;
}

.manga-list-page .manga-grid .manga-card:hover .manga-card-image {
  transform: scale(1.025) !important;
}

.manga-list-page .manga-grid .card-title {
  display: -webkit-box;
  overflow: hidden;
  color: #f2f5f9;
  font-size: 0.95rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.manga-list-page .manga-grid .badge {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.45rem;
}

.manga-card-taxonomy-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0.2rem;
}

.manga-card-taxonomy-meta > a {
  display: inline-flex;
  text-decoration: none;
}

.manga-card-taxonomy-meta .badge {
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  line-height: 1.2;
}

.manga-list-page .manga-grid .genre-badge,
.manga-list-page .manga-grid .badge-genre {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.manga-list-page .pagination {
  gap: 0.35rem;
  margin-top: 2rem;
}

.manga-list-page .pagination .page-link {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  width: auto;
  place-items: center;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 0.65rem;
  color: #c5d0de;
  background: #1a2740;
  text-decoration: none;
}

.manga-list-page .pagination .page-link:hover,
.manga-list-page .pagination .page-item.active .page-link {
  border-color: var(--custom-blue);
  color: #081827;
  background: var(--custom-blue);
}

.manga-list-page .pagination .page-item.active .page-link {
  font-weight: 750;
}

.manga-empty-state {
  margin-top: 1rem;
  padding: 4rem 1.5rem !important;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  background: rgba(26, 39, 64, 0.5);
}

.manga-empty-state > div i {
  color: #6c819a !important;
}

.manga-empty-state h4 {
  color: #eaf0f7;
}

.manga-empty-state p {
  color: #9cabc0 !important;
}

.manga-filter-open-row {
  padding: 0.75rem 1rem 0;
}

.manga-filter-open-row .filter-toggle-button {
  min-height: 46px;
  margin-top: 0 !important;
  border: 0;
  border-radius: 0.8rem;
  color: #071827;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(66, 169, 225, 0.16);
}

@media (min-width: 768px) {
  .manga-filter-sidebar {
    padding: 1.25rem 0.35rem 1.25rem 1.25rem;
  }

  .manga-filter-panel {
    position: sticky;
    top: 90px;
  }

  .manga-filter-form {
    position: static;
  }
}

@media (min-width: 768px) {
  .manga-list-page .manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 1rem;
    margin: 0.25rem 0 0;
  }

  .manga-list-page .manga-grid .manga-grid-item {
    width: auto;
    max-width: none;
    padding: 0;
  }

  .manga-list-page .manga-card-cover {
    display: block !important;
    width: 100%;
  }

  .manga-list-page .manga-grid .manga-card-image {
    display: block;
    width: 100%;
    height: 220px;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

@media (max-width: 767.98px) {
  .manga-filter-sidebar {
    padding: 0;
  }

  .manga-filter-panel {
    --bs-offcanvas-bg: #16213e;
    border: 0;
    background: #16213e;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
  }

  .manga-filter-panel .offcanvas-header {
    display: flex;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15) !important;
  }

  .manga-filter-panel .offcanvas-body {
    padding: 1rem 1.1rem;
  }

  .manga-filter-form {
    position: static;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .manga-results-area {
    min-height: 0;
  }

  .manga-results {
    padding: 1rem 1rem 2.5rem !important;
  }

  .manga-results-header {
    align-items: flex-end !important;
    margin-bottom: 0.8rem !important;
    padding-bottom: 0.8rem;
  }

  .manga-grid {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.85rem;
  }

  .manga-list-page .manga-grid .manga-card {
    padding: 0.5rem;
    border-radius: 0.8rem;
  }

  .manga-list-page .manga-grid .manga-card-image {
    height: 180px;
    aspect-ratio: auto;
  }

  .manga-results-header .section-title {
    font-size: 1.35rem;
  }

  .manga-results-count {
    font-size: 0.78rem;
  }
}

@media (max-width: 400px) {
  .manga-results-header {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 0.3rem !important;
  }

  .manga-grid {
    --bs-gutter-x: 0.55rem;
  }

  .manga-list-page .manga-grid .manga-card {
    padding: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manga-list-page *,
  .manga-list-page *::before,
  .manga-list-page *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Transparent filter surfaces with clearly selected rows. */
.manga-list-page .manga-filter-form {
  background: rgba(148,163,184,.025);
  border-color: rgba(148,163,184,.18);
  box-shadow: none;
}
.manga-list-page .manga-filter-form .input-group,
.manga-list-page .manga-filter-form .filter-section,
.manga-list-page .manga-filter-form .form-select {
  background-color: rgba(148,163,184,.035) !important;
  border-color: rgba(148,163,184,.2) !important;
}
.manga-list-page .manga-filter-form .input-group .form-control {
  background: transparent !important;
}
.manga-list-page .manga-filter-form .filter-section {
  scrollbar-color: rgba(148,163,184,.35) transparent;
}
.manga-list-page .filter-section::-webkit-scrollbar-track { background: transparent; }
.manga-list-page .filter-section::-webkit-scrollbar-thumb { background: rgba(148,163,184,.35); }
.manga-list-page .manga-filter-form .form-check {
  padding: .3rem .4rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  transition: background-color 150ms, border-color 150ms;
}
.manga-list-page .manga-filter-form .form-check:hover {
  background: rgba(148,163,184,.06);
}
.manga-list-page .manga-filter-form .form-check:has(:checked) {
  background: rgba(66,169,225,.1);
  border-color: rgba(66,169,225,.3);
}
.manga-list-page .manga-filter-form .form-check:has(:checked) label { color: #a8e3ff; }
.manga-list-page .manga-filter-form .form-check-input {
  background-color: rgba(148,163,184,.06);
  border-color: rgba(148,163,184,.4);
}
.manga-list-page .manga-filter-form .form-check-input:checked {
  background-color: rgba(66,169,225,.28);
  border-color: #69c8fa;
}
.manga-list-page .manga-filter-form :is(.form-control,.form-select):focus {
  border-color: #69c8fa !important;
  box-shadow: 0 0 0 2px rgba(66,169,225,.15);
}
.manga-list-page .manga-active-filters { background: rgba(66,169,225,.035); }
@media(max-width:767.98px){
  .manga-list-page .manga-filter-panel {
    background: rgba(17,24,40,.88);
    backdrop-filter: blur(18px);
    border-right: 1px solid rgba(148,163,184,.2);
  }
  .manga-list-page .manga-filter-form { background: transparent; }
}
