/* /static/css/custom.css — Anikai supplement. Bootstrap Icons via cdnjs
   replaces FontAwesome entirely. Keep this file lean and explicit. */

/* ── Base icon sizing (Bootstrap Icons set base font-size of parent) ── */
.bi { line-height: 1; vertical-align: -0.125em; }

/* ── Restore dropdown arrow that the bundled CSS used to draw with FA ── */
.dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 0; height: 0;
  margin-left: .4rem;
  vertical-align: .2em;
  border-top: .35em solid currentColor;
  border-right: .35em solid transparent;
  border-bottom: 0;
  border-left: .35em solid transparent;
  transition: transform .2s ease;
}
.dropdown-toggle.show::after { transform: rotate(180deg); }

/* ── No-source fallback in the player frame ─────────────────────── */
#player .no-source {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 50vh; color: #fff; text-align: center; padding: 2rem;
}

/* ── Server selector — STACKED layout, polished pill UI ────────── */
#player-server {
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: 0.8rem;
  margin-top: 1rem;
}
#player-server .server-row {
  display: block;
  padding: 0.5rem 0;
}
#player-server .server-row + .server-row {
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
#player-server .server-label {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.7rem;
}
#player-server .server-label .kind {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px;
  border-radius: 0.45rem;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.55);
  transition: background 0.15s, color 0.15s;
}
#player-server .server-label .kind.sub { background: rgba(54,203,104,0.16); color: #6be08b; }
#player-server .server-label .kind.sub.on { background: #36cb68; color: #0a1410; }
#player-server .server-label .kind.dub { background: rgba(228,95,58,0.16); color: #ff9377; }
#player-server .server-label .kind.dub.on { background: #e45f3a; color: #1c0a04; }
#player-server .server-label > span:last-child {
  font-size: 0.78rem; opacity: 0.5;
  letter-spacing: 0.4px; text-transform: uppercase;
}
#player-server .server-list {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0; margin: 0; list-style: none;
}
#player-server .server-list li {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1rem; cursor: pointer; user-select: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.5rem;
  font-size: 0.85rem; font-weight: 500;
  transition: all 0.15s ease;
}
#player-server .server-list li:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}
#player-server .server-list li.active {
  background: #36cb68; color: #0a1410; font-weight: 600;
  border-color: #36cb68;
  box-shadow: 0 4px 14px rgba(54,203,104,0.25);
}
#player-server .server-list li.active .bi { color: #0a1410; }
#player-server .server-list li.empty {
  background: transparent; border: 1px dashed rgba(255,255,255,0.12);
  opacity: 0.55; cursor: default; font-style: italic;
}
#player-server .server-list li .bi { font-size: 0.85rem; }

/* ── Episode list (pills + grid + search bar) ───────────────────── */
.episode-section .ep-search-wrap {
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(255,255,255,0.04);
  border-radius: 0.5rem;
  padding: 0.25rem 0.7rem;
  max-width: 220px;
  margin-left: auto;
}
.episode-section .ep-search-wrap .bi { opacity: 0.55; font-size: 0.85rem; }
.episode-section .ep-search-wrap input {
  background: transparent; border: 0; outline: 0; color: #fff;
  padding: 0.4rem 0; font-size: 0.85rem; width: 100%;
}
.episode-section .ep-search-wrap input::placeholder { color: rgba(255,255,255,0.4); }

