:root {
  color-scheme: dark;
  --space-bg: #070914;
  --space-panel: rgba(15, 17, 39, .9);
  --space-panel-raised: rgba(21, 23, 49, .96);
  --space-border: rgba(166, 145, 255, .18);
  --space-text: #f0efff;
  --space-muted: #a7aac4;
  --space-glow: rgba(112, 90, 255, .24);
  --space-cyan: var(--galaxy-cyan, #69e7ff);
  --space-purple: var(--galaxy-purple, #b78cff);
}

:root[data-theme="light"] {
  color-scheme: light;
  --space-bg: #f3f5fc;
  --space-panel: rgba(255, 255, 255, .94);
  --space-panel-raised: #fff;
  --space-border: rgba(94, 88, 161, .18);
  --space-text: #26304a;
  --space-muted: #68758b;
}

html {
  min-height: 100%;
  background: var(--space-bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, .56) 0, transparent 2px),
    radial-gradient(1px 1px at 79% 24%, rgba(188, 174, 255, .65) 0, transparent 2px),
    radial-gradient(1px 1px at 62% 72%, rgba(149, 231, 255, .55) 0, transparent 2px),
    radial-gradient(2px 2px at 91% 83%, rgba(255, 255, 255, .45) 0, transparent 3px),
    radial-gradient(ellipse at 9% 0%, rgba(100, 54, 177, .2), transparent 34%),
    radial-gradient(ellipse at 93% 20%, rgba(21, 105, 150, .14), transparent 32%),
    linear-gradient(180deg, #090b1b 0%, #080a16 48%, #0b0b1a 100%) !important;
  background-attachment: fixed !important;
  color: var(--space-text);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(ellipse at 9% 0%, rgba(143, 111, 226, .12), transparent 36%),
    radial-gradient(ellipse at 94% 18%, rgba(59, 174, 211, .1), transparent 34%),
    linear-gradient(180deg, #f8f8ff 0%, #f3f5fc 54%, #f5f8fc 100%) !important;
  color: #30384b;
}

#wrapper {
  background: transparent;
}

#header {
  position: relative;
  z-index: 31;
  border-bottom: 1px solid rgba(151, 129, 228, .24);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(127, 75, 211, .2), transparent 36%),
    linear-gradient(105deg, rgba(8, 10, 25, .98), rgba(17, 16, 43, .97) 55%, rgba(9, 20, 37, .98));
  box-shadow: 0 12px 34px rgba(2, 4, 17, .42);
}

body #nav {
  height: auto;
  min-height: 45px;
}

body #header > .container {
  width: min(1240px, calc(100% - 40px));
  min-height: 82px;
  gap: 22px;
}

#header #logo a {
  color: #fff;
  font-size: 20px;
  letter-spacing: .07em;
  text-shadow: 0 0 22px rgba(183, 140, 255, .58);
}

#header #logo a:not(.site-logo-image) {
  position: relative;
}

#header #logo a:not(.site-logo-image)::before {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 9px 2px 0;
  border: 2px solid var(--space-cyan);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(105, 231, 255, .7), inset 0 0 7px rgba(105, 231, 255, .45);
  content: "";
  vertical-align: middle;
}

#header #logo a.site-logo-image img {
  border-radius: 14px;
  filter: drop-shadow(0 0 12px rgba(105, 231, 255, .24));
}

#header #search .keyword {
  height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(166, 145, 255, .24);
  border-radius: 999px;
  background: rgba(5, 7, 22, .76);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

#header #search .keyword:focus {
  border-color: rgba(105, 231, 255, .68);
  box-shadow: 0 0 0 4px rgba(105, 231, 255, .09), 0 0 26px rgba(105, 231, 255, .12);
}

#header #search .submit {
  flex-basis: 46px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #a45bff, #526dff 55%, #28b9da);
  box-shadow: 0 5px 20px rgba(111, 89, 255, .3);
}

#header #sign {
  gap: 8px 10px;
}

#header #sign > a,
#header #sign > .links a,
#header #sign .login > a,
#header #sign > form > a,
#header #sign > form > button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

#header #sign > .links:first-of-type a,
#header #sign > form > .premium-account-link {
  border-color: rgba(183, 140, 255, .22);
  background: rgba(143, 82, 223, .12);
  color: #eadbff;
}

