/*
 * Modern redesign overrides for DramaStream-based theme.
 * Safe to disable by removing the <link> include in inc/hook.php.
 */

:root {
  --rs-bg-dark: #080d16;
  --rs-bg-soft-dark: #0f1726;
  --rs-surface-dark: #121b2d;
  --rs-surface-soft-dark: #172235;
  --rs-border-dark: rgba(130, 162, 214, 0.2);
  --rs-text-dark: #e8f0ff;
  --rs-muted-dark: #9eb2d5;
  --rs-link-dark: #8ec2ff;
  --rs-link-dark-hover: #c7e2ff;

  --rs-bg-light: #eef4ff;
  --rs-bg-soft-light: #dfeafe;
  --rs-surface-light: #ffffff;
  --rs-surface-soft-light: #f7fbff;
  --rs-border-light: rgba(52, 89, 145, 0.15);
  --rs-text-light: #13253f;
  --rs-muted-light: #4d6385;
  --rs-link-light: #2d63c8;
  --rs-link-light-hover: #143f8c;

  --rs-primary: #3b82f6;
  --rs-primary-2: #2460d4;
  --rs-accent: #2dd4bf;
  --rs-danger: #ef4444;
  --rs-radius-sm: 10px;
  --rs-radius: 14px;
  --rs-radius-lg: 18px;
  --rs-shadow: 0 12px 30px rgba(4, 11, 25, 0.28);
  --rs-shadow-soft: 0 8px 24px rgba(9, 23, 49, 0.14);
}

body.darkmode {
  --rs-bg: var(--rs-bg-dark);
  --rs-bg-soft: var(--rs-bg-soft-dark);
  --rs-surface: var(--rs-surface-dark);
  --rs-surface-soft: var(--rs-surface-soft-dark);
  --rs-border: var(--rs-border-dark);
  --rs-text: var(--rs-text-dark);
  --rs-muted: var(--rs-muted-dark);
  --rs-link: var(--rs-link-dark);
  --rs-link-hover: var(--rs-link-dark-hover);
}

body.lightmode {
  --rs-bg: var(--rs-bg-light);
  --rs-bg-soft: var(--rs-bg-soft-light);
  --rs-surface: var(--rs-surface-light);
  --rs-surface-soft: var(--rs-surface-soft-light);
  --rs-border: var(--rs-border-light);
  --rs-text: var(--rs-text-light);
  --rs-muted: var(--rs-muted-light);
  --rs-link: var(--rs-link-light);
  --rs-link-hover: var(--rs-link-light-hover);
}

body {
  background: radial-gradient(circle at 15% -10%, rgba(59, 130, 246, 0.16) 0%, transparent 34%),
    radial-gradient(circle at 85% -10%, rgba(45, 212, 191, 0.13) 0%, transparent 33%),
    var(--rs-bg);
  color: var(--rs-text);
}

a {
  color: var(--rs-link);
}

a:hover {
  color: var(--rs-link-hover);
}

#content {
  max-width: 1280px;
}

.wrapper {
  margin: 0 16px 24px;
}

.th {
  height: auto;
  min-height: 66px;
  background: color-mix(in srgb, var(--rs-surface) 92%, transparent);
  border-bottom: 1px solid var(--rs-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(4, 11, 25, 0.2);
  position: sticky;
  top: 0;
  z-index: 80;
}

.th .centernav,
#main-menu .centernav,
.blox.kln {
  max-width: 1280px;
}

.mainheader {
  margin: 14px 24px 14px 0;
}

.logos img {
  height: 38px;
}

.searchx {
  margin: 14px 20px 14px 0;
}

.searchx #form #s {
  border: 1px solid var(--rs-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--rs-surface) 85%, transparent);
  color: var(--rs-text);
  height: 38px;
  padding-left: 14px;
  padding-right: 40px;
  box-shadow: none !important;
}

.searchx #form #submit-search {
  line-height: 38px;
  right: 6px;
  color: var(--rs-muted);
}

.searchx #form #s::placeholder {
  color: var(--rs-muted);
}

.surprise {
  margin-top: 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rs-primary), var(--rs-primary-2));
  color: #fff;
}

#main-menu {
  margin: 12px 0 22px;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-lg);
  background: linear-gradient(125deg, #12223e 0%, #1c3c73 48%, #19498f 100%) !important;
  box-shadow: 0 14px 32px rgba(13, 31, 66, 0.38);
  overflow: visible;
}