.episode-list { padding: 1rem 0; }
.episode-list.pills,
.episode-list.grid {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  /* Don't let long shows (e.g. 1000+ eps) stretch the page forever —
     cap the height and scroll the list internally instead. */
  max-height: 62vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.35rem;
}
/* Themed (green) scrollbar for the episode list */
.episode-list.pills,
.episode-list.grid { scrollbar-width: thin; scrollbar-color: #36cb68 transparent; }
.episode-list.pills::-webkit-scrollbar,
.episode-list.grid::-webkit-scrollbar { width: 6px; }
.episode-list.pills::-webkit-scrollbar-track,
.episode-list.grid::-webkit-scrollbar-track { background: transparent; }
.episode-list.pills::-webkit-scrollbar-thumb,
.episode-list.grid::-webkit-scrollbar-thumb { background: #36cb68; border-radius: 1rem; }
.episode-list .ep-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.5rem; height: 2.5rem; padding: 0 0.7rem;
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.85);
  border-radius: 0.5rem; font-size: 0.9rem; text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.episode-list .ep-link:hover {
  background: rgba(255,255,255,0.12); color: #fff;
  transform: translateY(-1px);
}
.episode-list .ep-link.active {
  background: #36cb68; color: #000; font-weight: 600;
  box-shadow: 0 4px 12px rgba(54,203,104,0.25);
}
.episode-list .ep-link.dim { opacity: 0.22; pointer-events: none; }
.episode-list.grid .ep-link { min-width: 3rem; }

/* ── Comment placeholder + tabs ─────────────────────────────────── */
#comment .cmnt-tabs {
  display: flex; gap: 1rem;
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
#comment .cmnt-tabs .tab { padding: 0.4rem 0; cursor: pointer; opacity: 0.55; font-weight: 500; }
#comment .cmnt-tabs .tab.active { opacity: 1; border-bottom: 2px solid #36cb68; }

/* ── Lights-off / Expanded player ───────────────────────────────── */
body.lights-off { background: #000 !important; }
body.lights-off .watch-section-bg,
body.lights-off header,
body.lights-off footer,
body.lights-off aside,
body.lights-off .entity-section,
body.lights-off #comment,
body.lights-off .episode-section,
body.lights-off #seasons,
body.lights-off #player-server,
body.lights-off #player-control { opacity: 0.15; transition: opacity 0.3s; }

/* Expanded (theater) — make the player frame larger */
body.player-expanded #wrapper .container { max-width: 100% !important; padding: 0 1rem; }
body.player-expanded .player-main {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: none !important;
}
body.player-expanded #player { width: 100% !important; height: 100% !important; }
body.player-expanded .entity-section,
body.player-expanded aside { display: none !important; }
body.player-expanded .watch-section-wrap { display: block !important; }

/* ── Search-suggest dropdown ────────────────────────────────────── */
#search .suggestion {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #1c2228; border-radius: 0.6rem; margin-top: 0.4rem;
  max-height: 75vh; overflow-y: auto;
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.35);
  display: none; z-index: 50;
}
#search .suggestion.show { display: block; }
#search .suggestion .suggest-row {
  display: flex; gap: 0.75rem; padding: 0.6rem; align-items: center;
  color: inherit; text-decoration: none;
}
#search .suggestion .suggest-row:hover { background: rgba(255,255,255,0.05); }
#search .suggestion .suggest-row .thumb {
  width: 42px; height: 60px; flex: 0 0 42px; overflow: hidden;
  border-radius: 0.3rem; background: #11161b;
}
#search .suggestion .suggest-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
#search .suggestion .suggest-row .meta .t { font-size: 0.92rem; font-weight: 500; }
#search .suggestion .suggest-row .meta .m { font-size: 0.78rem; opacity: 0.55; margin-top: 0.1rem; }
#search .suggestion .suggest-empty { padding: 1rem; opacity: 0.55; font-size: 0.9rem; text-align: center; }

/* ── 404 / small adjustments ────────────────────────────────────── */
.no-episodes { background: rgba(255,255,255,0.03); border-radius: 0.6rem; }

/* ── Mobile nav slide-down ──────────────────────────────────────── */
@media (max-width: 991.98px) {
  .nav-menu { display: none; }
  .nav-menu.show {
    display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
    background: #131820; padding: 1rem 1.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.35);
  }
  .nav-menu.show > ul { padding-left: 0; list-style: none; margin: 0; }
}

/* ── Pagination ─────────────────────────────────────────────────── */
.pagination-wrap .page-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.4rem; height: 2.4rem; padding: 0 0.6rem;
  background: rgba(255,255,255,0.05); color: #fff;
  border-radius: 0.5rem; text-decoration: none; font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.pagination-wrap .page-num:hover { background: rgba(255,255,255,0.12); }
.pagination-wrap .page-num.active {
  background: #36cb68; color: #000; font-weight: 600;
}
/* Prev / Next buttons: keep the chevron + label on one line, same height
   as the number chips, and never clip ("Nex" / wrapped "Prev"). */
.pagination-wrap .btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  white-space: nowrap; line-height: 1;
  height: 2.4rem; padding: 0 0.9rem; width: auto;
}
.pagination-wrap .btn i { display: inline-flex; font-size: 0.95rem; }