#header #sign > .login > a,
#header #sign > form > #logout {
  border-color: rgba(105, 231, 255, .25);
  background: linear-gradient(120deg, rgba(105, 71, 183, .8), rgba(35, 122, 159, .76));
  color: #fff;
}

#header #sign a:hover,
#header #sign button:hover {
  transform: translateY(-1px);
  border-color: rgba(105, 231, 255, .54);
}

#nav {
  position: relative;
  z-index: 30;
  border-top: 1px solid rgba(255, 255, 255, .035);
  border-bottom: 1px solid rgba(105, 231, 255, .16);
  background: rgba(11, 12, 31, .94);
  box-shadow: 0 8px 26px rgba(2, 4, 17, .22);
  backdrop-filter: blur(14px);
}

#nav .container,
#nav .menu.container {
  width: min(1240px, calc(100% - 40px));
}

#nav .menu > li > a {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #d7d4ee;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
  transition: color .18s ease, background .18s ease;
}

#nav .menu > li.home > a {
  position: relative;
  display: grid;
  width: 46px;
  padding: 0;
  place-items: center;
  background: none !important;
  color: var(--space-cyan);
}

#nav .menu > li.home > a::before {
  content: "⌂";
  font-size: 20px;
  line-height: 1;
}

#nav .menu > li:hover,
#nav .menu > li:focus-within {
  background: rgba(115, 82, 188, .17);
}

#nav .menu > li:hover > a,
#nav .menu > li:focus-within > a {
  color: var(--space-cyan);
}

#nav .sub-menu {
  padding: 7px;
  border: 1px solid var(--space-border);
  border-radius: 0 0 14px 14px;
  background: rgba(13, 14, 34, .98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .48), 0 0 24px rgba(112, 90, 255, .1);
}

#nav .sub-menu li a {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  color: #d8d5ee;
}

#nav .sub-menu li a:hover {
  background: rgba(105, 231, 255, .09);
  color: var(--space-cyan);
}

#nav2 {
  border-bottom: 1px solid rgba(166, 145, 255, .12);
  background: linear-gradient(90deg, rgba(32, 21, 58, .62), rgba(13, 31, 48, .55), rgba(32, 21, 58, .62));
}

#nav2 .title {
  color: #c9c4e7;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .025em;
}

#body-wrap {
  width: min(1240px, calc(100% - 40px));
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 22px;
  padding-top: 26px;
}

#movie-hot,
#body-wrap .block,
#chart,
#page-list,
#page-info,
#movie-display,
#detail,
#server-list {
  border: 1px solid var(--space-border);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(94, 66, 166, .11), transparent 40%),
    linear-gradient(145deg, rgba(17, 18, 42, .94), rgba(10, 12, 28, .96));
  box-shadow: 0 16px 42px rgba(2, 4, 17, .28), inset 0 1px rgba(255, 255, 255, .035);
}

#movie-hot {
  padding: 17px 18px 18px;
}

#movie-hot > .title,
.block .blocktitle .title,
#movie-recommend .tab,
#movie-update .blocktitle .title {
  color: var(--space-text);
}

#movie-hot > .title,
.block .blocktitle .title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .025em;
}

#movie-hot .listfilm li,
#content ul.list-film > li .inner {
  border: 1px solid rgba(166, 145, 255, .17);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(32, 30, 65, .95), rgba(13, 16, 36, .98));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

#movie-hot .listfilm li:hover,
#content ul.list-film > li .inner:hover {
  transform: translateY(-4px);
  border-color: rgba(105, 231, 255, .45);
  box-shadow: 0 14px 30px rgba(1, 4, 17, .4), 0 0 22px rgba(105, 231, 255, .1);
}

#movie-hot .listfilm li a.movie-hot-link img,
#content ul.list-film > li img {
  border-radius: 9px;
}

#movie-hot .listfilm .overlay,
#content ul.list-film li .info {
  background: linear-gradient(0deg, rgba(7, 8, 22, .98), rgba(11, 12, 29, .72));
}

