:root {
  --primary: #4a7c54;
  --primary-dark: #3d6744;
  --primary-soft: #f4f7f5;
  --accent: #e88f1a;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft: #f9fafb;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f6f7f4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.86);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

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

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

.site-logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 24px rgba(74, 124, 84, 0.28);
}

.site-logo-mark span {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
  transform: translateX(2px);
}

.site-logo-text {
  font-size: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.mobile-nav-link {
  color: #4b5563;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

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

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary-dark);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

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

.mobile-nav-link {
  padding: 12px 14px;
}

main {
  min-height: 70vh;
}

.home-hero {
  position: relative;
  min-height: 70vh;
  background: #111827;
  overflow: hidden;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.18)), linear-gradient(0deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.02) 54%);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.84;
  transform: scale(1.04);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  padding: 90px 0 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  align-items: center;
  color: #fff;
}

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

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.movie-detail-hero h1 {
  margin: 12px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-tags,
.movie-tags,
.detail-tags,
.hero-inline-links,
.quick-links,
.filter-chip-row,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.movie-tags span,
.detail-tags a,
.hero-inline-links a,
.quick-links a,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

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

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-glass,
.btn-ghost-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.btn-outline {
  color: var(--primary-dark);
  background: #fff;
  border-color: var(--line);
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.34);
  aspect-ratio: 2 / 3;
  transform: rotate(2deg);
}

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

.hero-poster-card span,
.poster-play {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(74, 124, 84, 0.92);
}

.hero-poster-card span {
  left: 20px;
  bottom: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 900;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-thumbs {
  position: absolute;
  right: calc((100% - min(1200px, calc(100% - 32px))) / 2);
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 12px;
}

.hero-thumb {
  width: 118px;
  height: 72px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  color: #fff;
  position: relative;
}

.hero-thumb.active {
  border-color: #fff;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
}

.hero-thumb span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-search-panel,
.search-panel {
  width: min(1200px, calc(100% - 32px));
  margin: -38px auto 36px;
  position: relative;
  z-index: 10;
  padding: 22px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.search-redirect {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-redirect label {
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 900;
}

.search-redirect input,
.site-search-input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  font-size: 16px;
  background: var(--soft);
}

.search-redirect button {
  height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
  cursor: pointer;
}

.quick-links {
  margin-top: 16px;
}

.quick-links a,
.hero-inline-links a,
.filter-chip {
  padding: 8px 13px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.content-section,
.category-overview-grid,
.detail-content-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 54px auto;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-more,
.text-link {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 124, 84, 0.42);
  box-shadow: 0 24px 50px rgba(17, 24, 39, 0.12);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dfe7df, #f6f3ea);
}

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

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

.poster-play {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: scale(1);
}

.card-rank {
  position: absolute;
  top: 14px;
  left: 14px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-meta-line span + span::before {
  content: "•";
  margin-right: 8px;
  color: #c7c9cf;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-card p {
  margin: 0;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
}

.movie-tags {
  margin-top: 14px;
}

.movie-tags span {
  padding: 5px 9px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #f4f7f5);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card > span {
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
}

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

.category-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card div a {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.page-hero,
.movie-detail-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto;
  padding: 52px;
  border-radius: 30px;
  background: radial-gradient(circle at top left, rgba(232, 143, 26, 0.18), transparent 32%), linear-gradient(135deg, #ffffff, #f4f7f5);
  box-shadow: var(--shadow);
}

.page-hero h1,
.movie-detail-hero h1 {
  color: var(--text);
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

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

.category-overview-poster img {
  aspect-ratio: 2 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: var(--primary-soft);
}

.category-overview-card h2 {
  margin: 8px 0 10px;
  font-size: 26px;
}

.category-overview-card p {
  color: var(--muted);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 78px 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.rank-row-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--primary-soft);
}

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

.rank-row-number strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--primary);
  font-size: 18px;
}

.rank-row-main h3 {
  margin: 0 0 5px;
  font-size: 20px;
}

.rank-row-main p {
  margin: 0;
  color: var(--muted);
}

.rank-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rank-row-action {
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

.search-panel {
  margin-top: 34px;
}

.filter-chip-row {
  margin-top: 16px;
}

.filter-chip {
  border: 0;
  cursor: pointer;
}

.filter-chip.active {
  color: #fff;
  background: var(--primary);
}

.movie-card.hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 28px;
}

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

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

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #dfe7df, #f6f3ea);
  box-shadow: 0 24px 50px rgba(17, 24, 39, 0.16);
}

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

.detail-one-line {
  color: var(--muted);
  font-size: 18px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.detail-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-meta-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.detail-tags a {
  padding: 7px 10px;
}

.player-section {
  width: min(1200px, calc(100% - 32px));
  margin: 48px auto;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.22);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.54));
  cursor: pointer;
}

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

.player-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

.player-overlay strong {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  font-size: 18px;
}

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

.detail-article {
  padding: 28px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.detail-article p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

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

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

.footer-logo {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.footer-inner p {
  color: #9ca3af;
}

.footer-links a {
  color: #d1d5db;
  font-weight: 800;
}

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

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-poster-card {
    display: none;
  }

  .hero-thumbs {
    display: none;
  }

  .detail-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

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

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

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

  .site-header-inner {
    height: 66px;
  }

  .site-logo-text {
    font-size: 20px;
  }

  .home-hero,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content {
    padding: 76px 0 105px;
  }

  .hero-copy h1,
  .page-hero h1,
  .movie-detail-hero h1 {
    font-size: 38px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-panel,
  .search-panel,
  .page-hero,
  .movie-detail-hero {
    padding: 22px;
    border-radius: 22px;
  }

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

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

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

  .category-overview-card,
  .detail-layout,
  .rank-row,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row-action {
    justify-self: start;
  }
}

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

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

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

  .movie-card p {
    display: none;
  }

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

  .btn {
    width: 100%;
  }
}