/* ── Filter bar (browse / genres) ───────────────────────────────── */
.filter-bar .form-control,
.filter-bar .form-select {
  background-color: rgba(255,255,255,0.05);
  border-color: transparent;
  color: #fff;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
}
.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
  background-color: rgba(255,255,255,0.08);
  border-color: rgba(54,203,104,0.45);
  box-shadow: 0 0 0 0.15rem rgba(54,203,104,0.15);
  color: #fff;
}

/* ── Sidebar mini-card grouping ─────────────────────────────────── */
.aitem-wrapper.mini.compact { display: flex; flex-direction: column; gap: 0.6rem; }

/* ── Report modal ───────────────────────────────────────────────── */
.report-modal-backdrop {
  position: fixed; inset: 0; z-index: 1050;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.report-modal {
  width: 100%; max-width: 460px;
  background: #1c2228; border-radius: 1rem;
  padding: 1.8rem 1.5rem;
  box-shadow: 0 1.2rem 3rem rgba(0,0,0,0.45);
}
.report-modal h5 { margin: 0 0 1rem; font-weight: 600; }
.report-modal .form-control,
.report-modal .form-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  margin-bottom: 0.8rem;
}
.report-modal .ctrl-row {
  display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.6rem;
}

/* ── Bookmark dropdown polish ───────────────────────────────────── */
.user-bookmark .dropdown-menu {
  background: #1c2228;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.6rem;
  padding: 0.4rem 0;
  min-width: 180px;
  box-shadow: 0 0.7rem 1.4rem rgba(0,0,0,0.35);
}
.user-bookmark .dropdown-menu .dropdown-item {
  color: #fff; padding: 0.5rem 1rem; font-size: 0.88rem;
}
.user-bookmark .dropdown-menu .dropdown-item:hover {
  background: rgba(54,203,104,0.15); color: #6be08b;
}
.user-bookmark .dropdown-menu .dropdown-item.text-danger:hover {
  background: rgba(220,53,69,0.15); color: #ff8a8a;
}
.user-bookmark .dropdown-divider {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 0.3rem 0;
}

/* ──────────────────────────────────────────────────────────────────
   Fixes layer (loaded last to win cascade over bundled styles.css)
   ────────────────────────────────────────────────────────────────── */

/* Force server selector to STACK Sub on top, Dub below (override bundled flex-row) */
#player-server {
  display: block !important;
  flex-direction: column !important;
}
#player-server .server-row {
  display: block !important;
  width: 100% !important;
  float: none !important;
}
#player-server .server-wrap,
#player-server .server-note { width: 100% !important; }

/* Report modal — custom radio options (no native <select>) */
.report-modal .report-options {
  display: flex; flex-direction: column; gap: 0.4rem;
  margin: 0 0 1rem 0;
}
.report-modal .report-options .ro {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.55rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.report-modal .report-options .ro:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
}
.report-modal .report-options .ro input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.report-modal .report-options .ro input[type="radio"]:checked {
  border-color: #36cb68;
}
.report-modal .report-options .ro input[type="radio"]:checked::after {
  content: ""; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  background: #36cb68; border-radius: 50%;
}
.report-modal .report-options .ro:has(input:checked) {
  background: rgba(54,203,104,0.1);
  border-color: rgba(54,203,104,0.4);
}

/* Entity-section metadata links — make them clickable but discreet */
.entity-section .detail a {
  color: #fff;
  text-decoration: none;
  transition: color 0.15s ease;
  border-bottom: 1px solid transparent;
}
.entity-section .detail a:hover {
  color: #36cb68;
  border-bottom-color: rgba(54,203,104,0.4);
}

/* ── Hero swiper arrows — center vertically, pin to left/right edges on mobile ── */
@media (max-width: 800px) {
  #featured .featured-nav {
    position: absolute;
    bottom: auto !important;
    top: 50%;
    right: 0;
    left: 0;
    width: 100% !important;
    transform: none !important;
    pointer-events: none;
    z-index: 5;
  }
  #featured .featured-nav .featured-nav-wrap {
    display: flex;
    justify-content: space-between !important;
    align-items: center;
    padding: 0 0.6rem;
    width: 100%;
  }
  #featured .featured-nav .featured-nav-wrap .featured-prev,
  #featured .featured-nav .featured-nav-wrap .featured-next {
    pointer-events: all;
    width: 2.6rem; height: 2.6rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    margin: 0 !important;
  }
  #featured .featured-nav .featured-nav-wrap .featured-prev:hover,
  #featured .featured-nav .featured-nav-wrap .featured-next:hover {
    background: rgba(228,95,58,0.9);
  }
  #featured .featured-nav .featured-nav-wrap .featured-pagination {
    display: none !important;
  }
}