#movie-hot .status,
#content ul.list-film li .status {
  border: 1px solid rgba(105, 231, 255, .25);
  border-radius: 999px;
  background: rgba(12, 21, 43, .88);
  color: #a8edff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

#body-wrap .block {
  overflow: hidden;
  margin-bottom: 18px;
}

.block .blocktitle,
.breadcrumbs {
  border-bottom: 1px solid rgba(166, 145, 255, .14);
  background: linear-gradient(100deg, rgba(75, 49, 132, .3), rgba(29, 86, 113, .16) 58%, rgba(14, 15, 35, .1));
}

.block .blocktitle {
  min-height: 48px;
  padding: 11px 16px;
}

.block .blocktitle .title,
.blocktitle h2,
.breadcrumbs .item,
.breadcrumbs .item a {
  color: #e8e4ff;
}

#content ul.list-film {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

#content ul.list-film > li .inner {
  position: relative;
  padding: 9px;
}

#content ul.list-film > li img {
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

#content ul.list-film li .info {
  border-radius: 0 0 9px 9px;
}

#content ul.list-film li .name a,
#movie-hot .listfilm .name a {
  color: #f3efff;
}

#content ul.list-film li .name a:hover,
#movie-hot .listfilm .name a:hover {
  color: var(--space-cyan);
}

#content ul.list-film li .name2,
#chart .views {
  color: var(--space-muted);
}

#sidebar .block {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--space-border);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(17, 18, 42, .94), rgba(10, 12, 28, .96));
  box-shadow: 0 12px 32px rgba(2, 4, 17, .24);
}

#chart .tabs .tab {
  border-radius: 999px;
}

#body-wrap a {
  transition: color .18s ease;
}

#body-wrap input,
#body-wrap select,
#body-wrap textarea,
#sign .login-form .input {
  min-height: 40px;
  border: 1px solid rgba(166, 145, 255, .24);
  border-radius: 9px;
  background: rgba(7, 9, 25, .84);
  color: var(--space-text);
}

#body-wrap input:focus,
#body-wrap select:focus,
#body-wrap textarea:focus,
#sign .login-form .input:focus {
  border-color: rgba(105, 231, 255, .7);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(105, 231, 255, .1);
}

button,
.theme-toggle {
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

#body-wrap button:hover,
#body-wrap .btn:hover,
.theme-toggle:hover {
  filter: brightness(1.12);
}

.theme-toggle {
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  border-color: rgba(166, 145, 255, .3);
  border-radius: 999px;
  background: rgba(28, 25, 57, .78);
  color: #e6deff;
  font-size: 12px;
  font-weight: 700;
}

#page-info .info .poster img {
  border: 1px solid rgba(166, 145, 255, .24);
  border-radius: 14px;
}

#movie-display iframe,
#movie-display .episode-video {
  border: 1px solid rgba(105, 231, 255, .24);
  border-radius: 14px;
}

#footer {
  margin-top: 58px;
  border-top: 1px solid rgba(166, 145, 255, .2);
  background:
    radial-gradient(ellipse at 14% 0%, rgba(98, 54, 166, .2), transparent 38%),
    radial-gradient(ellipse at 90% 30%, rgba(18, 92, 130, .14), transparent 38%),
    linear-gradient(120deg, #090b1a, #14112b 54%, #091723);
}

#footer .container {
  width: min(1180px, calc(100% - 40px));
}

#footer .footer-brand {
  color: #f5f2ff;
  text-shadow: 0 0 22px rgba(105, 231, 255, .24);
}

#footer #info {
  border-color: rgba(166, 145, 255, .17);
  border-radius: 16px;
  background: rgba(9, 11, 28, .58);
}

#footer .footer-zalo {
  border-radius: 999px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--space-cyan);
  outline-offset: 3px;
}

::selection {
  background: rgba(139, 94, 246, .55);
  color: #fff;
}

