:root {
  --primary: #267f56;
  --primary-dark: #1e6545;
  --primary-soft: #f0f9f4;
  --accent: #cf6913;
  --accent-soft: #fcefd0;
  --paper: #fafaf9;
  --ink: #3d3d3d;
  --muted: #71717a;
  --line: #e7e5e4;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(38, 127, 86, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 22px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(38, 127, 86, 0.24);
}

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

.nav-link,
.mobile-link {
  border-radius: 999px;
  padding: 9px 14px;
  color: #52525b;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-soft);
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--primary);
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 22px 18px;
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  background: radial-gradient(circle at 10% 20%, rgba(207, 105, 19, 0.2), transparent 28%), linear-gradient(135deg, #1f5f43 0%, #267f56 44%, #cf6913 100%);
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  z-index: 1;
}

.hero-slide {
  display: none;
  position: relative;
  z-index: 2;
  min-height: 640px;
}

.hero-slide.active {
  display: block;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 440px);
  gap: 42px;
  align-items: center;
  max-width: 1220px;
  min-height: 640px;
  margin: 0 auto;
  padding: 64px 22px 72px;
}

.hero-copy {
  max-width: 720px;
}

.hero-copy .eyebrow,
.section-heading span,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.07em;
}

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

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 20px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

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

.hero-poster-info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 26px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), transparent);
}

.hero-poster-info strong {
  display: block;
  margin-bottom: 4px;
  font-size: 24px;
}

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 20px;
  backdrop-filter: blur(10px);
}

.main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 54px 22px 80px;
}

.section {
  margin-bottom: 64px;
}

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

.section-heading span,
.page-kicker {
  margin-bottom: 7px;
  color: var(--primary);
}

.section-heading h2,
.page-heading h1,
.content-block h2 {
  margin: 0;
  color: #242424;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-heading p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-panel input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 16px;
  background: var(--paper);
  padding: 14px 16px;
  color: #27272a;
  font-size: 15px;
}

.search-panel button {
  border: 0;
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  padding: 0 22px;
  font-weight: 900;
}

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

.category-card {
  min-height: 126px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, var(--primary-soft));
  box-shadow: 0 14px 36px rgba(38, 127, 86, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(38, 127, 86, 0.18);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 20px;
}

.category-card span {
  color: var(--muted);
  font-size: 14px;
}

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

.movie-card,
.rank-item,
.content-block,
.player-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 10px 34px rgba(38, 127, 86, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

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

.movie-card:hover .poster img,
.rank-item:hover img {
  transform: scale(1.04);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  font-size: 16px;
}

.movie-body {
  padding: 16px;
}

.movie-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-meta strong,
.rank-meta strong,
.detail-meta strong {
  color: var(--accent);
}

.movie-body h3,
.rank-content h3 {
  margin: 0 0 8px;
  color: #27272a;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}

.movie-body p,
.rank-content p,
.content-block p,
.detail-intro {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tags span {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 96px 56px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-cover {
  overflow: hidden;
  border-radius: 18px;
  background: var(--primary-soft);
}

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

.rank-num {
  color: var(--primary);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--primary);
  font-weight: 800;
}

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

.player-panel {
  position: relative;
  background: #111827;
}

.video-wrap {
  position: relative;
  background: #000000;
}

.video-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.16));
  cursor: pointer;
  z-index: 3;
}

.play-cover[hidden] {
  display: none;
}

.play-trigger {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-size: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

.player-title {
  padding: 20px 22px 24px;
  color: #ffffff;
}

.player-title h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.player-title p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.content-stack {
  display: grid;
  gap: 20px;
}

.content-block {
  padding: 24px;
}

.content-block h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.content-block p + p {
  margin-top: 14px;
}

.side-card {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}

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

.movie-card.compact .poster img {
  height: 100%;
  min-height: 150px;
}

.movie-card.compact .poster-badge,
.movie-card.compact .poster-play {
  display: none;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 28px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 38px 22px;
}

.footer-inner p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero,
  .hero-slide,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 44px 22px 96px;
  }

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

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

  .section-heading,
  .page-heading,
  .footer-inner {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

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

  .search-panel button {
    min-height: 48px;
  }

  .rank-item {
    grid-template-columns: 78px 44px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-num {
    font-size: 22px;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 22px;
  }
}

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

  .rank-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .rank-num {
    display: none;
  }

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