#main-menu .centernav {
  padding: 0 14px;
}

#main-menu ul li {
  margin: 0 6px;
}

#main-menu ul li a {
  height: 44px;
  line-height: 44px;
  margin-top: 5px;
  margin-bottom: 5px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

#main-menu ul li a:hover,
#main-menu ul li.current-menu-item > a,
#main-menu ul li.current_page_item > a {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

#main-menu ul li ul {
  top: 50px;
  border: 1px solid rgba(162, 190, 236, 0.2);
  border-radius: 12px;
  background: rgba(8, 16, 30, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#main-menu ul li ul li a {
  border-radius: 0;
  margin: 0;
}

#main-menu .random {
  margin-top: 8px;
  margin-bottom: 8px;
  border-radius: 10px;
  line-height: 30px;
  background: rgba(255, 255, 255, 0.18);
}

#main-menu .random:hover {
  background: #fff;
  color: #0f2347;
}

#top-menu li a {
  border-radius: 999px;
  color: var(--rs-muted);
}

#top-menu li a:hover {
  color: #fff;
}

.bixbox,
#sidebar .section,
.ts-breadcrumb,
.warning,
.announ,
.item,
.meta,
#singlepisode {
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  box-shadow: var(--rs-shadow-soft);
}

.bixbox {
  overflow: hidden;
}

.releases {
  border-bottom: 1px solid var(--rs-border);
  padding: 12px 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rs-surface) 88%, transparent) 0%, transparent 100%);
}

.releases:after {
  display: none;
}

.releases h1,
.releases > h2,
.releases h3,
#sidebar .section h3,
#sidebar .section h4 {
  color: var(--rs-text);
  font-weight: 600;
  letter-spacing: 0.1px;
}

.releases .vl,
.releases.latesthome .vl {
  background: linear-gradient(135deg, var(--rs-primary), var(--rs-primary-2)) !important;
  color: #fff !important;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 22px;
  height: 22px;
}