@media (min-width: 768px) {
  #nav {
    position: sticky;
    top: 0;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  #body-wrap {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

@media (max-width: 767px) {
  #footer,
  #footer .container,
  #footer #info,
  #footer .footer-intro,
  #footer .footer-bottom {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #footer .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #footer #info {
    grid-template-columns: minmax(0, 1fr);
  }

  #footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    overflow-wrap: anywhere;
  }

  #footer .footer-bottom span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  #header .container {
    width: calc(100% - 24px);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 10px 0 12px;
  }

  body #header #logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  body #header #search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body #header #sign {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
  }

  body #header #sign > .links,
  body #header #sign > .login {
    position: static;
    float: none;
    width: auto;
    margin: 0;
  }

  body #header #sign > .links a,
  body #header #sign > .login > a {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  body #header #sign .theme-toggle {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    overflow: hidden;
    padding: 0;
    font-size: 0;
  }

  body #header #sign .theme-toggle::before {
    content: "☾";
    font-size: 20px;
  }

  body #header #sign > .links:first-of-type,
  body #header #sign > form > a:not(.premium-account-link):not(.admin-link),
  body #header #sign > form > .account-greeting {
    display: none;
  }

  #nav .menu.container {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  #nav .menu.container::-webkit-scrollbar {
    display: none;
  }

  body #nav .menu > li,
  body #nav .menu > li.home {
    position: relative;
    display: block;
    flex: 0 0 auto;
    float: none;
    width: auto;
    padding: 0;
    background: transparent;
  }

  body #nav .menu > li > a {
    display: flex;
    width: auto;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body #nav .menu > li.home > a {
    width: 42px;
    padding: 0;
  }

  #body-wrap {
    width: calc(100% - 24px);
    grid-template-areas:
      "featured"
      "content"
      "sidebar";
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding-top: 16px;
  }

  #movie-hot,
  #body-wrap .block,
  #page-list,
  #page-info,
  #movie-display {
    border-radius: 13px;
  }

  #content ul.list-film {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 11px;
  }

  #content ul.list-film > li .inner {
    padding: 6px;
    border-radius: 10px;
  }

  #footer {
    margin-top: 38px;
    padding-top: 28px;
  }

  #footer .container {
    width: calc(100% - 28px);
  }
}

@media (max-width: 480px) {
  #content ul.list-film {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #nav2 {
    display: block;
  }

  #footer .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #footer #info {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }

  #footer .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 414px) {
  body #header > .container {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: auto auto;
  }

  body #header #logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    text-align: left;
  }

  body #header #logo a:not(.site-logo-image) {
    font-size: 16px;
    letter-spacing: .03em;
    white-space: nowrap;
  }

  body #header #search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body #header .container #sign {
    display: flex !important;
    width: auto !important;
    max-width: 100%;
    grid-area: 1 / 2;
    grid-template-columns: none;
    grid-template-rows: none;
    justify-self: end;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  body #header .container #sign > .theme-toggle,
  body #header .container #sign > .links,
  body #header .container #sign > .login {
    grid-area: auto;
  }

  body #header .container #sign > .links:last-of-type a {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0;
  }

  body #header .container #sign > .links:last-of-type a::after {
    content: "Đăng ký";
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================================
   TOAN BO THIET BI & CAP NHAT GIAO DIEN (RESPONSIVE & MODERN UI 2026)
   ========================================================================== */

/* 1. Global Box Model & Overflow Prevention */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

#body-wrap {
  width: min(1360px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
  padding: 16px 0 32px !important;
  box-sizing: border-box !important;
}

/* 2. Header & Navigation Overhaul */
#header {
  position: relative;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(9, 11, 26, 0.94) !important;
  border-bottom: 1px solid rgba(166, 145, 255, 0.16) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
}

:root[data-theme="light"] #header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom-color: rgba(94, 88, 161, 0.15) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

body #header > .container {
  width: min(1360px, calc(100% - 32px)) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px 18px !important;
  min-height: 66px !important;
  padding: 10px 0 !important;
}

#header #logo a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 22px !important;
  font-weight: 850 !important;
  color: #fff !important;
  text-decoration: none !important;
  letter-spacing: 0.04em !important;
  background: linear-gradient(135deg, #ffffff 40%, var(--space-cyan, #00d2ff)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

:root[data-theme="light"] #header #logo a {
  background: linear-gradient(135deg, #1a202c 40%, #0072ff) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Modern Search Bar */
#header #search {
  flex: 1 1 260px !important;
  max-width: 440px !important;
  min-width: 200px !important;
}

#header #search form {
  position: relative !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
}

