/* XemPhim v2.1.2 — TopMovie Visual Polish & Network Footer */

/* Shared card badges: stronger comic sticker language; quality matches the hero quality token. */
.apx-card-badge{
  border-width:2px!important;
  border-radius:8px!important;
  font-weight:900!important;
  letter-spacing:-.015em!important;
  box-shadow:2px 3px 0 rgba(4,8,15,.58),inset 0 1px 0 rgba(255,255,255,.28)!important;
}
.apx-card-badge--quality{
  color:#fff!important;
  background:linear-gradient(135deg,#6d28d9,#9561ee)!important;
  border-color:rgba(205,177,255,.88)!important;
  text-shadow:0 1px 0 rgba(39,13,75,.55)!important;
}
.apx-card-badge--language{
  color:#fff!important;
  background:linear-gradient(135deg,#165ed8,#3c8cff)!important;
  border-color:rgba(151,198,255,.9)!important;
  text-shadow:0 1px 0 rgba(8,42,100,.62)!important;
}

/* TopMovie poster metadata: badges above, production year anchored bottom-right. */
.topmovie-item--editorial .topmovie-year-badge{
  position:absolute!important;right:7px!important;bottom:7px!important;z-index:35!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-width:42px!important;height:25px!important;padding:0 8px!important;box-sizing:border-box!important;
  border:1px solid rgba(255,255,255,.28)!important;border-radius:8px!important;
  background:rgba(10,18,31,.88)!important;color:#f4f7fb!important;
  font-family:"Quicksand",sans-serif!important;font-size:10px!important;font-weight:900!important;line-height:1!important;
  box-shadow:2px 3px 0 rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.12)!important;
  pointer-events:none!important;
}

/* Navigation follows the actual poster center; JS writes --topmovie-nav-center from the first poster. */
.topmovie-slider{--topmovie-nav-center:50%;}
.topmovie-nav{
  top:var(--topmovie-nav-center)!important;transform:translateY(-50%)!important;
  width:36px!important;height:36px!important;border-radius:11px!important;
  border:1px solid rgba(255,255,255,.18)!important;background:rgba(14,22,34,.91)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.28)!important;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
}
.topmovie-nav.prev{left:-8px!important;}
.topmovie-nav.next{right:-8px!important;}

/* Rank 01–10 get distinct lively accents. 11–20 deliberately inherit the existing v2.1.1 color. */
.topmovie-item--editorial .topmovie-rank[data-rank="1"]{color:#f6ca52!important;text-shadow:0 2px 14px rgba(246,202,82,.26)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="2"]{color:#c4ddff!important;text-shadow:0 2px 12px rgba(142,190,255,.18)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="3"]{color:#e3a16f!important;text-shadow:0 2px 12px rgba(227,161,111,.18)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="4"]{color:#bd9cff!important;text-shadow:0 2px 12px rgba(164,117,255,.18)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="5"]{color:#66d9a3!important;text-shadow:0 2px 12px rgba(67,210,143,.17)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="6"]{color:#ffb45c!important;text-shadow:0 2px 12px rgba(255,170,67,.18)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="7"]{color:#5bd9e8!important;text-shadow:0 2px 12px rgba(73,207,225,.17)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="8"]{color:#f595bd!important;text-shadow:0 2px 12px rgba(241,113,171,.16)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="9"]{color:#b9e76b!important;text-shadow:0 2px 12px rgba(158,213,74,.16)!important;}
.topmovie-item--editorial .topmovie-rank[data-rank="10"]{color:#ff7d78!important;text-shadow:0 2px 12px rgba(255,91,85,.17)!important;}

/* Footer gains a sixth network link; allow the declared flex-wrap contract to work on narrow screens. */
.apx-site-footer__nav ul{flex-wrap:wrap!important;row-gap:8px!important;}

@media(max-width:520px){
  /* ~2.5 portrait posters visible on common 375–430px phones. */
  .topmovie-list{gap:10px!important;padding-inline:0!important;}
  .topmovie-item.topmovie-item--editorial{flex-basis:38%!important;width:38%!important;}
  .topmovie-item--editorial .topmovie-rank{font-size:27px!important;}
  .topmovie-item--editorial .topmovie-title{font-size:11.5px!important;}
  .topmovie-item--editorial .topmovie-meta{font-size:9.5px!important;}
  .topmovie-item--editorial .topmovie-footer{gap:6px!important;padding-inline:1px!important;}
  .topmovie-item--editorial .topmovie-year-badge{right:5px!important;bottom:5px!important;min-width:39px!important;height:23px!important;padding-inline:6px!important;font-size:9px!important;border-radius:7px!important;}
  .topmovie-nav{width:32px!important;height:32px!important;font-size:18px!important;border-radius:10px!important;}
  .topmovie-nav.prev{left:-5px!important;}
  .topmovie-nav.next{right:-5px!important;}
  .topmovie-thumb .apx-card-badges{inset:5px 5px auto!important;gap:4px!important;}
  .topmovie-thumb .apx-card-badge{height:23px!important;min-height:23px!important;padding:0 6px!important;font-size:9.5px!important;border-radius:7px!important;}
}

@media(max-width:380px){
  .topmovie-item.topmovie-item--editorial{flex-basis:39%!important;width:39%!important;}
  .topmovie-item--editorial .topmovie-rank{font-size:25px!important;}
}

@media(prefers-reduced-motion:reduce){
  .topmovie-nav{scroll-behavior:auto!important;}
}