.releases.latesthome,
.tsboxedwrap .releases.latesthome,
.darkmode .tsboxedwrap .releases.latesthome {
  background: linear-gradient(120deg, #17305d 0%, #224f98 100%) !important;
}

.releases.latesthome h3 {
  color: #fff;
}

.listupd {
  padding: 12px;
}

.bs .bsx {
  margin: 8px;
  margin-bottom: 18px;
  border-radius: var(--rs-radius);
  border: 1px solid var(--rs-border);
  background: var(--rs-surface-soft);
  box-shadow: 0 8px 22px rgba(7, 16, 34, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.bs .bsx:hover {
  transform: translateY(-4px);
  box-shadow: var(--rs-shadow);
  border-color: color-mix(in srgb, var(--rs-primary) 55%, var(--rs-border));
}

.bs .bsx .limit {
  border-radius: calc(var(--rs-radius) - 2px);
}

.bs .bsx .limit .status {
  background: linear-gradient(135deg, #d43a4b, #f04d5f);
  font-weight: 700;
}

.bs .bsx .limit .typez {
  border-radius: 8px;
  background: linear-gradient(135deg, #0f274f, #2459ab);
}

.bs .bsx .limit .bt {
  padding-top: 16px;
}

.bs .bsx .limit .bt span.epx {
  font-weight: 700;
}

.bs .bsx .limit .bt span.sb {
  background: var(--rs-accent);
  color: #04202d;
  font-weight: 700;
}

.bs .bsx .tt {
  font-size: 14px;
  font-weight: 600;
  color: var(--rs-text);
  margin-top: 10px;
}

.bs .bsx .ttt .timeago {
  color: var(--rs-muted);
  font-size: 12px;
}

/* Home cards: hide timeago under titles (all homepage card blocks) */
body.is-homepage .bs .bsx .ttt .timeago,
body.home .bs .bsx .ttt .timeago {
  display: none !important;
}

/* Home cards: tidy title block after timeago removed */
body.is-homepage .bs .bsx .ttt,
body.home .bs .bsx .ttt {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

body.is-homepage .bs .bsx .ttt .tt,
body.home .bs .bsx .ttt .tt {
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
  line-height: 1.36;
  max-height: calc(1.36em * 2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.stylesix,
.stylenine,
#sidebar .section > ul > li,
#sidebar .section .ongoingseries ul li,
.serieslist ul li,
.bxcl ul li,
.bixbox.episodedl .epwrapper .epheader,
.bixbox.episodedl .epwrapper .navimedia,
.bixbox.episodedl .epwrapper .epcontent {
  border-color: var(--rs-border);
}

.serieslist ul li .ctr,
.bigcontent .infox .genxed a,
.single-info.bixbox .infox .genxed a,
.single-info.bixbox .infox .spe span:before,
.bigcontent .infox .spe span:before,
#sidebar .section ul.season li:before {
  border-color: var(--rs-primary);
  color: var(--rs-primary);
  background: color-mix(in srgb, var(--rs-primary) 18%, transparent);
}

.bigcontent,
.single-info.bixbox {
  color: var(--rs-text);
}

.bigcontent {
  padding: 22px 20px 24px;
  padding-left: 210px;
}

.bigcontent .thumb,
.single-info.bixbox .thumb,
.bigcontent .thumb img,
.single-info.bixbox .thumb img {
  border-radius: 12px;
}

.bigcontent .thumb,
.single-info.bixbox .thumb {
  border: 1px solid var(--rs-border);
  box-shadow: 0 10px 24px rgba(10, 22, 43, 0.3);
}

.bigcontent .infox .alter,
.single-info.bixbox .infox .infolimit .alter,
.meta .year,
.bmc,
.stylesix .bsx .inf span,
.stylenine .bsx .inf span,
.serieslist ul li .leftseries span,
.blogpost .entry-header .entry-meta {
  color: var(--rs-muted);
}

.bigcontent .rt .rating,
.single-info.bixbox .infox .rating {
  background: linear-gradient(145deg, color-mix(in srgb, var(--rs-primary) 16%, var(--rs-surface)), var(--rs-surface));
  border: 1px solid var(--rs-border);
  color: var(--rs-text);
}

.bigcontent .infox .genxed a,
.single-info.bixbox .infox .genxed a {
  border-radius: 999px;
  padding: 5px 11px;
  font-weight: 500;
}

.bigcontent .infox .genxed a:hover,
.single-info.bixbox .infox .genxed a:hover {
  background: linear-gradient(135deg, var(--rs-primary), var(--rs-primary-2));
  color: #fff;
}

.naveps .nvs a,
.naveps.bignav .nvs a,
.nav_apb a,
.hpage a,
.lista a,
.bookmark,
.quickfilter .filters .filter.submit button,
.commentx #submit,
.lastend .inepcx a,
.taxindex li a {
  border-radius: var(--rs-radius-sm);
  border: 1px solid var(--rs-border);
  background: color-mix(in srgb, var(--rs-surface) 88%, transparent);
  color: var(--rs-text);
  box-shadow: none;
}

.naveps .nvsc a,
.naveps.bignav .nvs.nvsc a,
.bookmark,
.quickfilter .filters .filter.submit button,
.lastend .inepcx a,
.pagination span.page-numbers.current {
  background: linear-gradient(135deg, var(--rs-primary), var(--rs-primary-2)) !important;
  border-color: color-mix(in srgb, var(--rs-primary) 65%, transparent);
  color: #fff !important;
}

.naveps .nvs a:hover,
.naveps.bignav .nvs a:hover,
.nav_apb a:hover,
.hpage a:hover,
.lista a:hover,
.taxindex li a:hover {
  background: color-mix(in srgb, var(--rs-primary) 85%, #ffffff);
  color: #fff;
  border-color: color-mix(in srgb, var(--rs-primary) 75%, transparent);
}

/* Single episode + series detail pages */
.postbody article {
  border-radius: var(--rs-radius);
  border: 1px solid var(--rs-border);
  box-shadow: var(--rs-shadow-soft);
  overflow: hidden;
}

.postbody .item.meta {
  background: linear-gradient(140deg, #102442 0%, #193a6b 52%, #23539b 100%);
  border: 1px solid rgba(124, 169, 241, 0.42);
  box-shadow: 0 16px 34px rgba(8, 21, 45, 0.42);
}

.postbody .item.meta .lm .entry-title {
  color: #f3f7ff;
  letter-spacing: 0.1px;
  text-shadow: 0 2px 10px rgba(5, 11, 24, 0.44);
}

.postbody .item.meta .year,
.postbody .item.meta .year a {
  color: rgba(228, 238, 255, 0.86);
}

.postbody .item.meta .year a:hover {
  color: #ffffff;
}

.postbody .video-content {
  border: 1px solid rgba(112, 162, 241, 0.5);
  border-radius: var(--rs-radius-lg);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(8, 18, 39, 0.56), inset 0 0 0 1px rgba(59, 130, 246, 0.16);
  background: #04070e;
}

.postbody #embed_holder {
  background: radial-gradient(circle at 50% 0, #112747 0%, #050911 62%);
}

.postbody .video-nav {
  margin-top: 10px;
  margin-bottom: 16px;
  padding: 0;
}

.postbody select.mirror {
  border: 1px solid rgba(121, 168, 242, 0.5);
  border-radius: 10px;
  background: linear-gradient(145deg, #132a4f, #1d3f72);
  color: #ebf3ff;
  color-scheme: dark;
  box-shadow: none;
  padding: 7px 10px;
  min-width: 190px;
  font-weight: 600;
}

.postbody select.mirror option {
  background: #132a4f;
  color: #ebf3ff;
}

.postbody select.mirror option[value=""] {
  color: #d7e7ff;
}

.postbody select.mirror option:checked {
  background: #1e467f;
  color: #ffffff;
}

.postbody .iconx .icol {
  border: 1px solid rgba(126, 172, 243, 0.45);
  border-radius: 10px;
  background: linear-gradient(140deg, #17325d, #234b88);
  color: #eaf3ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.postbody .iconx .icol:hover {
  background: linear-gradient(135deg, #4f8ff7, #2b66d8);
  border-color: color-mix(in srgb, var(--rs-primary) 70%, transparent);
  color: #fff;
}

.postbody .naveps.bignav .nvs .nolink {
  border: 1px solid rgba(124, 170, 241, 0.38);
  background: linear-gradient(145deg, #102540, #18345a);
  color: rgba(214, 228, 250, 0.78);
}

.postbody .naveps.bignav .nvs a {
  border: 1px solid rgba(124, 169, 241, 0.45);
  background: linear-gradient(135deg, #153059, #25579f);
  color: #eef4ff;
  box-shadow: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.postbody .naveps.bignav .nvs.nvsc a {
  background: linear-gradient(135deg, #4f8ff7, #2b66d8) !important;
  border-color: rgba(158, 197, 255, 0.62);
  color: #ffffff !important;
}

.postbody .naveps.bignav .nvs a:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.postbody .entry-content > .bixbox.mctn {
  padding: 14px;
  background: linear-gradient(175deg, color-mix(in srgb, var(--rs-surface) 92%, #173866), color-mix(in srgb, var(--rs-surface) 94%, transparent));
}

.postbody .dlbox ul li {
  border-bottom: 1px solid var(--rs-border);
}

.postbody .dlbox ul li.head span {
  background: linear-gradient(135deg, #1c3f75, #2a62b7);
  color: #f3f8ff;
  font-weight: 600;
}

.postbody .dlbox ul li span {
  color: var(--rs-text);
}

.postbody .dlbox ul li:nth-child(even) {
  background: color-mix(in srgb, var(--rs-surface) 66%, #0f2546);
}

.postbody .dlbox ul li span a {
  color: #9fcbff;
  font-weight: 600;
}

.postbody .dlbox ul li span a:hover {
  color: #d7eaff;
}

.animefull .bigcontent .infox .spe span {
  border: 1px solid rgba(124, 170, 240, 0.34);
  border-radius: 10px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--rs-surface) 88%, #16345f), color-mix(in srgb, var(--rs-surface) 96%, transparent));
  padding: 7px 10px 7px 26px;
}

.animefull .bigcontent .infox .spe span:before {
  left: 10px;
  top: 12px;
}

.epcheck .eplister {
  margin: 12px;
  border: 1px solid rgba(126, 172, 241, 0.32);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(9, 20, 41, 0.26);
}

.epcheck .ephead {
  border-bottom: 1px solid rgba(126, 172, 241, 0.35);
  background: linear-gradient(135deg, #15315b, #225392);
  color: #eef4ff;
}

.bxcl ul li {
  border-bottom: 1px solid var(--rs-border);
}

.bxcl ul li:nth-child(odd) {
  background: color-mix(in srgb, var(--rs-surface) 68%, #102a50);
}

.bxcl ul li a {
  color: var(--rs-text);
  transition: background 0.2s ease, color 0.2s ease;
}

.bxcl ul li .epl-num {
  color: #9ec6ff;
  font-weight: 700;
}

.bxcl ul li .epl-date {
  color: var(--rs-muted);
}

.bxcl ul li:hover {
  background: linear-gradient(135deg, var(--rs-primary), var(--rs-primary-2));
  border-color: color-mix(in srgb, var(--rs-primary) 70%, transparent);
  color: #fff;
}

.bxcl ul li:hover .epl-num {
  color: #ffffff;
}

.bxcl ul li:hover .epl-date {
  color: rgba(255, 255, 255, 0.88);
}

#sidebar .section .ongoingseries ul li a .l .fas,
#sidebar .section .ongoingseries ul li a .r,
.footer-az .az-list li a,
.bloglist .blogbox .innerblog .thumb .btags {
  background: linear-gradient(135deg, var(--rs-primary), var(--rs-primary-2));
}

.bxcl ul li:hover,
#sidebar .section .ongoingseries ul li:hover,
.serieslist ul li:hover,
.taxindex li a:hover {
  background: color-mix(in srgb, var(--rs-primary) 14%, var(--rs-surface));
}

/* Sidebar hover contrast fix (Anime Populer + Anime Ongoing) */
body.darkmode #sidebar .section .serieslist ul li:not(.topone) .leftseries a:hover,
body.darkmode #sidebar .section .serieslist ul li:not(.topone):hover .leftseries h4 a,
body.darkmode #sidebar .section .serieslist ul li:not(.topone):hover .leftseries span,
body.darkmode #sidebar .section .serieslist ul li:not(.topone):hover .leftseries span a,
body.darkmode #sidebar .section .ongoingseries ul li a:hover,
body.darkmode #sidebar .section .ongoingseries ul li a:hover .l,
body.darkmode #sidebar .section .ongoingseries ul li:hover a,
body.darkmode #sidebar .section .ongoingseries ul li:hover a .l {
  color: #ecf4ff;
}

#sidebar .section .ongoingseries ul,
.bxcl ul {
  scrollbar-width: thin;
}

#sidebar .section .ongoingseries ul::-webkit-scrollbar,
.bxcl ul::-webkit-scrollbar,
#sidebar .section ul.season::-webkit-scrollbar {
  width: 8px;
}

#sidebar .section .ongoingseries ul::-webkit-scrollbar-thumb,
.bxcl ul::-webkit-scrollbar-thumb,
#sidebar .section ul.season::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--rs-primary) 70%, transparent);
  border-radius: 99px;
}

#footer .footermenu {
  background: linear-gradient(140deg, #0f1f39, #183767) !important;
  border-top: 1px solid rgba(125, 159, 217, 0.2);
}

#footer .footermenu .menu li a {
  color: #eaf2ff;
  border-radius: 9px;
}

#footer .footermenu .menu li a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.footer-az {
  background: color-mix(in srgb, var(--rs-surface) 84%, transparent);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  padding: 14px;
}

.footer-az .ftaz,
.footer-az .size-s {
  color: var(--rs-text);
}

.footer-az .az-list li a {
  border-radius: 8px;
}

.comment-list .comment-body,
#respond,
.comment-form textarea,
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url] {
  border-color: var(--rs-border);
  background: var(--rs-surface-soft);
  color: var(--rs-text);
}

.comment-form input:focus,
.comment-form textarea:focus,
input[type=text]:focus,
input[type=search]:focus,
textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--rs-primary) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rs-primary) 18%, transparent);
}

@media only screen and (max-width: 1024px) {
  #content {
    max-width: 100%;
  }

  .wrapper {
    margin-left: 12px;
    margin-right: 12px;
  }

  .bigcontent {
    padding-left: 185px;
  }

  #main-menu .centernav {
    padding: 0 10px;
  }
}

@media only screen and (max-width: 800px) {
  .th {
    position: static;
    border-radius: 0;
  }

  .mainheader {
    margin-right: 48px;
  }

  .searchx {
    margin-top: 12px;
    margin-right: 6px;
    width: calc(100% - 18px);
  }

  #main-menu {
    margin-top: 0;
    border-radius: 0 0 14px 14px;
  }

  #main-menu ul li {
    margin: 0;
  }

  #main-menu ul li a {
    border-radius: 8px;
    margin: 3px 5px;
    text-align: left;
    padding-left: 12px;
  }

  #main-menu input[type=checkbox]:checked ~ #menu-menu {
    background: rgba(6, 14, 26, 0.95);
  }

  .postbody select.mirror {
    width: 100%;
    float: none;
    margin-bottom: 8px;
  }

  .postbody .video-nav .naveps {
    width: 100%;
  }

  .epcheck .eplister {
    margin: 8px;
  }

  .epcheck .ephead .eph-title,
  .bxcl ul li .epl-title {
    padding-left: 8px;
    padding-right: 8px;
  }

  .bigcontent,
  .bigcontent.nobigcv {
    padding-left: 15px;
    min-height: 1px;
  }

  .bigcontent .thumbook {
    position: relative;
    left: 0;
    top: 0;
    width: 150px;
    margin-bottom: 12px;
  }

  #sidebar .section,
  .bixbox {
    border-radius: 12px;
  }
}

@media only screen and (max-width: 560px) {
  .wrapper {
    margin: 0 8px 16px;
  }

  .postbody .dlbox ul li,
  .postbody .dlbox ul li.head {
    display: block;
  }

  .postbody .dlbox ul li span,
  .postbody .dlbox ul li.head span {
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--rs-border);
  }

  .postbody .dlbox ul li span.e,
  .postbody .dlbox ul li.head span.e {
    border-bottom: 0;
  }

  .releases {
    padding: 10px 12px;
  }

  .listupd {
    padding: 8px;
  }

  .bs .bsx {
    margin: 6px;
    margin-bottom: 12px;
  }

  #top-menu {
    margin-right: 4px;
  }

  #top-menu li a {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/*
 * Extra safe enhancement layer (KomikCast-inspired visual rhythm, no markup/logic change)
 * Added as the last block so it can override older rules with minimal risk.
 */
:root {
  --rs-kc-stroke: rgba(136, 180, 248, 0.34);
  --rs-kc-highlight: #68a6ff;
  --rs-kc-highlight-2: #32d9c3;
  --rs-kc-panel: color-mix(in srgb, var(--rs-surface) 86%, #0d1f3d);
  --rs-kc-panel-soft: color-mix(in srgb, var(--rs-surface) 92%, #142f58);
  --rs-kc-shadow: 0 16px 38px rgba(6, 16, 34, 0.38);
}

.listupd .bs .bsx,
.quickfilter,
.serieslist ul li,
.animefull .bigcontent,
.animefull .epcheck,
.postbody .video-content,
.postbody .dlbox ul li {
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

/* Homepage section heads */
.releases.hothome,
.releases.latesthome,
.tsboxedwrap .releases.hothome,
.tsboxedwrap .releases.latesthome {
  position: relative;
  overflow: hidden;
  border-bottom: 0;
}

.releases.hothome:before,
.releases.latesthome:before {
  content: "";
  position: absolute;
  inset: auto 16px 0 16px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(104, 166, 255, 0.25), var(--rs-kc-highlight), var(--rs-kc-highlight-2));
  opacity: 0.95;
}

.releases.hothome {
  background: linear-gradient(110deg, #17315e 0%, #215097 48%, #2d5fb3 100%) !important;
}

.releases.hothome h2,
.releases.latesthome h3 {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.releases .vl {
  box-shadow: 0 8px 18px rgba(25, 78, 156, 0.36);
}

/* Homepage cards */
.listupd .bs .bsx {
  background: linear-gradient(170deg, var(--rs-kc-panel-soft), var(--rs-kc-panel));
  border: 1px solid rgba(133, 173, 238, 0.24);
  box-shadow: 0 10px 24px rgba(6, 15, 32, 0.26);
}

.listupd .bs .bsx:before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(174, 206, 255, 0.55), transparent);
  pointer-events: none;
}

.listupd .bs .bsx:hover {
  border-color: var(--rs-kc-stroke);
  box-shadow: var(--rs-kc-shadow);
  transform: translateY(-5px);
}

.listupd .bs .bsx .tt {
  font-size: 14px;
  line-height: 1.42;
}

.listupd .bs .bsx .tt a {
  color: var(--rs-text);
}

.listupd .bs .bsx .tt a:hover {
  color: #cfe3ff;
}

.listupd .bs .bsx .limit .status,
.listupd .bs .bsx .limit .typez {
  box-shadow: 0 8px 16px rgba(8, 19, 40, 0.35);
}

.listupd .bs .bsx .limit .bt span.epx,
.listupd .bs .bsx .limit .bt span.sb {
  border-radius: 9px;
}

/* Quick filter + list widgets */
.quickfilter {
  border: 1px solid rgba(133, 173, 238, 0.28);
  border-radius: 14px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--rs-surface) 90%, #132d56), color-mix(in srgb, var(--rs-surface) 96%, transparent));
  box-shadow: 0 10px 26px rgba(7, 17, 36, 0.25);
}

.quickfilter .filters .filter select,
.quickfilter .filters .filter input[type=text] {
  border-radius: 10px;
  border: 1px solid rgba(128, 169, 236, 0.38);
  background: color-mix(in srgb, var(--rs-surface) 88%, #132a4f);
  color: var(--rs-text);
}

.quickfilter .filters .filter.submit button {
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(21, 68, 142, 0.35);
}

.serieslist ul li {
  border-radius: 11px;
  border: 1px solid transparent;
}

.serieslist ul li:hover {
  border-color: rgba(131, 173, 240, 0.38);
  box-shadow: 0 10px 22px rgba(8, 18, 38, 0.24);
}

/* Series detail page */
.animefull {
  position: relative;
}

.animefull .bigcontent {
  border: 1px solid rgba(128, 170, 238, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% -25%, rgba(104, 166, 255, 0.14), transparent 42%),
    linear-gradient(165deg, color-mix(in srgb, var(--rs-surface) 91%, #112a50), color-mix(in srgb, var(--rs-surface) 96%, transparent));
  box-shadow: 0 16px 34px rgba(8, 19, 40, 0.34);
}

.animefull .bigcontent .infox h1,
.animefull .bigcontent .infox h2 {
  font-weight: 700;
  letter-spacing: 0.18px;
}

.animefull .bigcontent .thumb {
  position: relative;
  overflow: hidden;
}

.animefull .bigcontent .thumb:after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(6, 14, 28, 0.42));
  pointer-events: none;
}

.animefull .epcheck {
  border: 1px solid rgba(127, 170, 239, 0.32);
  border-radius: 14px;
  background: linear-gradient(175deg, color-mix(in srgb, var(--rs-surface) 90%, #12315e), color-mix(in srgb, var(--rs-surface) 96%, transparent));
}

.animefull .epcheck .ephead {
  box-shadow: inset 0 -1px 0 rgba(161, 193, 244, 0.24);
}

.animefull .bxcl ul li {
  position: relative;
  border-left: 3px solid transparent;
}

.animefull .bxcl ul li:hover {
  border-left-color: var(--rs-kc-highlight);
}

.animefull .bxcl ul li .epl-title {
  font-weight: 600;
}

/* Single episode page */
#singlepisode .postbody article,
.single .postbody article {
  border: 1px solid rgba(127, 170, 239, 0.34);
}

.postbody .item.meta {
  position: relative;
  overflow: hidden;
}

.postbody .item.meta:after {
  content: "";
  position: absolute;
  inset: auto -25% -38% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(111, 176, 255, 0.2) 0%, rgba(111, 176, 255, 0) 70%);
  pointer-events: none;
}

.postbody .video-content {
  position: relative;
}

.postbody .video-content:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(165, 198, 250, 0.2);
  pointer-events: none;
}

.postbody .entry-content > .bixbox.mctn {
  border: 1px solid rgba(123, 167, 238, 0.32);
  border-radius: 14px;
}

.postbody .dlbox {
  border-radius: 12px;
  overflow: hidden;
}

.postbody .dlbox ul li {
  border-left: 3px solid transparent;
}

.postbody .dlbox ul li:hover {
  border-left-color: var(--rs-kc-highlight);
  background: color-mix(in srgb, var(--rs-surface) 70%, #163a6c);
}

/* Better spacing consistency */
.bixbox + .bixbox {
  margin-top: 14px;
}

/* Mobile safety */
@media only screen and (max-width: 800px) {
  .releases.hothome:before,
  .releases.latesthome:before {
    inset: auto 12px 0 12px;
  }

  .animefull .bigcontent {
    border-radius: 12px;
  }

  .quickfilter {
    border-radius: 12px;
  }

  .listupd .bs .bsx:hover {
    transform: translateY(-2px);
  }
}

@media only screen and (max-width: 560px) {
  .listupd .bs .bsx:before {
    left: 8px;
    right: 8px;
    top: 8px;
  }

  .postbody .item.meta:after {
    width: 190px;
    height: 190px;
    inset: auto -35% -45% auto;
  }
}

/*
 * Safe Pack (KomikCast-inspired, CSS-only):
 * - refined custom scrollbar
 * - announcement typography
 * - focus-visible accessibility
 * - reduced motion safety
 */

/* 1) Scrollbar refinement (episode list + sidebar list only) */
#sidebar .section .ongoingseries ul,
#sidebar .section ul.season,
.bxcl ul,
.epcheck .eplister,
.serieslist ul {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--rs-primary) 70%, transparent) transparent;
}

#sidebar .section .ongoingseries ul::-webkit-scrollbar,
#sidebar .section ul.season::-webkit-scrollbar,
.bxcl ul::-webkit-scrollbar,
.epcheck .eplister::-webkit-scrollbar,
.serieslist ul::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

#sidebar .section .ongoingseries ul::-webkit-scrollbar-track,
#sidebar .section ul.season::-webkit-scrollbar-track,
.bxcl ul::-webkit-scrollbar-track,
.epcheck .eplister::-webkit-scrollbar-track,
.serieslist ul::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--rs-surface) 85%, transparent);
  border-radius: 99px;
}

#sidebar .section .ongoingseries ul::-webkit-scrollbar-thumb,
#sidebar .section ul.season::-webkit-scrollbar-thumb,
.bxcl ul::-webkit-scrollbar-thumb,
.epcheck .eplister::-webkit-scrollbar-thumb,
.serieslist ul::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, color-mix(in srgb, var(--rs-primary) 82%, #8fb8ff), color-mix(in srgb, var(--rs-primary-2) 88%, #b7d6ff));
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--rs-primary) 40%, transparent);
}

