:root {
  --green-950: #052e22;
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --emerald-500: #10b981;
  --yellow-300: #fde047;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 26px 70px rgba(6, 78, 59, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--slate-50);
  color: var(--slate-900);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--green-800), var(--green-600), var(--emerald-500));
  color: var(--white);
  box-shadow: 0 12px 34px rgba(4, 120, 87, 0.28);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.brand-text {
  font-size: 1.22rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.local-filter,
.global-search-input,
.year-filter {
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  padding: 11px 16px;
  min-width: 220px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.nav-search input::placeholder,
.local-filter::placeholder,
.global-search-input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  padding: 11px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button {
  color: var(--green-700);
  background: var(--white);
}

.nav-search button:hover,
.btn:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 2px;
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--green-900);
}

.hero-track {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 380px);
  align-items: center;
  gap: 48px;
  padding: 96px max(28px, calc((100vw - 1180px) / 2)) 84px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide::after,
.detail-hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px), radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px);
  background-size: 86px 86px, 120px 120px;
  pointer-events: none;
}

.hero-content,
.hero-poster,
.detail-hero-inner,
.page-hero > * {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(253, 224, 71, 0.18);
  color: var(--yellow-300);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 24px 0 18px;
  color: var(--white);
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.34rem);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green-700);
  background: var(--white);
  box-shadow: var(--shadow-strong);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.hero-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.white-section {
  background: var(--white);
}

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(180deg, #f8fafc, #ecfdf5);
}

.ranking-section {
  padding-bottom: 86px;
}

.section-head {
  text-align: center;
  margin-bottom: 34px;
}

.section-head.with-action {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
}

.section-head h2 {
  margin: 14px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.section-head p {
  margin: 0;
  color: var(--slate-600);
}

.text-link {
  color: var(--green-700);
  font-weight: 850;
}

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

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

.category-tile {
  position: relative;
  min-height: 210px;
  border-radius: 24px;
  overflow: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background: var(--green-900);
  color: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.32s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(4, 120, 87, 0.92));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.category-tile em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.84);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--green-900);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  color: var(--white);
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card-body {
  padding: 18px;
}

.movie-meta-line {
  display: flex;
  gap: 8px;
  color: var(--green-700);
  font-size: 0.86rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--green-700);
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 0.94rem;
}

.movie-card .tag-row span,
.side-tags span {
  background: #ecfdf5;
  color: var(--green-700);
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 58px 1fr;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  background: var(--white);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.rank-number {
  color: var(--green-700);
  font-size: 1.4rem;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  color: var(--slate-600);
  font-size: 0.88rem;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(120deg, var(--green-900), var(--green-600));
}

.page-hero {
  padding: 82px max(16px, calc((100vw - 1180px) / 2));
}

.page-hero h1,
.detail-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-copy p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
}

.filter-panel,
.search-main {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.filter-panel input,
.global-search-input,
.year-filter {
  background: var(--white);
  color: var(--slate-900);
  box-shadow: var(--shadow-soft);
}

.filter-panel input::placeholder,
.global-search-input::placeholder {
  color: var(--slate-600);
}

.search-main {
  justify-content: center;
}

.search-main .global-search-input {
  width: min(680px, 100%);
  border-radius: 999px;
}

.search-main .btn-primary {
  background: var(--green-700);
  color: var(--white);
}

.empty-result {
  text-align: center;
  color: var(--slate-600);
  font-weight: 800;
  margin: 34px 0 0;
}

.rank-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 30px;
}

.rank-feature {
  position: relative;
  min-height: 360px;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
  color: var(--white);
  box-shadow: var(--shadow-strong);
}

.rank-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68);
}

.rank-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(4, 120, 87, 0.94));
}

.rank-feature span,
.rank-feature strong,
.rank-feature em {
  position: relative;
  z-index: 2;
}

.rank-feature span {
  width: fit-content;
  border-radius: 999px;
  background: rgba(253, 224, 71, 0.22);
  color: var(--yellow-300);
  padding: 6px 12px;
  font-weight: 900;
}

.rank-feature strong {
  margin: 14px 0 8px;
  font-size: 1.45rem;
}

.rank-feature em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.85);
}

.rank-list-full {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-hero {
  padding: 28px max(16px, calc((100vw - 1180px) / 2)) 72px;
  background-size: cover;
  background-position: center;
}

.breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 38px;
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb em {
  font-style: normal;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 38px;
}

.detail-cover {
  width: 260px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.detail-tags {
  margin-top: 24px;
}

.detail-section {
  padding-top: 46px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
}

.player-card,
.content-card,
.side-card {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-card {
  padding: 14px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--slate-950);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--slate-950);
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-600);
  box-shadow: 0 18px 45px rgba(5, 150, 105, 0.5);
  font-size: 1.7rem;
}

.content-card,
.side-card {
  padding: 26px;
  margin-top: 22px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.content-card p {
  margin: 0;
  color: var(--slate-700);
}

.info-pair {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding: 13px 0;
}

.info-pair span {
  color: var(--slate-600);
}

.info-pair strong {
  text-align: right;
}

.side-tags {
  margin-top: 18px;
}

.related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #1f2937, #020617);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  padding: 44px 0;
}

.footer-brand p {
  max-width: 560px;
  margin: 14px 0 0;
  color: #cbd5e1;
}

.footer-logo {
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--emerald-500);
}

@media (max-width: 1080px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .rank-grid,
  .rank-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-shell {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    border-radius: 20px;
    padding: 18px;
    background: var(--green-900);
    box-shadow: var(--shadow-strong);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    min-width: 0;
    width: 100%;
  }

  .hero-slider,
  .hero-track {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding-top: 84px;
    gap: 26px;
  }

  .hero-poster {
    width: min(260px, 72vw);
    margin: 0 auto;
  }

  .section-head.with-action {
    display: block;
  }

  .category-grid,
  .category-grid-large,
  .movie-grid,
  .rank-grid,
  .rank-feature-grid,
  .rank-list-full,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-cover {
    width: min(260px, 70vw);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .category-grid,
  .category-grid-large,
  .movie-grid,
  .rank-grid,
  .rank-feature-grid,
  .rank-list-full,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-slider,
  .hero-track {
    min-height: 820px;
  }

  .hero-slide {
    padding-left: 18px;
    padding-right: 18px;
  }

  .filter-panel,
  .search-main {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-panel input,
  .global-search-input,
  .year-filter,
  .search-main .btn {
    width: 100%;
  }
}