/* ── Mobile search — bundled CSS already handles .active toggle.
   We just make sure the search button is visible on mobile, hidden on desktop. ── */
@media (min-width: 992px) {
  #search-btn { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════════
   v7 updates - hero redesign, pagination, jump input, star rating
   ══════════════════════════════════════════════════════════════════ */

/* ── Pagination prev/next buttons: icon + label inline pills ── */
.pagination {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  align-items: center; justify-content: center;
  padding: 1.5rem 0;
}
.pagination a, .pagination .pag-dots {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-width: 2.4rem; height: 2.4rem; padding: 0 0.85rem;
  background: rgba(255,255,255,0.05); color: #fff;
  border-radius: 0.5rem; text-decoration: none; font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.pagination a:hover { background: rgba(255,255,255,0.12); }
.pagination a.active,
.pagination .page-num.active {
  background: #36cb68; color: #000; font-weight: 600;
}
.pagination .pag-prev,
.pagination .pag-next {
  padding: 0 1rem;
  background: rgba(255,255,255,0.06);
}
.pagination .pag-prev:hover,
.pagination .pag-next:hover { background: rgba(228,95,58,0.85); color: #fff; }
.pagination .pag-prev .bi,
.pagination .pag-next .bi { font-size: 0.85rem; }
.pagination .pag-dots {
  background: transparent; min-width: auto; padding: 0 0.3rem;
  opacity: 0.45; cursor: default;
}

/* ── Jump-to-episode input: kill native spinner arrows ── */
.episode-section .ep-search-wrap input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.episode-section .ep-search-wrap input[type=number]::-webkit-outer-spin-button,
.episode-section .ep-search-wrap input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Star rating widget ── */
#anime-rating .stars {
  display: inline-flex; gap: 0.3rem;
  margin-top: 0.4rem;
}
#anime-rating .stars i {
  cursor: pointer; user-select: none;
  width: 1.6rem; height: 1.6rem;
  position: relative;
  display: inline-block;
  transition: transform 0.15s ease;
}
/* Use pure-CSS 5-point star (no FA dependency) */
#anime-rating .stars i::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.18);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transition: background 0.15s ease;
}
#anime-rating .stars i:hover { transform: scale(1.15); }
#anime-rating .stars i.on::before { background: #f7c948; }
#anime-rating .stars i.on:hover::before { background: #ffd968; }

#anime-rating .value {
  font-weight: 700; font-size: 1.6rem;
  color: #36cb68;
  display: block;
  margin: 0.3rem 0;
}
#anime-rating #anime-rating-meta {
  font-size: 0.78rem; opacity: 0.55;
}

/* ═══════════════════════════════════════════════════════════════════
   v8 fixes - profile tabs, rating divider, mobile nav, mobile hero,
   bookmark heart, watch page metadata links
   ═══════════════════════════════════════════════════════════════════ */

/* ── Profile page polish ───────────────────────────────────────── */
.profile-head {
  display: flex; align-items: center; gap: 1.2rem;
  margin-bottom: 2rem; flex-wrap: wrap;
}
.profile-head .profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #36cb68, #e45f3a);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 600; color: #000;
  flex-shrink: 0;
  box-shadow: 0 0.5rem 1rem rgba(54, 203, 104, 0.2);
}
.profile-head .profile-id { flex: 1; min-width: 200px; }
.profile-head .profile-id h2 { margin: 0; font-weight: 600; }
.profile-head .profile-id p { margin: 0.2rem 0 0; opacity: 0.55; font-size: 0.9rem; }
.profile-head .profile-signout {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255,255,255,0.18);
}

