* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --night-950: #06110f;
  --night-900: #071816;
  --night-850: #0a1d19;
  --night-800: #0d231f;
  --night-700: #12302a;
  --swamp-700: #1c4034;
  --moss-700: #2f6b45;
  --moss-600: #3f8f56;
  --moss-500: #62b36d;
  --moss-300: #b4e08e;
  --cream: #f1f5df;
  --muted: #a6b6aa;
  --line: rgba(180, 224, 142, 0.16);
  --soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: radial-gradient(circle at top left, rgba(98, 179, 109, 0.18), transparent 36%), var(--night-950);
  color: var(--cream);
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 24, 22, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #04100d;
  background: linear-gradient(135deg, var(--moss-300), var(--moss-600));
  box-shadow: 0 12px 30px rgba(98, 179, 109, 0.24);
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--cream);
  background: rgba(98, 179, 109, 0.14);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.home-hero {
  position: relative;
  height: clamp(560px, 78vh, 820px);
  overflow: hidden;
  background: var(--night-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.75s ease, transform 1.2s ease;
}

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

.hero-overlay,
.page-hero-mask,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 17, 15, 0.95) 0%, rgba(6, 17, 15, 0.62) 44%, rgba(6, 17, 15, 0.25) 100%),
    linear-gradient(0deg, var(--night-950) 0%, rgba(6, 17, 15, 0) 52%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 90px;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--moss-300);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 13px;
}

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

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin-bottom: 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-info .lead-text {
  max-width: 720px;
  color: #d5dfd2;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #04100d;
  background: linear-gradient(135deg, var(--moss-300), var(--moss-600));
  box-shadow: 0 18px 42px rgba(98, 179, 109, 0.24);
}

.ghost-button {
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--moss-300);
}

.search-band {
  background: rgba(13, 35, 31, 0.94);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  padding: 28px 0;
}

.search-inner h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.search-inner p {
  margin-bottom: 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.search-box span {
  color: var(--moss-300);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: var(--cream);
  background: transparent;
}

.section-block {
  padding: 72px 0;
}

.alt-block {
  background: rgba(13, 35, 31, 0.48);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3.5vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading a,
.text-link {
  color: var(--moss-300);
  font-weight: 800;
}

.compact-heading {
  align-items: center;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(180, 224, 142, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.poster-link {
  position: relative;
  display: block;
  min-height: 280px;
  background-color: var(--night-800);
  background-position: center;
  background-size: cover;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 17, 15, 0.02), rgba(6, 17, 15, 0.74));
}

.poster-year {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #071816;
  background: var(--moss-300);
  font-weight: 900;
}

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.movie-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--moss-300);
  background: rgba(98, 179, 109, 0.13);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.3;
}

.movie-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--night-800);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.category-card::before,
.category-overview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 17, 15, 0.96), rgba(6, 17, 15, 0.34));
}

.category-card span,
.category-card strong,
.category-overview-card > div {
  position: relative;
  z-index: 1;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(180, 224, 142, 0.4);
}

.category-card span {
  color: var(--moss-300);
  font-weight: 900;
  font-size: 20px;
}

.category-card strong {
  color: #d8e3d6;
  font-size: 14px;
  line-height: 1.65;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 34px;
  align-items: start;
}

.ranking-panel,
.detail-side-card,
.detail-article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item + .rank-item {
  margin-top: 12px;
}

.rank-link {
  display: grid;
  grid-template-columns: 40px 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-link:hover {
  background: rgba(98, 179, 109, 0.11);
  transform: translateX(2px);
}

.rank-number {
  color: var(--moss-300);
  font-weight: 900;
  text-align: center;
}

.rank-poster {
  width: 58px;
  height: 76px;
  border-radius: 14px;
  background-color: var(--night-700);
  background-position: center;
  background-size: cover;
}

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

.rank-main strong,
.rank-main em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-main strong {
  margin-bottom: 6px;
  font-size: 16px;
}

.rank-main em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-score {
  padding: 6px 10px;
  border-radius: 999px;
  color: #04100d;
  background: var(--moss-300);
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 420px;
  padding: 130px 0 64px;
  overflow: hidden;
  background-color: var(--night-800);
  background-position: center;
  background-size: cover;
}

.small-hero {
  min-height: 360px;
  background:
    radial-gradient(circle at 20% 0%, rgba(98, 179, 109, 0.24), transparent 42%),
    linear-gradient(135deg, var(--night-900), var(--night-800));
}

.page-hero .section-inner,
.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 26px;
}

.filter-row button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.filter-row button.active,
.filter-row button:hover {
  color: #04100d;
  background: var(--moss-300);
}

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

.category-overview-card {
  min-height: 300px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-overview-card h2 {
  font-size: 32px;
}

.category-overview-card p {
  color: #dce7d8;
  line-height: 1.8;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.inline-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--moss-300);
  background: rgba(98, 179, 109, 0.13);
  font-weight: 800;
  font-size: 13px;
}

.ranking-page-list {
  max-width: 920px;
}

.large-rank .rank-link {
  grid-template-columns: 54px 82px minmax(0, 1fr) auto;
  padding: 14px;
}

.large-rank .rank-poster {
  width: 82px;
  height: 110px;
}

.large-rank .rank-main strong {
  font-size: 20px;
}

.detail-hero {
  min-height: 610px;
}

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

.detail-poster {
  min-height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background-color: var(--night-800);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

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

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

.player-section {
  padding-top: 52px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #020605;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020605;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: var(--cream);
  background: radial-gradient(circle, rgba(7, 24, 22, 0.42), rgba(7, 24, 22, 0.78));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #04100d;
  background: var(--moss-300);
  font-size: 30px;
  box-shadow: 0 18px 42px rgba(98, 179, 109, 0.28);
}

.player-status {
  position: absolute;
  left: 20px;
  bottom: 16px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

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

.detail-article {
  padding: 30px;
}

.detail-article h2,
.detail-side-card h2 {
  font-size: 28px;
}

.detail-article p {
  color: #d5dfd2;
  font-size: 17px;
  line-height: 2;
}

.detail-side-card {
  position: sticky;
  top: 96px;
  padding: 26px;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0 0 22px;
}

.detail-side-card dt {
  color: var(--moss-300);
  font-weight: 900;
}

.detail-side-card dd {
  margin: 0;
  color: #d5dfd2;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(6, 17, 15, 0.96);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2fr auto;
  gap: 24px;
  align-items: center;
  padding: 34px 0;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--moss-300);
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .two-column,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .detail-side-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(7, 24, 22, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

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

  .detail-poster {
    max-width: 320px;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .section-inner,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .home-hero {
    height: 620px;
  }

  .hero-content {
    padding-bottom: 82px;
  }

  .hero-actions,
  .section-heading,
  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .featured-grid,
  .latest-grid,
  .related-grid,
  .movie-grid,
  .category-grid,
  .category-movie-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .poster-link {
    min-height: 350px;
  }

  .large-rank .rank-link,
  .rank-link {
    grid-template-columns: 38px 62px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }
}