/* 2) Announcement/content typography polish */
.announ,
.announ p,
.announ li {
  line-height: 1.65;
}

.announ h1,
.announ h2,
.announ h3,
.announ h4 {
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: 0.12px;
}

.announ h1 {
  font-size: 1.35rem;
}

.announ h2 {
  font-size: 1.2rem;
}

.announ h3 {
  font-size: 1.05rem;
}

.announ p {
  margin: 0 0 10px;
}

.announ ul,
.announ ol {
  margin: 10px 0;
  padding-left: 20px;
}

.announ li {
  margin: 6px 0;
}

.announ blockquote {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid color-mix(in srgb, var(--rs-primary) 70%, #9ec7ff);
  background: color-mix(in srgb, var(--rs-surface) 90%, #123765);
}

.announ a {
  color: color-mix(in srgb, var(--rs-link) 86%, #a6ceff);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.announ a:hover {
  color: #d8e9ff;
}

.announ img {
  border-radius: 12px;
}

/* 3) Focus-visible for keyboard accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.naveps .nvs a:focus-visible,
.naveps.bignav .nvs a:focus-visible,
.quickfilter .filters .filter.submit button:focus-visible,
.bookmark:focus-visible,
.hpage a:focus-visible,
.lista a:focus-visible,
.taxindex li a:focus-visible,
.footer-az .az-list li a:focus-visible,
#main-menu ul li a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--rs-primary) 86%, #cce2ff);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rs-primary) 20%, transparent);
}

/* 4) Reduced motion safety */
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .listupd .bs .bsx:hover,
  .bs .bsx:hover,
  .postbody .naveps.bignav .nvs a:hover {
    transform: none !important;
  }
}

/*
 * Safe Pack Stage 2 (CSS-only):
 * - thin slider progress bar
 * - fade mask for long synopsis blocks
 */

:root {
  --rs-slider-progress-duration: 5s;
}

/* Thin progress bar for homepage hero slider */
.slidtop {
  position: relative;
}

.slidtop:before,
.slidtop:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}

.slidtop:before {
  background: color-mix(in srgb, var(--rs-primary) 24%, transparent);
  z-index: 3;
}

.slidtop:after {
  z-index: 4;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--rs-kc-highlight), var(--rs-kc-highlight-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--rs-primary) 58%, transparent);
  animation: rs-slider-progress var(--rs-slider-progress-duration) linear infinite;
}

.slidtop:hover:after {
  animation-play-state: paused;
}

@keyframes rs-slider-progress {
  0% {
    transform: scaleX(0);
    opacity: 0.95;
  }

  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Fade mask on long series synopsis box */
.bixbox.synp .entry-content {
  position: relative;
  max-height: 240px;
  overflow: hidden;
  padding-bottom: 14px;
}

.bixbox.synp .entry-content:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), color-mix(in srgb, var(--rs-surface) 85%, #102746) 70%, var(--rs-surface) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .slidtop:after {
    animation: none;
    transform: scaleX(1);
  }
}