/* Profile tabs as proper pill buttons */
.profile-tabs {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.profile-tabs .ptab {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.65rem 1.2rem;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.75);
  border-radius: 0.6rem;
  text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  transition: all 0.15s ease;
}
.profile-tabs .ptab:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  transform: translateY(-1px);
}
.profile-tabs .ptab.active {
  background: linear-gradient(135deg, #36cb68, #2eaa56);
  color: #000;
  font-weight: 600;
  box-shadow: 0 0.45rem 1rem rgba(54,203,104,0.25);
}
.profile-tabs .ptab.active .bi { color: #000; }
.profile-tabs .ptab .bi { font-size: 1rem; }

/* ── Rating box — divider between scraped score & user widget ── */
#anime-rating {
  /* Ensure consistent spacing */
}
#anime-rating .rate-label {
  margin: 0;
  color: #e45f3a;
  font-weight: 600;
  font-size: 0.95rem;
}
#anime-rating .value {
  display: block;
  font-weight: 700; font-size: 1.8rem;
  color: #36cb68;
  margin: 0.3rem 0 0.2rem;
  line-height: 1;
}
#anime-rating .rate-meta {
  display: block;
  font-size: 0.78rem; opacity: 0.55;
  margin-bottom: 0.5rem;
}
#anime-rating .rate-divider {
  height: 1px; width: 100%;
  background: rgba(255,255,255,0.08);
  margin: 0.9rem 0 0.8rem;
}
#anime-rating .rate-mine .rate-mine-label {
  margin: 0;
  font-size: 0.78rem; opacity: 0.6;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}
#anime-rating .my-rating-line {
  display: none;
  font-size: 0.78rem; opacity: 0.7;
  margin-top: 0.4rem;
  color: #36cb68;
}
#anime-rating .my-rating-line:not(:empty) { display: block; }

/* ── Bookmark heart - make it visible and RED when bookmarked ── */
.user-bookmark .btn,
.entity-section .user-bookmark .btn {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #fff !important;
  transition: all 0.2s ease !important;
}
.user-bookmark .btn:hover,
.entity-section .user-bookmark .btn:hover {
  background: rgba(228,95,58,0.18) !important;
  border-color: rgba(228,95,58,0.5) !important;
}
.user-bookmark .btn .bi {
  font-size: 1.1rem;
  color: #fff;
  transition: color 0.2s ease;
}
/* When the user already bookmarked, paint heart/bookmark in red */
.user-bookmark .btn .bi-heart-fill,
.user-bookmark .btn .bi-bookmark-fill,
.user-bookmark.in-list .btn .bi {
  color: #ff4a5b !important;
}
.user-bookmark.in-list .btn {
  background: rgba(255,74,91,0.15) !important;
  border-color: rgba(255,74,91,0.5) !important;
}
/* Same treatment for the hero/aitem mini bookmark */
.aitem .bookmark-btn .bi-heart-fill,
.aitem .bookmark-btn .bi-bookmark-fill { color: #ff4a5b !important; }

/* ── Mobile menu - force show ul when .show is on the wrapper ── */
@media (max-width: 991.98px) {
  #wrapper .nav-menu { display: block !important; }
  #wrapper .nav-menu > ul {
    display: none !important;
    background: #1a1f26;
    border-radius: 1rem;
    padding: 1rem 1.2rem 1.4rem;
    box-shadow: 0 0.7rem 1.5rem rgba(0,0,0,0.5);
    margin-top: 0.5rem;
  }
  #wrapper .nav-menu.show > ul,
  #wrapper .nav-menu > ul.active {
    display: block !important;
  }
  #wrapper .nav-menu > ul > li > a {
    padding: 0.7rem 0;
    display: block;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  #wrapper .nav-menu > ul > li:last-child > a { border-bottom: 0; }
  #wrapper .nav-menu > ul > li > ul {
    background: transparent;
    box-shadow: none;
    padding: 0.5rem 0 0.7rem 1rem;
    margin: 0;
    opacity: 1; pointer-events: auto;
    position: static;
    display: none;
  }
  #wrapper .nav-menu > ul > li.has-sub > a {
    display: flex; align-items: center; justify-content: space-between;
  }
  #wrapper .nav-menu > ul > li.has-sub > a .nav-caret {
    font-size: 0.8rem; opacity: 0.7; transition: transform 0.2s;
  }
  #wrapper .nav-menu > ul > li.has-sub.open > a .nav-caret { transform: rotate(180deg); }
  #wrapper .nav-menu > ul > li.has-sub.open > ul { display: block !important; }
  #wrapper .nav-menu > ul > li > ul > li { float: none !important; width: 100% !important; }
  #wrapper .nav-menu > ul > li > ul > li > a {
    padding: 0.4rem 0;
    color: rgba(255,255,255,0.7);
    font-size: 0.92rem;
  }
}

