:root {
  --bg: #f8f3ea;
  --surface: #ffffff;
  --surface-soft: #fffaf1;
  --ink: #1c1917;
  --muted: #6b5f55;
  --line: #eadfce;
  --green: #15803d;
  --green-dark: #166534;
  --amber: #b45309;
  --amber-light: #f59e0b;
  --shadow: 0 22px 70px rgba(68, 44, 23, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.17), transparent 34rem),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 48%, #f2eadf 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(234, 223, 206, 0.88);
  box-shadow: 0 10px 32px rgba(68, 44, 23, 0.07);
}

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

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

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--green-dark));
  box-shadow: 0 12px 26px rgba(21, 128, 61, 0.23);
  transform: translateZ(0);
}

.logo:hover .logo-mark {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.2rem;
  background: linear-gradient(90deg, var(--amber), var(--green));
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
  color: #4a4038;
}

.main-nav a,
.mobile-nav a {
  padding: 10px 13px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--green-dark);
  background: #ecfdf3;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f4eee4;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: #3b332c;
  border-radius: 999px;
}

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

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  color: #fff;
  background: #0c0a09;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.01);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 26%, rgba(245, 158, 11, 0.35), transparent 22rem),
    linear-gradient(90deg, rgba(12, 10, 9, 0.92) 0%, rgba(12, 10, 9, 0.68) 45%, rgba(12, 10, 9, 0.12) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.98), transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 590px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(650px, 100%);
  padding: 92px 0 80px;
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e9f8ef;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  background: rgba(21, 128, 61, 0.94);
  color: #fff;
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.35rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 0 0 18px;
  color: #fde68a;
  font-size: clamp(1.5rem, 4vw, 3rem);
  line-height: 1.08;
}

.hero p,
.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

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

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(10px);
}

.tag-row span {
  background: #ecfdf3;
  color: var(--green-dark);
}

.hero-actions,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: 0.22s ease;
}

.button-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  box-shadow: 0 15px 34px rgba(21, 128, 61, 0.28);
}

.button-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 42px rgba(21, 128, 61, 0.36);
}

.button-secondary {
  color: var(--green-dark);
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.button-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

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

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

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

.section-wrap,
.home-search-shell,
.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-shell {
  margin-top: -48px;
  position: relative;
  z-index: 9;
}

.home-search,
.filter-panel,
.category-card-large,
.detail-hero,
.detail-content-grid,
.page-hero {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(234, 223, 206, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.home-search {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.home-search h2 {
  margin: 10px 0 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.section-wrap {
  padding: 60px 0;
}

.section-muted {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: rgba(255, 255, 255, 0.48);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--green-dark);
  font-weight: 800;
}

.section-heading.light h2,
.section-heading.light a {
  color: #fff;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(234, 223, 206, 0.86);
  box-shadow: 0 10px 28px rgba(68, 44, 23, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(21, 128, 61, 0.32);
  box-shadow: 0 20px 48px rgba(68, 44, 23, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1917, #3f342b);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(12, 10, 9, 0.72);
  backdrop-filter: blur(12px);
}

.year-badge {
  right: 10px;
}

.rank-badge {
  left: 10px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
}

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

.movie-title {
  display: -webkit-box;
  min-height: 2.85em;
  overflow: hidden;
  color: #1c1917;
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta,
.movie-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.movie-meta {
  margin: 8px 0 8px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
}

.movie-card-compact .poster-link {
  aspect-ratio: auto;
  min-height: 168px;
}

.movie-card-compact .movie-title {
  min-height: auto;
}

.movie-card-compact .movie-desc {
  min-height: auto;
  -webkit-line-clamp: 2;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(234, 223, 206, 0.9);
  box-shadow: 0 12px 32px rgba(68, 44, 23, 0.09);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(21, 128, 61, 0.26);
}

.category-thumbs,
.category-card-cover {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.category-thumbs img,
.category-card-cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

.category-tile h3,
.category-card-large h2 {
  margin: 8px 0;
  font-size: 1.35rem;
}

.category-tile p,
.category-card-large p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ranking-strip {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.28), transparent 24rem),
    linear-gradient(135deg, #1c1917, #292524 55%, #14532d);
}

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

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: clamp(28px, 5vw, 56px);
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.32), transparent 24rem),
    linear-gradient(135deg, #1c1917, #2b241f 58%, #14532d);
}

.slim-hero {
  min-height: 230px;
  display: flex;
  align-items: center;
}

.rank-hero {
  min-height: 280px;
}

.category-overview {
  display: grid;
  gap: 22px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  padding: 22px;
}

.category-card-cover {
  align-content: start;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.category-links a {
  color: var(--green-dark);
  font-weight: 700;
}

.filter-panel {
  padding: 18px;
  margin-bottom: 24px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 14px;
  color: var(--ink);
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: rgba(21, 128, 61, 0.58);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.1);
}

.filter-empty {
  display: none;
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-wrap {
  padding: 32px 0 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--green-dark);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 26px;
  padding: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #0c0a09;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.64), rgba(12, 10, 9, 0.2));
  cursor: pointer;
  transition: 0.22s ease;
}

.play-overlay:hover {
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.72), rgba(12, 10, 9, 0.28));
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--amber-light));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  font-size: 1.8rem;
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin: 14px 0 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line,
.detail-text p {
  color: var(--muted);
  line-height: 1.85;
  font-size: 1.02rem;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: #f4eee4;
  color: #4a4038;
  font-weight: 800;
  font-size: 0.85rem;
}

.detail-tags span {
  background: #ecfdf3;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 22px;
  margin-top: 24px;
}

.detail-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.detail-poster-card .button {
  width: 100%;
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
}

.detail-text h2:not(:first-child) {
  margin-top: 28px;
}

.related-section {
  width: 100%;
  padding-bottom: 0;
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

  .category-grid,
  .detail-hero,
  .detail-content-grid,
  .category-card-large {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 64px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-copy {
    padding-top: 74px;
  }

  .home-search,
  .section-heading,
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .movie-title {
    font-size: 0.95rem;
  }

  .movie-desc {
    font-size: 0.84rem;
  }

  .movie-card-compact {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .movie-card-compact .poster-link {
    min-height: 148px;
  }

  .category-tile {
    grid-template-columns: 1fr;
  }

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

  .detail-hero,
  .detail-content-grid,
  .category-card-large {
    padding: 16px;
  }

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

@media (max-width: 420px) {
  .movie-grid,
  .rank-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .movie-card-compact {
    grid-template-columns: 112px minmax(0, 1fr);
  }
}

.site-footer {
  margin-top: 40px;
  color: #d7d3cc;
  background: linear-gradient(135deg, #1c1917, #292524 62%, #14532d);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.05rem;
}

.site-footer p,
.site-footer li {
  color: #d6d3d1;
  line-height: 1.8;
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a:hover {
  color: #86efac;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 16px;
  text-align: center;
  color: #a8a29e;
  font-size: 0.88rem;
}