#header #search input.keyword {
  width: 100% !important;
  height: 40px !important;
  padding: 0 42px 0 16px !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(166, 145, 255, 0.22) !important;
  color: #fff !important;
  font-size: 13px !important;
  transition: all 0.25s ease !important;
  outline: none !important;
}

:root[data-theme="light"] #header #search input.keyword {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #1a202c !important;
}

#header #search input.keyword:focus {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: var(--space-cyan, #00d2ff) !important;
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.35) !important;
}

#header #search button.submit {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 30px !important;
  height: 30px !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--space-cyan, #00d2ff) !important;
}

#header #search button.submit::after {
  content: "🔍";
  font-size: 13px;
}

/* User & VIP Links */
#header #sign {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.theme-toggle {
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(166, 145, 255, 0.22) !important;
  color: var(--space-text, #fff) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: var(--space-cyan, #00d2ff) !important;
  color: var(--space-cyan, #00d2ff) !important;
}

#header #sign .links a[href="premium"],
.premium-account-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
  color: #1a1000 !important;
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(255, 180, 0, 0.4) !important;
  transition: all 0.2s ease !important;
}

#header #sign .links a[href="premium"]:hover,
.premium-account-link:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(255, 180, 0, 0.6) !important;
}

/* Navigation Menu */
#nav {
  position: relative !important;
  z-index: 40 !important;
  backdrop-filter: blur(12px) !important;
  background: rgba(14, 16, 38, 0.95) !important;
  border-bottom: 1px solid rgba(166, 145, 255, 0.12) !important;
}

:root[data-theme="light"] #nav {
  background: rgba(245, 247, 255, 0.96) !important;
  border-bottom-color: rgba(94, 88, 161, 0.12) !important;
}

#nav .nav-menu-scroll {
  width: 100%;
}

body #nav .menu > li > a {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 10px 16px !important;
  color: #c9c7eb !important;
  transition: all 0.2s ease !important;
  border-radius: 8px !important;
}

body #nav .menu > li > a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

:root[data-theme="light"] body #nav .menu > li > a {
  color: #4a5568 !important;
}

:root[data-theme="light"] body #nav .menu > li > a:hover {
  color: #1a202c !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

/* Submenu Dropdown Popups */
@media (min-width: 768px) {
  #nav .menu > li > .sub-menu {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(130px, 1fr)) !important;
    gap: 4px !important;
    width: 290px !important;
    background: rgba(13, 15, 36, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(166, 145, 255, 0.25) !important;
    border-radius: 12px !important;
    padding: 10px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  #nav .menu > li:hover > .sub-menu,
  #nav .menu > li:focus-within > .sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }
}

/* 3. Movie Cards (.list-film) Modernization */
#content ul.list-film {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  padding: 14px 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

#content ul.list-film > li {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.list-film li .inner {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  background: linear-gradient(165deg, rgba(28, 30, 60, 0.95), rgba(14, 16, 36, 0.98)) !important;
  border: 1px solid rgba(166, 145, 255, 0.16) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease !important;
  padding: 8px !important;
  display: flex !important;
  flex-direction: column !important;
}

.list-film li .inner:hover {
  transform: translateY(-5px) scale(1.02) !important;
  border-color: rgba(0, 210, 255, 0.45) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 16px rgba(0, 210, 255, 0.2) !important;
}

:root[data-theme="light"] .list-film li .inner {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

:root[data-theme="light"] .list-film li .inner:hover {
  border-color: #3182ce !important;
  box-shadow: 0 8px 24px rgba(49, 130, 206, 0.2) !important;
}

.list-film li .inner a img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 3 !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  display: block !important;
  transition: transform 0.35s ease !important;
}

.list-film li .inner:hover a img {
  transform: scale(1.04) !important;
}

