:root {
  --forest-50: #f1f8f1;
  --forest-100: #dceedd;
  --forest-200: #b9d9bd;
  --forest-300: #8cbc96;
  --forest-400: #669b73;
  --forest-500: #467b55;
  --forest-600: #2f6b3f;
  --forest-700: #245432;
  --forest-800: #1c4128;
  --forest-900: #142f1d;
  --earth-50: #faf7f2;
  --earth-100: #efe7d8;
  --earth-200: #ded0b7;
  --earth-500: #9b7b54;
  --earth-800: #392d21;
  --earth-900: #211b16;
  --deer-400: #d6a45d;
  --deer-500: #b77b32;
  --ink: #172018;
  --muted: #607064;
  --line: #e3eadf;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(29, 65, 40, 0.11);
  --shadow-card: 0 12px 30px rgba(20, 47, 29, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--forest-50) 0%, #ffffff 38%, var(--earth-50) 100%);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(185, 217, 189, 0.55);
  backdrop-filter: blur(18px);
}

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

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

.brand-text {
  font-size: 21px;
  color: var(--forest-800);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800));
  box-shadow: 0 10px 22px rgba(47, 107, 63, 0.25);
}

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

.nav-link,
.mobile-link {
  color: #425348;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--forest-600);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--forest-50);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: var(--forest-700);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.mobile-nav.open {
  display: grid;
  gap: 4px;
}

.mobile-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: var(--forest-50);
  color: var(--forest-700);
}

main {
  min-height: 70vh;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 12% 0%, rgba(214, 164, 93, 0.32), transparent 32%), linear-gradient(135deg, var(--forest-900), var(--forest-700) 56%, var(--forest-500));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 47, 29, 0.95) 0%, rgba(20, 47, 29, 0.78) 44%, rgba(20, 47, 29, 0.28) 100%);
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(0.9);
  transform: scale(1.02);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 650px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 48px;
  padding: 64px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 13px;
  color: #fff8e8;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 14px;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.hero p {
  max-width: 700px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.btn-primary,
.btn-secondary,
.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: var(--forest-900);
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-text:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.btn-text {
  color: var(--forest-700);
  background: var(--forest-50);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff5dd;
  background: rgba(255, 255, 255, 0.13);
}

.hero-poster {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

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

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

.hero-dot.active {
  background: #ffffff;
}

.search-panel {
  position: relative;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 42px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--forest-400);
  box-shadow: 0 0 0 4px rgba(70, 123, 85, 0.12);
}

.section {
  margin: 56px 0;
}

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

.section-title h1,
.section-title h2 {
  margin: 0 0 8px;
  color: #111b12;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-title p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.section-line {
  width: 78px;
  height: 4px;
  margin-top: 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--forest-600), var(--deer-400));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(185, 217, 189, 0.55);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(20, 47, 29, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(70, 123, 85, 0.38);
  box-shadow: var(--shadow-card);
}

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

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.rank-cover:hover img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(20, 47, 29, 0.84);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
}

.movie-card h2 {
  margin: 7px 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-item h2 a:hover,
.detail-text a:hover {
  color: var(--forest-600);
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 10px;
  color: #647067;
  font-size: 13px;
  line-height: 1.55;
}

.tag-row span {
  color: var(--forest-700);
  background: var(--forest-50);
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card div {
  padding: 20px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(20, 47, 29, 0.06);
}

.rank-num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--forest-600), var(--deer-500));
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
  background: var(--forest-100);
}

.rank-cover img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rank-item h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-item p {
  margin: 0 0 8px;
  color: var(--muted);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--forest-300);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.empty-state.show {
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
  gap: 28px;
  align-items: start;
}

.breadcrumb {
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--forest-700);
  font-weight: 800;
}

.player-shell {
  overflow: hidden;
  border-radius: 24px;
  background: #050705;
  box-shadow: 0 28px 62px rgba(0, 0, 0, 0.22);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--forest-800);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.play-ring svg {
  width: 38px;
  height: 38px;
  margin-left: 4px;
  fill: currentColor;
}

.player-status {
  min-height: 24px;
  padding: 10px 16px 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.detail-card,
.side-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 22px;
  background: var(--forest-100);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-text h2,
.side-card h2 {
  margin: 24px 0 10px;
  color: var(--forest-800);
  font-size: 22px;
}

.detail-text p {
  margin: 0 0 14px;
  color: #3d4b41;
}

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

.site-footer {
  margin-top: 70px;
  padding: 46px 0 24px;
  color: #d7dfd5;
  background: linear-gradient(180deg, var(--earth-900), #15110e);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 540px;
  margin: 0;
  color: #b9c7b6;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #c8d3c6;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 20px;
  color: #a7b5a4;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

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

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

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

  .hero-poster {
    max-width: 420px;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .nav-wrap {
    min-height: 64px;
  }

  .hero-inner {
    min-height: auto;
    padding: 46px 0 72px;
    gap: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .search-panel,
  .toolbar {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 76px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .rank-cover img {
    width: 76px;
  }

  .rank-item h2 {
    font-size: 16px;
  }

  .rank-item p {
    display: none;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .btn-primary,
  .btn-secondary,
  .btn-text {
    width: 100%;
  }
}
