* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8f9fa;
  color: #212529;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

p {
  line-height: 1.7;
}

.container-custom {
  width: min(100% - 2rem, 88rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #212529;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.site-logo__mark {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 0.7rem;
  background: #486581;
  color: #ffffff;
  font-size: 0.85rem;
  box-shadow: 0 8px 20px rgba(72, 101, 129, 0.22);
}

.site-logo:hover .site-logo__mark {
  background: #334e68;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  color: #495057;
  font-weight: 500;
}

.main-nav > a,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.45rem 0;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.nav-dropdown:hover > button {
  color: #486581;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  display: grid;
  min-width: 12rem;
  padding: 0.55rem;
  border: 1px solid #e9ecef;
  border-radius: 0.9rem;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.4rem);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown__menu a {
  padding: 0.65rem 0.75rem;
  border-radius: 0.6rem;
  color: #495057;
}

.nav-dropdown__menu a:hover {
  background: #f8f9fa;
  color: #486581;
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 18rem;
  border: 1px solid #dee2e6;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #ffffff;
}

.header-search input,
.mobile-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0.72rem 0.9rem;
  background: transparent;
  color: #212529;
}

.header-search button,
.mobile-search button {
  border: 0;
  background: #486581;
  color: #ffffff;
  padding: 0.72rem 1rem;
  font-weight: 600;
}

.mobile-menu-toggle {
  display: none;
  border: 0;
  border-radius: 0.7rem;
  background: #f1f3f5;
  color: #212529;
  padding: 0.55rem 0.75rem;
  font-size: 1.2rem;
}

.mobile-menu {
  display: none;
  border-top: 1px solid #e9ecef;
  padding: 1rem;
  background: #ffffff;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.mobile-menu nav a {
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  color: #495057;
}

.mobile-menu nav a:hover {
  background: #f1f3f5;
  color: #486581;
}

.mobile-search {
  display: flex;
  border: 1px solid #dee2e6;
  border-radius: 0.8rem;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  height: clamp(34rem, 78vh, 48rem);
  overflow: hidden;
  background: #212529;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  background-image: linear-gradient(to top, rgba(33, 37, 41, 1), rgba(33, 37, 41, 0.58), rgba(33, 37, 41, 0.15)), var(--hero-image);
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(4rem, 10vw, 7rem);
  color: #ffffff;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: #fb923c;
  font-weight: 650;
}

