:root{
  --bg: #0b0b0b;
  --card-bg: #0a0a0a;
  --card-bd: #2a2a2a;        /* outer border */
  --stroke: #ffffff;         /* inner image stroke */
  --text: #f2f2f2;
  --muted: #cfcfcf;
  --radius: 4px;
  --gap: 24px;               /* space between cards (matches figma feel) */
}

*{ box-sizing:border-box; }
body{ margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:"GeneralSans-Regular";
 }

 @media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 85%;
    }
}
/* Grid wrapper */
.content-grid{
  width: 100%;
  margin: 32px 0px 56px;
  display:grid;
  gap: var(--gap);
  grid-template-columns: repeat(5, 1fr);
}

.content-grid2 {
    width: 80%;
    margin: 32px 0px 56px;
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(5, 1fr);
    margin-left: auto;
    margin-right: auto;
}
.content-grid2 .c-title
{
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-grid2 .c-id {
    font-size: 20px;
    color: var(--muted);
    margin-bottom: 4px;
    text-decoration: none;
}
/* Card */
.c-card{
  background: var(--card-bg);
  border: 1px solid var(--card-bd);
  border-radius: var(--radius);
  padding: 16px;
}
.card{
  background: var(--card-bg);
  border: 1px solid var(--card-bd);
  border-radius: var(--radius);
  padding: 16px;
}
/* Image area with inner white stroke */
.c-thumb{
  position: relative;
  border-radius: calc(var(--radius));
  overflow: hidden;                 /* clip corners */
  aspect-ratio: 3 / 4;              /* poster-ish */
  background:#111;
}

/* Actual image */
.c-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* Thin inner stroke like your Figma */
.c-thumb .c-stroke{
  position:absolute;
  inset:10px;                       /* distance from edges to mimic inner frame */
  border: 2px solid var(--stroke);
  border-radius: calc(var(--radius) - 1px);
  pointer-events:none;
}

/* Meta */
.c-meta{
  padding-top: 10px;
}
.c-id{
  font-size: 22px;
  color: var(--muted);
  margin-bottom: 4px;
    text-decoration: none;
}
.c-title{
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  color: white;
  text-decoration: none;
  white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.c-title:hover{
  text-decoration: none;
}
.c-id:hover{
  text-decoration: none;
}
/* Hover (subtle) */
.c-card:hover{
  border-color:#680808;
  cursor: pointer;
  box-shadow: 0px 5px 5px 5px #242424 inset, 0 12px 30px rgba(0,0,0,.35);
  transform: translateY(-1px);
  text-decoration: none;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.card:hover{
  border-color:#680808;
  box-shadow: 0px 5px 5px 5px #242424 inset, 0 12px 30px rgba(0,0,0,.35);
  transform: translateY(-1px);
  text-decoration: none;
    cursor: pointer;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.main-video{
  justify-self: center;
  width: 100%;
  height: 100vh;
  border-radius: 8px;
  max-width: 450px;
  margin: 20px 0px;
}
.video-wrapper{
  position: relative; width: 100%; max-width: 450px; margin: 0px auto;  height: auto;

}
.video-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.episode-active {
    outline: 1px #FBB49F solid !important; 
}
.episode-thumb {
    width: 50px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.episode {
    padding: 6px 10px;
    white-space: nowrap;
}

 .desktop-player-div{
    display: block !important;
  }
  .mobile-player-div{
    display: none !important;
  }
/* Responsive */
@media (max-width: 1024px){
  .content-grid{ grid-template-columns: repeat(2, 1fr); }
  .content-grid2{ grid-template-columns: repeat(3, 1fr); }
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 50px;
  margin-top: 20px;
  justify-self: end;
}

.filter-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.filter-group label {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e0e0e0;
}

.filter-group select {
  padding: 8px 15px;
  border: 1px solid #454444;
  border-radius: 8px;
  background: #000;
  font-size: 15px;
  cursor: pointer;
  font-weight: 500;
  color: white;
  min-width: 150px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 22px;
}

.reset-btn {
  padding: 8px 20px;
  border: 1px solid #454444;
  border-radius: 8px;
  background: #000;
  font-weight: 500;
  color: white;
  font-size: 15px;
  cursor: pointer;
  align-self: flex-end;
  transition: background 0.2s;
}

.reset-btn:hover {
  background: #1f1e1e;
}

@media (max-width: 600px){
  .filter-bar{
    gap: 5px;
    margin-bottom: 15px;
    width: 100%;
    justify-content: space-between;
  }
  .reset-btn{
    display: none;
  }
  .filter_sort_labels{
    display: none;
  }
  .desktop-player-div{
    display: none !important;
  }
  .mobile-player-div{
    display: block !important;
  }
  .view_more{
    padding: 15px 10px;
  }
  .more-content-section {
        margin: 0% 0% !important;
        background: black;
  }
  .btn.episode{
    width: 20% !important;
    justify-content: center !important;
    background-color: transparent !important;
  }
  .episode-number{
    font-size: 20px !important;
    margin: 0 0 16px;
  }
  .episode-thumb{
    display: none;
  }
  .main-video{
  justify-self: center;
}
.main-image {
    width: 100%;
    height: 60vh !important;
}
  .content-grid{
    width: 96vw;
    grid-template-columns: 1fr;
    gap: 10px;
    display: ruby;
    gap: 15px;
    margin-top: 10px;
  }
  .content-grid2{
    width: 96vw;
    grid-template-columns: 1fr;
    gap: 10px;
    display: ruby;
    gap: 15px;
    margin-top: 10px;
  }
  .c-card{ padding: 10px; width: 50%;}
  .c-thumb .c-stroke{ inset:8px; }
  .c-id{
    font-size: 15px;
  }
  .c-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}
  .content-grid2 .c-title {
  font-size: 13px;
    font-weight: 400;
  }
.title {
    margin: 0 0 10px;   
    font-size: 16px !important;
}
  .content-grid2 .c-id{
    font-size: 13px;
    font-weight: 400;
    }
    .desc {
    font-size: 14px !important;
    line-height: 1.2 !important;
    text-align: justify;
    padding-right: 10px;
}
.content-header {
    display: flex;
    gap: 10px !important;
    padding: 10px !important;
    margin-bottom: 0px !important;
}
.purchase-box {
    width: 92%;
    padding: 10px 15px;
    text-align: center;
    border-radius: 40px;
    background: #f6f1ca;
    color: #000;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}
.breadcrumb {
    font-size: 13px !important;
}
}
.breadcrumb {
    font-size: 18px;
    color: #c5c5c5;
    margin-bottom: 20px;
}
.episode-number {
    font-size: 28px;
    margin: 0 0 16px;
}
.content-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.small-thumb {
    width: 130px;
    height: 175px;
    border-radius: 8px;
    object-fit: cover;
}
.title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}
.desc {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 0%;
    max-height: 130px;
    height: 130px;
     overflow-y: auto;
}
.episode-description{
  font-size: 16px;
    line-height: 1.4;
    margin-bottom: 0%;
    max-height: 130px;
    height: 130px;
     overflow-y: auto;
}
/* Scrollbar width */
.episode-description::-webkit-scrollbar {
    width: 6px;        /* change width here */
}
.episode-description {
    scrollbar-width: thin;           /* auto | thin | none */
    scrollbar-color: #555 #1a1a1a;   /* thumb track */
}
.episode-description::-webkit-scrollbar {
    width: 4px;
}
/* Track */
.episode-description::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

/* Thumb */
.episode-description::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

/* Thumb on hover */
.episode-description::-webkit-scrollbar-thumb:hover {
    background: #ff6a00;
}


/* BUTTONS */
.buttons-row {
    display: block;
    /* gap: 12px; */
    width: 98%;
    /* margin-bottom: 40px; */
    grid-template-columns: repeat(4, 1fr);
    justify-self: anchor-center;
}

.btn.light {
    background: #f6f1ca !important;
    color: #000 !important;
    border: none;
    border-radius: 24px;
    font-size: 18px;
    outline: 1px black solid; outline-offset: -4px; 
    padding: 10px 35px;
}

.btn.dark {
    background: black !important;
    color: #fff !important;
    border-radius: 24px;
    font-size: 18px;
    outline: 1px rgb(24, 23, 23) solid; outline-offset: -4px; 
    padding: 10px 25px;
    border: 1px solid #f7f7f7;
}
.btn.episode{
  padding: 5px 5px; 
   color: #fff !important;
  border-radius: 4px; 
  outline: 1px solid #2A2A2B; 
  justify-content: flex-start; 
  align-items: center; 
  display: inline-flex;
  background: #2A2A2B;
  width: 100%;
}
/* PURCHASE BAR */
.purchase-box {
    width: 92.5%;
    padding: 12px 20px;
    text-align: center;
    border-radius: 40px;
    background: #f6f1ca;
    color: #000;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    justify-self: center;
}
.content-section{
  margin-top: 6%;
}
.content-section .container{
  display: flex;
    /* gap: 40px; */
    padding: 40px;
    max-width: 1400px;
    margin: auto;
}
/* LEFT IMAGE */
.left-section {
  flex: 1;
  text-align: center;
  background: #1F1F20;
  border-radius: 12px;
  margin-left: 8%;
  margin-right: 3%;
  height: 95vh;
    /* flex: 1;
    border: 1px solid #FFFFE3;
    text-align: center; */
}
.main-image {
    width: 100%;
    height: 95vh;
    border-radius: 8px;
    object-fit: contain;
    max-width: 450px;
    margin: 0px;
}
/* RIGHT CONTENT */
.right-section {
    flex: 1;
    /* border: 1px solid #FFFFE3; */
    padding: 20px;
    border-radius: 12px;
     background: #161617;
      margin-left: 3%;
      margin-right: 8%;
          height: 95vh;
    /* text-align: center; */
}
/* RESPONSIVE */
@media (max-width: 900px) {
  .left-section {
    margin-left: 0% !important;
    margin-right: 0% !important;
    border-radius: unset;
}
.right-section{
  margin-left: 0% !important;
    margin-right: 0% !important;
    border-radius: unset;
    background: black !important;
}
    .container {
        flex-direction: column;
        padding: 10px;
    }
    .video-player-con{
        width: 100% ! important;
        margin: 0% ! important;
        padding: 0% ! important;
        max-width: 100% !important;
    }
    .content-header {
        flex-direction: row;
        text-align: left;
        align-items: self-start;
        background: #0E0E0F;
        padding: 12px;
        margin-top: 10px;
    }
    .small-thumb {
        width: 115px;
        height: 130px;
    }
.content-section {
    margin-top: 18%;
}
.content-section .container {
    display: flex;
    padding: 15px;
    max-width: 400px;
    margin: auto;
}
    .buttons-row {
        justify-content: center;
        display: flex;
        gap: 10px;
    }
    .btn.light {
    background: #f6f1ca !important;
    color: #000 !important;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    outline: 1px black solid; outline-offset: -4px; 
    padding: 8px 12px;
    width: 45%;
}

.btn.dark {
    background: black !important;
    color: #fff !important;
    border-radius: 24px;
    font-size: 16px;
    outline: 1px #1c1c1c solid !important;
    outline-offset: -4px;
    padding: 8px 12px;
    width: 45%;
    /* border: none; */
}
}

/* =================================================================
   CATALOGUE PAGE  (series.html)
   ================================================================= */
.cat-page {
  background: #000;
  color: #fff;
  font-family: "DM Sans", "GeneralSans-Regular", sans-serif;
  overflow-x: hidden;
}
html:has(body.cat-page) { overflow-x: hidden; }
.cat-page .footer { margin-top: 80px; overflow: hidden; }

/* Header styles (.cat-header / .cat-logo / .cat-nav) live in style.css
   so every page can reuse them without loading series-style.css. */

/* ---- Hero ---- */
.cat-hero {
  padding: 24px 48px 36px;
  max-width: 100%;
}
.cat-breadcrumb {
  font-size: 18px;
  color: #9c9c9c;
  margin: 22px 0 64px;
  font-family: "DM Sans", sans-serif;
}
.cat-breadcrumb a {
  color: #9c9c9c;
  text-decoration: none;
}
.cat-breadcrumb a:hover { color: #d0d0d0; }
.cat-breadcrumb .sep { margin: 0 6px; color: #6a6a6a; }
.cat-breadcrumb .current {
  color: #FB6B2B;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cat-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.cat-hero-text { flex: 1 1 540px; max-width: 880px; min-width: 0; }
.cat-title {
  font-size: 50px;
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 22px;
  color: #fff;
  letter-spacing: -0.5px;
}
.cat-sub {
  font-size: 19px;
  color: #b0b0b0;
  max-width: 620px;
  line-height: 1.5;
  margin: 0;
}

/* ---- Stats ---- */
.cat-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #131314;
  border: 1px solid #1f1f20;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 1 720px;
  min-width: 0;
}
.cat-stat {
  padding: 26px 32px;
  border-right: 1px solid #1f1f20;
}
.cat-stat:last-child { border-right: 0; }
.cat-stat-label {
  font-size: 14px;
  color: #9c9c9c;
  margin: 0 0 18px;
  font-weight: 400;
}
.cat-stat-value {
  font-size: 66px;
  color: #fff;
  margin: 0;
  font-weight: 500;
  letter-spacing: -1.5px;
  line-height: 1;
}

/* ---- Filter bar ---- */
.cat-filter {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.cat-search {
  flex: 0 1 680px;
  max-width: 680px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0e0e0f;
  border: 1px solid #232324;
  border-radius: 999px;
  padding: 10px 22px;
  color: #9a9a9a;
  min-width: 280px;
}
.cat-search svg { flex-shrink: 0; color: #9a9a9a; width: 20px; height: 20px; }
.cat-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 18px;
  font-family: inherit;
}
.cat-search input::placeholder { color: #7a7a7a; }

.cat-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-left: auto;
}
.cat-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cat-control label {
  font-size: 17px;
  color: #b8b8b8;
  font-weight: 400;
}
.cat-select {
  position: relative;
}
.cat-select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #cfcfcf;
  border-bottom: 1.5px solid #cfcfcf;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.cat-select select {
  appearance: none;
  background: #0e0e0f;
  border: 1px solid #232324;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  padding: 8px 42px 8px 22px;
  cursor: pointer;
  font-family: inherit;
  min-width: 150px;
  accent-color: #FB6B2B;
  color-scheme: dark;
}
.cat-select select:focus { outline: 1px solid #444; }
.cat-select select option {
  background-color: #0e0e0f;
  color: #fff;
  padding: 8px 12px;
}
.cat-select select option:checked,
.cat-select select option:hover,
.cat-select select option:focus,
.cat-select select option:active {
  background: #FB6B2B;
  background-color: #FB6B2B !important;
  color: #fff;
  box-shadow: 0 0 10px 100px #FB6B2B inset;
  -webkit-text-fill-color: #fff;
}

.cat-reset {
  background: #0e0e0f;
  border: 1px solid #232324;
  color: #fff;
  font-size: 16px;
  margin-bottom: 0px;
  padding: 0 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  height: 44px;
  line-height: 1;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: none;
  background-image: none;
  box-shadow: none;
}
.cat-reset:hover { background: #1a1a1a; border-color: #333; }
.cat-select select {
  height: 44px;
  line-height: 1;
}

/* ---- Card grid ---- */
.cat-grid-wrap {
  padding: 36px 48px 0px;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 44px;
  align-items: stretch;
}
.cat-empty {
  color: #888;
  text-align: center;
  padding: 40px;
  font-size: 15px;
}

/* ---- Card ---- */
.cat-card {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.cat-card:hover { transform: translateY(-2px); }

.cat-thumb {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 0;
  background: #111;
  flex-shrink: 0;
}
.cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
/* Dark gradient overlay — invisible by default, fades in on hover and covers
   the bottom 50% of the banner with a transparent → black gradient. */
.cat-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.78) 100%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  z-index: 1;
}
.cat-card:hover .cat-thumb::after { opacity: 1; }
.cat-card:hover .cat-thumb img { transform: scale(1.04); }

/* Old "01" badge and "P" pill are no longer rendered — kept hidden as a safety
   net in case any cached markup still includes them. */
.ep-badge,
.card-pill { display: none !important; }

/* Streaming pill at the top-right of the poster */
.card-streaming {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 11px;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
  pointer-events: none;
}
.card-streaming-dot {
  width: 6px;
  height: 6px;
  background: #4CD964;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(76, 217, 100, 0.6);
}

.card-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #FB6B2B;
  opacity: 0;
  z-index: 2;
  transform: translateY(6px) scale(0.92);
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease, background .2s ease;
  pointer-events: none;
  box-sizing: border-box;
  box-shadow: 0 0 0 0 rgba(251, 107, 43, 0);
}
.card-play svg {
  width: 26px;
  height: 26px;
}
.cat-card:hover .card-play {
  opacity: 1;
  transform: translateY(0) scale(1);
  background: #FF7E45;
  box-shadow: 0 0 0 6px rgba(251, 107, 43, 0.18),
              0 8px 24px rgba(251, 107, 43, 0.45);
}

/* ---- Card meta — title on first line, "LANG · N EP" on second line ---- */
.cat-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 4px 0;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  flex-shrink: 0;
  box-sizing: border-box;
}
.cat-card-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  width: 100%;
  cursor: pointer;
  transition: color .2s ease;
}
.cat-card-title:hover { color: #FB6B2B; }
.cat-card-meta {
  font-size: 13px;
  color: #9a9a9a;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
/* Old span names from earlier markup — neutralised for safety */
.cat-card-lang { font-size: inherit; color: inherit; padding: 0; border: 0; }
.cat-card-eps { display: none; }

/* ---- Responsive ---- */
@media (max-width: 1400px) {
  .cat-header, .cat-hero, .cat-grid-wrap { padding-left: 40px; padding-right: 40px; }
}
@media (max-width: 1100px) {
    .cat-header, .cat-hero, .cat-grid-wrap { padding-left: 20px; padding-right: 20px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-title { font-size: 50px; }
  .cat-sub { font-size: 17px; }
  .cat-stats { flex: 1 1 100%; }
  .cat-hero-row { align-items: flex-start; }
  .cat-stat-value { font-size: 56px; }
}
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  /* Header rules live in style.css */
  .cat-hero { padding: 8px 20px 10px; }
  .cat-breadcrumb {
    margin: 6px 0 22px;
    font-size: 13px;
  }
  .cat-title { font-size: 26px; line-height: 1.2; margin-bottom: 14px; }
  .cat-sub { font-size: 13px; }

  .cat-hero-row { gap: 24px; }

  .cat-stats {
    grid-template-columns: repeat(3, 1fr);
    min-width: 0;
    width: 100%;
    border-radius: 6px;
  }
  .cat-stat { padding: 12px 10px; }
  .cat-stat-label { font-size: 10px; margin-bottom: 6px; }
  .cat-stat-value { font-size: 22px; }

  /* Filter — only the search input is visible on mobile (per design) */
  .cat-filter { gap: 0; margin-top: 22px; }
  .cat-search {
    flex: 1 1 100%;
    padding: 11px 18px;
    border-radius: 999px;
  }
  .cat-search input { font-size: 13px; }
  .cat-controls { display: none; }

  /* Grid — 2 columns */
  .cat-grid-wrap { padding: 18px 20px 60px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* Card meta stacks: Title on top, "LANG · N EP" below */
  .cat-meta {
    gap: 4px;
    padding: 10px 2px 0;
    min-height: 48px;
  }
  .cat-card-title { font-size: 14px; font-weight: 500; }
  .cat-card-meta { font-size: 11px; color: #8e8e8e; }
  /* Mobile grid keeps explicit equal columns */
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Streaming pill scales down for tight cards */
  .card-streaming { font-size: 9px; padding: 4px 8px; gap: 4px; top: 8px; right: 8px; }
  .card-streaming-dot { width: 5px; height: 5px; }

  /* Hover-only play overlay suppressed on touch */
  .card-play { display: none; }
    .cat-pagination{
      width: 50% !important;
  }
}
@media (max-width: 580px) {
  .cat-title { font-size: 26px; }
  .cat-pagination{
      width: 80% !important;
  }
  .cat-stat-label {
    font-size: 9px;
  }
}

/* =================================================================
   PAGINATION — centred to the viewport, tight spacing, no padding
   ================================================================= */
.cat-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 40px 0px 0px;
  margin: 0 auto;
  width: 20%;
  flex-wrap: wrap;
}

.cat-pag-btn {
  background: #0e0e0f;
  background-image: none;
  border: 1px solid #2a2a2a;
  color: #fff;
  padding: 0 8px;
  border-radius: 8px;
  cursor: pointer;
  min-width: 12%;
  height: 36px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.cat-pag-btn:hover:not(:disabled):not(.active) {
  background: #1a1a1a;
  border-color: #3a3a3a;
}
.cat-pag-btn.active {
  background: #FB6B2B;
  border-color: #FB6B2B;
  color: #fff;
}
.cat-pag-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.cat-pag-dots {
  color: #888;
  padding: 0 2px;
  font-size: 15px;
  user-select: none;
}

/* =================================================================
   VIDEO POPUP MODAL
   ================================================================= */
.cat-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.cat-modal[hidden] { display: none; }
.cat-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cat-modal-content {
  position: relative;
  display: grid;
  grid-template-columns: 40% 55%;
  column-gap: 15px;
  align-items: start;
  background: rgba(14, 14, 15, 0.5);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 40px 40px 36px;
  width: 90%;
  max-width: 90%;
  max-height: 88vh;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-modal-content::-webkit-scrollbar { display: none; width: 0; height: 0; }
.cat-modal-close {
  position: absolute;
  top: 10px;
  right: 5px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  background-image: none;
  border: 1px solid #333;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-shadow: none;
  box-shadow: none;
  text-transform: none;
  font-weight: 400;
  padding: 0;
}
.cat-modal-close:hover {
  background: #1a1a1a;
  border-color: #555;
}
/* Player uses the padding-top intrinsic-ratio technique so its height is
   locked to the 9:16 aspect regardless of the video element's intrinsic size.
   The width is the smaller of 320px or whatever fits inside the modal at the
   9:16 aspect — so the player can never overflow vertically. */
.cat-modal-player {
  width: 100%;
  /* Resulting height = width × 1.7778. Constraining width by viewport-height
     × 0.5625 means the resulting height equals (88vh - 80px), which fits
     exactly inside the modal's content area. */
  max-width: min(320px, calc((88vh - 90px) * 0.5625));
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  justify-self: center;
  align-self: start;
}
.cat-modal-player::before {
  content: "";
  display: block;
  padding-top: 177.78%; /* 16/9 = 1.7778 → portrait phone aspect */
}
.cat-modal-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}
.cat-modal-info {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(88vh - 80px);
  overflow: hidden;
}
.cat-modal-tags {
  font-size: 18px;
  color: #FB6B2B;
  margin: 0;
}
.cat-modal-tags .cat-modal-sep {
  color: #FB6B2B;
  padding: 0 4px;
}
.cat-modal-title {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.15;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}
.cat-modal-desc {
  font-size: 16px;
  color: #a8a8a8;
  line-height: 1.2;
  margin: 0;
  max-width: 98%;
}
/* Runtime / samples wrapper / chip — old layout, kept hidden as a safety net */
.cat-modal-runtime,
.cat-modal-samples,
.cat-modal-samples-label,
.cat-modal-samples-list,
.cat-modal-chip { display: none !important; }

/* New: tags row carries the runtime inline */
.cat-modal-runtime-tag {
  color: #FB6B2B;
}

/* New: header row — small poster thumb + title + description on the right */
.cat-modal-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 4px;
}
.cat-modal-thumb {
  width: 78px;
  height: 104px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.cat-modal-header-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cat-modal-header-text .cat-modal-title { margin-top: 0; }
.cat-modal-header-text .cat-modal-desc { margin-top: 0; }

/* New: vertical episode list — full-width rows with thumb + label + arrow */
.cat-modal-eps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.cat-ep-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 9px 16px;
  background: rgba(20, 20, 21, 0.8);
  background-image: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
  box-shadow: none;
  margin: 0;
  text-align: left;
  transition: border-color .2s ease, background .2s ease;
}
.cat-ep-row:hover {
  background: rgba(35, 35, 38, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}
.cat-ep-row.active {
  border: 2px solid #FB6B2B;
  background: rgba(20, 20, 21, 0.9);
  padding: 8px 15px;
}
.cat-ep-thumb {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.cat-ep-name {
  flex: 1;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Figtree', sans-serif;
}
.cat-ep-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FB6B2B;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding-left: 2px;
}
.cat-ep-row.active .cat-ep-arrow {
  display: inline-flex;
}

@media (max-width: 768px) {
  .cat-modal { padding: 16px; }
  .cat-modal-content {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 22px;
    padding: 56px 20px 24px;
    max-height: 92vh;
    border-radius: 14px;
    width: 96%;
    max-width: 96%;
    /* Mobile needs scroll — content is tall in single-column mode */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .cat-modal-info {
    /* drop the desktop max-height on mobile so content can flow */
    max-height: none;
    overflow: visible;
  }
  .cat-modal-tags{
    font-size: 14px;
  }
  .cat-modal-player {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  .cat-modal-info {
    padding-top: 0;
    gap: 11px;
  }
  .cat-modal-title { font-size: 20px; }
  .cat-modal-desc { font-size: 13px; }
  .cat-modal-thumb { width: 72px; height: 72px; }
  .cat-modal-header { gap: 12px; }

  /* Mobile: episodes become a single horizontal row of small "EP N" pills.
     Active = solid orange fill, no play-icon arrow. Same rule covers the home
     modal, catalogue modal, and the series-details episode list. */
  .cat-modal-eps-list,
  .sd-eps-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 0;
    max-width: 100%;
  }
  .cat-modal-eps-list::-webkit-scrollbar,
  .sd-eps-list::-webkit-scrollbar { display: none; }
  .cat-ep-row {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 14px;
    gap: 0;
    border-radius: 999px;
    justify-content: center;
  }
  .cat-ep-row.active {
    /* Orange fill + same border colour, no extra padding shift */
    background: #FB6B2B;
    border: 1px solid #FB6B2B;
    padding: 8px 14px;
  }
  .cat-ep-thumb { display: none; }
  /* Hide the play-icon arrow on every state on mobile */
  .cat-ep-arrow,
  .cat-ep-row.active .cat-ep-arrow {
    display: none !important;
  }
  /* Swap the "Episode N" text for the short "EP N" via the data-short attr */
  .cat-ep-name { font-size: 0; }
  .cat-ep-name::before {
    content: attr(data-short);
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.3px;
  }
  .cat-ep-row.active .cat-ep-name::before { color: #fff; }
}

/* =================================================================
   FONT — Figtree, weight 500 across the catalogue page
   (Placed last so it overrides any earlier font-family / font-weight)
   ================================================================= */
body.cat-page,
body.cat-page *,
body.cat-page *::before,
body.cat-page *::after {
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
}
body.cat-page input,
body.cat-page select,
body.cat-page button,
body.cat-page textarea {
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
}
/* Override the wild global `button { text-transform: uppercase }` from style.css */
body.cat-page button {
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
  background-image: none;
  box-shadow: none;
}
body.cat-page ::placeholder {
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
}

/* Stat count values use General Sans (overrides the universal Figtree rule above) */
body.cat-page .cat-stat-value {
  font-family: 'GeneralSans-Medium', 'GeneralSans-Regular', sans-serif;
  font-weight: 500;
}


/* =================================================================
   SERIES DETAILS PAGE (sd-*) — mirrors the modal layout but on a page
   ================================================================= */
body.sd-page { background: #000; }
body.sd-page .sd-main { color: #fff; }

.sd-hero {
  padding: 30px 64px 40px;
  max-width: 1500px;
  margin: 0 auto;
}
.sd-breadcrumb {
  font-size: 16px;
  color: #9c9c9c;
  margin: 14px 0 32px;
}
.sd-breadcrumb a { color: #9c9c9c; text-decoration: none; }
.sd-breadcrumb a:hover { color: #d0d0d0; }
.sd-breadcrumb .sep { margin: 0 6px; color: #6a6a6a; }
.sd-breadcrumb .current {
  color: #FB6B2B;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sd-content {
  display: grid;
  grid-template-columns: 40% 60%;
  column-gap: 56px;
  align-items: start;
}

/* Left: vertical phone-shaped player */
.sd-player {
  width: 90%;
  max-width: 342px;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border: 2px solid #1a1a1a;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  justify-self: center;
}
.sd-player::before {
  content: "";
  display: block;
  padding-top: 177.78%; /* 16/9 portrait — locks height regardless of src */
}
.sd-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

/* Right: info panel */
.sd-info {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 8px;
}
.sd-tags {
  font-size: 18px;
  color: #FB6B2B;
  margin: 0;
}
.sd-tags .sep { color: #FB6B2B; padding: 0 4px; }

.sd-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 4px;
}
.sd-thumb {
  width: 100px;
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.sd-header-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sd-title {
  font-size: 42px;
  font-weight: 500;
  line-height: 1.1;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}
.sd-desc {
  font-size: 14px;
  color: #a8a8a8;
  line-height: 1.55;
  margin: 0;
  max-width: 600px;
}
.sd-eps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  max-width: 600px;
  width: 100%;
  padding-right: 24px;
  box-sizing: border-box;
}

/* ===== View more of content ===== */
.sd-more {
  padding: 40px 64px 80px;
  max-width: 1500px;
  margin: 0 auto;
}
.sd-more-title {
  font-size: 28px;
  font-weight: 500;
  color: #fff;
  margin: 0 0 24px;
  text-align: center;
}
.sd-more-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1100px) {
  .sd-hero { padding: 20px 40px 32px; }
  .sd-more { padding: 32px 40px 60px; }
  .sd-more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sd-content { column-gap: 40px; }
  .sd-title { font-size: 36px; }
}
@media (max-width: 900px) {
  .sd-more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .sd-hero { padding: 12px 20px 28px; }
  .sd-breadcrumb { font-size: 13px; margin: 6px 0 18px; }
  .sd-content {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }
  .sd-player {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 22px;
    justify-self: stretch;
  }
  .sd-info { gap: 14px; padding-top: 0; }
  .sd-tags { font-size: 14px; }
  .sd-title { font-size: 26px; }
  .sd-desc { font-size: 13px; }
  .sd-thumb { width: 72px; height: 96px; }
  .sd-header { gap: 12px; }

  /* Override the desktop column-flex episode list to a single horizontal pill
     row, matching the catalogue/home modal mobile look. */
  .sd-eps-list {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 0 !important;
    max-width: 100% !important;
  }
  .sd-eps-list::-webkit-scrollbar { display: none; }

  .sd-more { padding: 24px 20px 60px; }
  .sd-more-title { font-size: 22px; }
  .sd-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
