:root {
  --primary: #4a7c54;
  --primary-dark: #2f5637;
  --primary-soft: #f4f7f5;
  --accent: #d9a441;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --bg: #fafaf9;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(74, 124, 84, 0.28);
}

.brand-text {
  font-size: 22px;
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 8px;
}

.desktop-nav {
  display: flex;
}

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  color: #4b5563;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  flex-direction: column;
}

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

.mobile-link {
  width: 100%;
}

.hero-carousel {
  position: relative;
  height: clamp(540px, 72vh, 760px);
  overflow: hidden;
  background: #111827;
}

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

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

.hero-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.hero-eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(74, 124, 84, 0.14);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  margin: 20px 0 18px;
  letter-spacing: -0.06em;
}

.hero-content p {
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
  max-width: 660px;
}

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

.hero-tags {
  margin-top: 20px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.movie-card .tag-pill,
.detail-tags .tag-pill,
.search-section .tag-pill {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(74, 124, 84, 0.34);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

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

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

.btn-ghost.light {
  color: #fff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 36px;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: 0.22s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.home-search-band {
  width: min(1200px, calc(100% - 32px));
  margin: -46px auto 44px;
  position: relative;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 20px;
  align-items: center;
}

.home-search-band span {
  color: var(--primary);
  font-weight: 800;
}

.home-search-band strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.home-search,
.filter-bar {
  display: flex;
  gap: 10px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  outline: none;
}

.home-search button {
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  padding: 0 22px;
}

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

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

.section-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
}

.section-more {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 800;
}

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

.category-tile {
  padding: 20px;
  min-height: 146px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(229, 231, 235, 0.75);
  transition: 0.22s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  font-size: 20px;
  margin-bottom: 10px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.6;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.75);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
  display: flex;
  flex-direction: column;
}

.movie-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.card-year,
.card-rank {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.card-year {
  right: 12px;
}

.card-rank {
  left: 12px;
  background: rgba(217, 164, 65, 0.92);
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-dark);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.movie-title {
  font-size: 18px;
  line-height: 1.28;
  font-weight: 850;
  color: #111827;
}

.movie-title:hover {
  color: var(--primary);
}

.movie-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  flex: 1;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

.movie-card-compact .movie-title {
  font-size: 16px;
}

.movie-card-compact .movie-card-body p {
  display: none;
}

.rank-panel,
.side-card,
.prose-card {
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.75);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.rank-panel {
  padding: 22px;
  position: sticky;
  top: 98px;
}

.rank-panel-head h2 {
  font-size: 30px;
  margin: 12px 0 4px;
}

.rank-panel-head a {
  color: var(--primary);
  font-weight: 800;
}

.rank-mini-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.rank-mini-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #fafafa;
}

.rank-mini-item span,
.ranking-index {
  color: var(--accent);
  font-weight: 900;
}

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

.rank-mini-item em {
  color: var(--muted);
  font-style: normal;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, #203827, #4a7c54 54%, #d9a441);
  padding: 82px 0;
}

.page-hero > div,
.page-hero > a,
.detail-hero-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
  margin: 16px 0;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  font-size: 18px;
}

.page-hero .kicker {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.category-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.75);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
}

.category-card-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
}

.category-card-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  font-size: 28px;
  margin: 12px 0 8px;
}

.category-card-body p {
  color: var(--muted);
  line-height: 1.7;
}

.ranking-list {
  display: grid;
  gap: 8px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 70px 1fr 140px 90px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.75);
  border-radius: 16px;
}

.ranking-row:hover {
  border-color: rgba(74, 124, 84, 0.35);
  background: var(--primary-soft);
}

.ranking-title {
  font-weight: 800;
}

.filter-bar {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.empty-result {
  display: none;
  text-align: center;
  padding: 40px 0;
  color: var(--muted);
  font-weight: 800;
}

.empty-result.is-visible {
  display: block;
}

.detail-hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #fff;
}

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

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.12);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-info h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  margin: 20px 0;
  letter-spacing: -0.06em;
}

.detail-one-line {
  font-size: 20px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
  max-width: 760px;
}

.detail-meta {
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 750;
  backdrop-filter: blur(10px);
}

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

.player-card,
.detail-copy {
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.75);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #030712;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #030712;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.25), rgba(3, 7, 18, 0.68));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

.player-overlay.is-hidden {
  display: none;
}

.detail-copy {
  margin-top: 24px;
  padding: 28px;
}

.detail-copy h2,
.side-card h2 {
  font-size: 24px;
  margin: 0 0 14px;
}

.detail-copy p {
  color: #374151;
  line-height: 1.9;
  margin: 0 0 24px;
}

.detail-copy p:last-child {
  margin-bottom: 0;
}

.side-card {
  padding: 24px;
  position: sticky;
  top: 98px;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
  font-size: 13px;
}

.side-card dd {
  margin: 0;
  font-weight: 800;
}

.side-card a {
  color: var(--primary-dark);
}

.prose-card {
  padding: 30px;
  max-width: 860px;
}

.prose-card p {
  color: #374151;
  line-height: 1.9;
  margin: 0 0 18px;
}

.site-footer {
  margin-top: 50px;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.footer-brand strong {
  color: #fff;
  font-size: 22px;
}

.footer-brand p {
  color: #9ca3af;
  line-height: 1.7;
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a,
.footer-cats a {
  color: #d1d5db;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover,
.footer-cats a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

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

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

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

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

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

  .mobile-toggle {
    display: flex;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-band,
  .home-search,
  .filter-bar,
  .footer-inner,
  .detail-hero-inner,
  .category-hero {
    grid-template-columns: 1fr;
  }

  .home-search-band {
    margin-top: -28px;
  }

  .home-search,
  .filter-bar {
    flex-direction: column;
  }

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

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

  .detail-hero {
    padding: 48px 0;
  }

  .detail-hero-inner {
    display: grid;
    gap: 24px;
  }

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

  .ranking-row {
    grid-template-columns: 54px 1fr;
  }

  .ranking-row span:nth-child(3),
  .ranking-row span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 20px, 1200px);
  }

  .content-section,
  .page-hero > div,
  .detail-hero-inner,
  .home-search-band {
    width: min(100% - 20px, 1200px);
  }

  .hero-content {
    width: min(100% - 24px, 1200px);
  }

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

  .hero-content h1,
  .detail-info h1,
  .page-hero h1 {
    letter-spacing: -0.04em;
  }

  .movie-card-cover {
    aspect-ratio: 16 / 9;
  }
}