/* Movie Status Badges */
.list-film li .status {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: var(--space-cyan, #00d2ff) !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
  z-index: 2 !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
}

/* Movie Card Titles */
.list-film li .info {
  margin-top: 8px !important;
  padding: 2px 4px !important;
}

.list-film li .name a {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #fff !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

:root[data-theme="light"] .list-film li .name a {
  color: #1a202c !important;
}

.list-film li .inner:hover .name a {
  color: var(--space-cyan, #00d2ff) !important;
}

:root[data-theme="light"] .list-film li .inner:hover .name a {
  color: #0072ff !important;
}

.list-film li .name2 {
  font-size: 11px !important;
  color: var(--space-muted, #9da2c4) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-top: 3px !important;
  font-style: italic !important;
}

/* 4. Hot Movie Slider (#movie-hot) Modernization */
#movie-hot {
  border-radius: 14px !important;
  background: var(--space-panel, rgba(15, 17, 39, 0.92)) !important;
  border: 1px solid var(--space-border, rgba(166, 145, 255, 0.2)) !important;
  padding: 14px 16px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

#movie-hot .listfilm li.item {
  padding: 4px;
}

#movie-hot .listfilm li .movie-hot-link img {
  aspect-ratio: 2 / 3 !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  border: 1px solid rgba(166, 145, 255, 0.18) !important;
}

#movie-hot .overlay {
  border-radius: 0 0 10px 10px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, transparent 100%) !important;
}

#movie-hot > .prev,
#movie-hot > .next {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(14, 16, 38, 0.85) !important;
  border: 1px solid rgba(166, 145, 255, 0.3) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

#movie-hot > .prev:hover,
#movie-hot > .next:hover {
  background: var(--space-cyan, #00d2ff) !important;
  color: #000 !important;
  transform: scale(1.1) !important;
}

/* 5. Detail Page (#page-info) Modernization */
#page-info {
  background: var(--space-panel, rgba(15, 17, 39, 0.92)) !important;
  border: 1px solid var(--space-border, rgba(166, 145, 255, 0.2)) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3) !important;
  padding: 18px !important;
  box-sizing: border-box !important;
}

#page-info .info {
  display: grid !important;
  grid-template-columns: 190px minmax(0, 1fr) !important;
  gap: 18px 24px !important;
  background: transparent !important;
  min-height: 0 !important;
}

#page-info .info .poster {
  position: static !important;
  width: 100% !important;
  grid-column: 1 !important;
  grid-row: 1 / span 3 !important;
}

#page-info .info .poster img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 3 !important;
  border-radius: 12px !important;
  border: 2px solid rgba(166, 145, 255, 0.25) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
  object-fit: cover !important;
}

#page-info .info > .title {
  grid-column: 2 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--space-cyan, #00d2ff) !important;
  line-height: 1.3 !important;
}

#page-info .info .name2 {
  grid-column: 2 !important;
  margin-top: 4px !important;
  padding: 0 !important;
  color: var(--space-muted, #a7aac4) !important;
  font-size: 13px !important;
}

#page-info .info .fr {
  margin-left: 0 !important;
  float: none !important;
}

#page-info .info .dinfo {
  grid-column: 2 !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(166, 145, 255, 0.15) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px 16px !important;
}

#page-info .info .dinfo .col1,
#page-info .info .dinfo .col2 {
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
}

#page-info .info .dinfo ul {
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

#page-info .info .dinfo ul li {
  margin-bottom: 6px !important;
  font-size: 12.5px !important;
  color: #c9c7eb !important;
}

#page-info .info .dinfo ul li strong,
#page-info .info .dinfo ul li span.status1 {
  color: var(--space-cyan, #00d2ff) !important;
  font-weight: 700 !important;
}

#page-info .info .groups-btn {
  grid-column: 2 !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 6px !important;
}

#page-info .btn-watch {
  background: linear-gradient(135deg, #0072ff, #00c6ff) !important;
  color: #fff !important;
  width: auto !important;
  min-width: 140px !important;
  height: 44px !important;
  padding: 0 24px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 114, 255, 0.4) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  float: none !important;
  margin: 0 !important;
}

#page-info .btn-watch::before {
  content: "▶";
  font-size: 13px;
}

#page-info .btn-watch::after {
  content: "Xem Phim";
  margin-left: 6px;
}

#page-info .btn-watch:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 114, 255, 0.6) !important;
}

/* 6. Watch Page Modernization */
.video-player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(166, 145, 255, 0.2);
}