/* ── Filter bar polish - dropdowns more readable on small screens ── */
.filter-bar .form-control,
.filter-bar .form-select {
  background: rgba(255,255,255,0.06) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}
.filter-bar .form-select option {
  background: #1c2228;
  color: #fff;
}
@media (max-width: 575.98px) {
  .filter-bar .form-control,
  .filter-bar .form-select {
    flex: 1 1 calc(50% - 0.3rem) !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   v9 fixes
   ══════════════════════════════════════════════════════════════════ */

/* ── Bookmark button: ONLY the heart is red, no red background ── */
.user-bookmark.in-list .btn {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.1) !important;
}
.user-bookmark.in-list .btn:hover {
  background: rgba(255,255,255,0.13) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
/* The icon itself stays red */
.user-bookmark.in-list .btn .bi { color: #ff4a5b !important; }

/* ── Bookmark dropdown menu: show which folder is active ── */
.user-bookmark .dropdown-menu .dropdown-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.9rem;
}
.user-bookmark .dropdown-menu .dropdown-item > .bi {
  width: 1rem; flex-shrink: 0; font-size: 0.85rem; opacity: 0;
}
.user-bookmark .dropdown-menu .dropdown-item > .bi.bi-check2,
.user-bookmark .dropdown-menu .dropdown-item > .bi.bi-trash { opacity: 1; }
.user-bookmark .dropdown-menu .active-folder {
  background: rgba(54,203,104,0.16) !important;
  color: #6be08b !important;
  font-weight: 600;
}
.user-bookmark .dropdown-menu .active-folder .bi { color: #6be08b !important; }

/* ── Profile tabs: count badge ── */
.profile-tabs .ptab .ptab-count {
  display: inline-flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 0.2rem;
  min-width: 22px;
}
.profile-tabs .ptab.active .ptab-count {
  background: rgba(0,0,0,0.18);
  color: #000;
}
@media (max-width: 575.98px) {
  .profile-tabs .ptab {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.85rem !important;
  }
  .profile-tabs .ptab span { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}


/* ── Nav caret (desktop affordance for Genres / Types dropdowns) ── */
.nav-caret {
  display: inline-block;
  font-size: 0.7rem;
  margin-left: 0.35rem;
  opacity: 0.6;
  transition: transform 0.2s;
}
.nav-menu > ul > li.has-sub:hover > a .nav-caret { transform: rotate(180deg); opacity: 0.9; }

/* ── "eps" unit on the sub/dub episode-count badges ── */
.sub > i, .dub > i {
  font-style: normal;
  font-weight: 400;
  font-size: 0.72em;
  opacity: 0.7;
  margin-left: 0.18em;
  text-transform: lowercase;
}

/* ── Watch-page synopsis: clamp with a working "show full description" toggle ── */
.desc.text-expand {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.desc.text-expand.expanded {
  display: block !important;
  -webkit-line-clamp: unset !important;
  max-height: none !important;
  overflow: visible !important;
}
.desc-toggle {
  background: none;
  border: 0;
  padding: 0;
  margin-top: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e45f3a;
  cursor: pointer;
}
.desc-toggle:hover { text-decoration: underline; }

/* ── Seasons grid (non-swiper): show ALL seasons, wrap, highlight current ── */
.aitem-wrapper.season.season-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;            /* offsets the .5rem padding on each .aitem */
}
/* base styles.css sets .aitem width:20% (5 per row) for desktop; narrow down on smaller screens */
@media (max-width: 1199.98px) { .aitem-wrapper.season.season-grid .aitem { width: 25%; } }
@media (max-width: 991.98px)  { .aitem-wrapper.season.season-grid .aitem { width: 33.333%; } }
@media (max-width: 575.98px)  { .aitem-wrapper.season.season-grid .aitem { width: 50%; } }

/* Highlight the current season */
.aitem-wrapper.season .aitem.active .inner {
  box-shadow: 0 0 0 2px #36cb68, 0 0.4rem 1rem rgba(0,0,0,0.45);
}
.aitem-wrapper.season .aitem.active .inner .detail span { color: #fff; }
.aitem-wrapper.season .aitem.active .inner .detail .btn { background-color: #36cb68; color: #04210f; }