.hero-slide h1,
.hero-slide h2 {
  max-width: 58rem;
  margin-bottom: 1.2rem;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.hero-slide p {
  max-width: 48rem;
  margin-bottom: 2rem;
  color: #e9ecef;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  border: 0;
  border-radius: 0.72rem;
  padding: 0.7rem 1.35rem;
  font-weight: 650;
  transition: 0.2s ease;
}

.btn-primary {
  background: #486581;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(72, 101, 129, 0.25);
}

.btn-primary:hover {
  background: #334e68;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-dots {
  position: absolute;
  right: max(1rem, calc((100vw - 88rem) / 2));
  bottom: 3rem;
  z-index: 4;
  display: flex;
  gap: 0.55rem;
}

.hero-dots button {
  width: 0.75rem;
  height: 0.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  padding: 0;
}

.hero-dots button.is-active {
  width: 2rem;
  background: #fb923c;
}

.section {
  padding-block: clamp(3.5rem, 7vw, 5rem);
}

.section--white {
  background: #ffffff;
}

.section--mist {
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin-bottom: 0;
  color: #212529;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 44rem;
  margin: 0.45rem 0 0;
  color: #6c757d;
}

.section-more {
  color: #486581;
  font-weight: 650;
  white-space: nowrap;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.movie-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.movie-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e9ecef;
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-card__poster img {
  transform: scale(1.05);
}

.movie-card__year {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  border-radius: 999px;
  background: rgba(33, 37, 41, 0.76);
  color: #ffffff;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.movie-card__body {
  padding: 1rem;
}

.movie-card__title {
  display: -webkit-box;
  min-height: 3rem;
  margin-bottom: 0.55rem;
  overflow: hidden;
  color: #212529;
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card__title-link:hover .movie-card__title {
  color: #486581;
}

.movie-card__text {
  display: -webkit-box;
  min-height: 3.1rem;
  margin-bottom: 0.8rem;
  overflow: hidden;
  color: #6c757d;
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.7rem;
  color: #868e96;
  font-size: 0.83rem;
}

.movie-card__meta a {
  color: #486581;
  font-weight: 650;
}

.movie-card__tags {
  overflow: hidden;
  color: #3d663d;
  font-size: 0.82rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.category-tile {
  min-height: 11rem;
  border-radius: 1rem;
  padding: 1.3rem;
  background: linear-gradient(135deg, #ffffff, #f1f3f5);
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-2px);
  border-color: #bcccdc;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

.category-tile strong {
  display: block;
  margin-bottom: 0.6rem;
  color: #212529;
  font-size: 1.18rem;
}

.category-tile p {
  margin-bottom: 0;
  color: #6c757d;
  font-size: 0.94rem;
}

.horizontal-list {
  display: grid;
  gap: 1rem;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem;
  overflow: hidden;
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.horizontal-card img {
  width: 100%;
  height: 100%;
  min-height: 11rem;
  object-fit: cover;
}

.horizontal-card__content {
  display: grid;
  align-content: center;
  padding: 1.1rem 1.2rem 1.1rem 0;
}

.horizontal-card__content strong {
  margin-bottom: 0.55rem;
  color: #212529;
  font-size: 1.2rem;
}

.horizontal-card__content span {
  color: #486581;
  font-size: 0.9rem;
  font-weight: 650;
}

.horizontal-card__content p {
  display: -webkit-box;
  margin: 0.7rem 0 0;
  overflow: hidden;
  color: #6c757d;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero {
  padding: clamp(3.5rem, 8vw, 5rem) 0;
  background: linear-gradient(120deg, #486581, #212529);
  color: #ffffff;
}

.page-hero--moss {
  background: linear-gradient(120deg, #3d663d, #212529);
}

.page-hero__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #d9e2ec;
  font-size: 0.92rem;
}

.page-hero__crumbs a:hover {
  color: #ffffff;
}

.page-hero h1 {
  max-width: 64rem;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 52rem;
  margin-bottom: 0;
  color: #e9ecef;
  font-size: 1.08rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 12rem;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  outline: 0;
  padding: 0.78rem 0.9rem;
  background: #ffffff;
  color: #212529;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #829ab1;
  box-shadow: 0 0 0 3px rgba(130, 154, 177, 0.18);
}

.rank-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item__link {
  display: grid;
  grid-template-columns: 4rem 5.4rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.95rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: 0.25s ease;
}

.rank-item__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.rank-item__num {
  color: #486581;
  font-size: 1.45rem;
  font-weight: 800;
  text-align: center;
}

.rank-item img {
  width: 5.4rem;
  height: 7.2rem;
  border-radius: 0.65rem;
  object-fit: cover;
}

.rank-item__content {
  display: grid;
  gap: 0.35rem;
}

.rank-item__content strong {
  color: #212529;
  font-size: 1.1rem;
}

.rank-item__content em {
  color: #486581;
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 650;
}

.rank-item__content small {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.55;
}

.detail-crumbs {
  background: #212529;
  color: #ced4da;
  padding: 1.1rem 0;
}

.detail-crumbs__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.92rem;
}

.detail-crumbs a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.9fr);
  gap: 2rem;
  padding-block: 2.5rem;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #000000;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.2));
  color: #ffffff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-mask__button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 1rem 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.player-mask__icon {
  display: grid;
  width: 3.6rem;
  height: 3.6rem;
  place-items: center;
  border-radius: 999px;
  background: #fb923c;
  color: #ffffff;
}

.detail-panel,
.sidebar-panel {
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.detail-panel {
  margin-top: 1.3rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-panel h1 {
  margin-bottom: 1rem;
  color: #212529;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid #e9ecef;
  color: #6c757d;
  font-size: 0.92rem;
}

.detail-meta span,
.detail-meta a {
  border-radius: 999px;
  background: #f1f3f5;
  padding: 0.35rem 0.7rem;
}

.detail-meta a {
  color: #486581;
  font-weight: 650;
}

.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section h2,
.sidebar-panel h2 {
  margin-bottom: 0.85rem;
  color: #212529;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.detail-section p {
  margin-bottom: 0.9rem;
  color: #495057;
}

.review-box {
  border-radius: 0.9rem;
  background: #f8f9fa;
  padding: 1.1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag-list span {
  border-radius: 999px;
  background: #edf4ed;
  color: #3d663d;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
}

.sidebar-panel {
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-sticky {
  position: sticky;
  top: 6.5rem;
}

.mini-card {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: 0.75rem;
  transition: 0.2s ease;
}

.mini-card:hover {
  background: #f8f9fa;
}

.mini-card img {
  width: 4.5rem;
  height: 6rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.mini-card span {
  display: -webkit-box;
  overflow: hidden;
  color: #212529;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-results-note {
  margin-bottom: 1.5rem;
  color: #6c757d;
}

.site-footer {
  margin-top: 4rem;
  background: #212529;
  color: #dee2e6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-block: 3.5rem;
}

.site-logo--footer {
  color: #ffffff;
}

.footer-brand p {
  max-width: 31rem;
  margin-top: 1rem;
  color: #adb5bd;
}

.site-footer h2 {
  margin-bottom: 1rem;
  color: #f8f9fa;
  font-size: 1rem;
}

.site-footer ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #82a66f;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem;
  color: #adb5bd;
  text-align: center;
  font-size: 0.9rem;
}

.empty-state {
  border-radius: 1rem;
  background: #ffffff;
  padding: 3rem 1rem;
  color: #6c757d;
  text-align: center;
}

@media (max-width: 1180px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .header-search {
    margin-left: auto;
  }

  .movie-grid,
  .movie-grid--three,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 4.3rem;
  }

  .header-search {
    display: none;
  }

  .hero-slider {
    height: 38rem;
  }

  .hero-dots {
    left: 1rem;
    right: auto;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 0.8rem;
  }

  .movie-grid,
  .movie-grid--three,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .horizontal-card {
    grid-template-columns: 8rem 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-sticky {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

@media (max-width: 560px) {
  .container-custom {
    width: min(100% - 1.25rem, 88rem);
  }

  .site-logo__text {
    font-size: 1.1rem;
  }

  .site-logo__mark {
    width: 1.9rem;
    height: 1.9rem;
  }

  .hero-slider {
    height: 36rem;
  }

  .hero-actions {
    display: grid;
  }

  .movie-grid,
  .movie-grid--three,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: 1fr;
  }

  .horizontal-card img {
    height: 15rem;
  }

  .horizontal-card__content {
    padding: 1rem;
  }

  .rank-item__link {
    grid-template-columns: 3rem 4.4rem 1fr;
    gap: 0.7rem;
  }

  .rank-item img {
    width: 4.4rem;
    height: 5.9rem;
  }

  .rank-item__content small {
    display: none;
  }
}