.video-player-frame video,
.video-player-frame iframe {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

#detail fieldset.watch-contact {
  border: 1px solid rgba(166, 145, 255, 0.2) !important;
  border-radius: 12px !important;
  background: rgba(14, 16, 36, 0.8) !important;
  padding: 14px 18px !important;
  margin: 14px 0 !important;
}

#detail fieldset.watch-contact legend {
  width: auto !important;
  padding: 4px 12px !important;
  border: 1px solid rgba(0, 210, 255, 0.3) !important;
  border-radius: 6px !important;
  background: rgba(0, 210, 255, 0.12) !important;
  color: var(--space-cyan, #00d2ff) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

#detail fieldset.watch-contact ul {
  padding-left: 18px !important;
  margin: 8px 0 0 !important;
  font-size: 12.5px !important;
  color: #c9c7eb !important;
  line-height: 1.6 !important;
}

/* 7. Responsive Breakpoints Across All Devices */

/* TABLET & IPAD (768px - 1100px) */
@media (min-width: 768px) and (max-width: 1100px) {
  #content ul.list-film {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body #header > .container {
    width: calc(100% - 28px) !important;
  }

  #body-wrap {
    width: calc(100% - 28px) !important;
    grid-template-columns: minmax(0, 1fr) 240px !important;
    gap: 16px !important;
  }
}

/* TABLET PORTRAIT & MOBILE LANDSCAPE (521px - 767px) */
@media (min-width: 521px) and (max-width: 767px) {
  #content ul.list-film {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px 0 !important;
  }

  body #header > .container {
    width: calc(100% - 20px) !important;
  }

  #header #search {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    order: 3;
  }

  #page-info .info {
    grid-template-columns: 140px minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  #page-info .info .dinfo {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* MOBILE PHONES (<= 520px) */
@media (max-width: 520px) {
  #body-wrap {
    width: calc(100% - 16px) !important;
    padding: 10px 0 24px !important;
    gap: 12px !important;
  }

  body #header > .container {
    width: calc(100% - 16px) !important;
    padding: 8px 0 !important;
    gap: 8px !important;
  }

  #header #search {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    order: 3;
    margin-top: 4px;
  }

  #header #search input.keyword {
    height: 36px !important;
    font-size: 12px !important;
  }

  #header #sign {
    gap: 5px !important;
  }

  .theme-toggle {
    padding: 4px 8px !important;
    font-size: 10px !important;
  }

  #header #sign .links a[href="premium"],
  .premium-account-link {
    padding: 4px 10px !important;
    font-size: 10.5px !important;
  }

  /* 2-Column Movie Grid on Mobile */
  #content ul.list-film,
  .galaxy-film-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    padding: 6px 0 !important;
  }

  .list-film li .inner {
    padding: 6px !important;
  }

  .list-film li .name a {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .list-film li .status {
    top: 9px !important;
    right: 9px !important;
    font-size: 8.5px !important;
    padding: 2px 5px !important;
  }

  /* Mobile Detail Page */
  #page-info {
    padding: 12px !important;
  }

  #page-info .info {
    grid-template-columns: 100px minmax(0, 1fr) !important;
    gap: 10px 12px !important;
  }

  #page-info .info .poster {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }

  #page-info .info > .title {
    font-size: 16px !important;
  }

  #page-info .info .dinfo {
    grid-column: 1 / -1 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 8px 10px !important;
    gap: 4px !important;
  }

  #page-info .info .groups-btn {
    grid-column: 1 / -1 !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  #page-info .btn-watch,
  #page-info .btn-watch-latest {
    width: 100% !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  /* Mobile Navigation Submenu Popup */
  #nav .menu > li > .sub-menu {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 70vh !important;
    border-radius: 16px 16px 0 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 16px 14px 24px !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6) !important;
    z-index: 9999 !important;
  }

  #nav .menu > li > .sub-menu > li > a {
    padding: 9px 12px !important;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 12.5px !important;
    text-align: center;
  }
}

/* 8. Extra Small Phones (<= 360px) */
@media (max-width: 360px) {
  #content ul.list-film {
    gap: 6px !important;
  }

  #page-info .info {
    grid-template-columns: 85px minmax(0, 1fr) !important;
  }

  #page-info .info > .title {
    font-size: 14px !important;
  }
}

