:root {
  --paper-50: #fafaf9;
  --paper-100: #f5f5f4;
  --paper-200: #e7e5e4;
  --paper-400: #a8a29e;
  --paper-500: #78716c;
  --ink-700: #4a4a4a;
  --ink-800: #3d3d3d;
  --ink-900: #2f2f2f;
  --primary-50: #f0f9f4;
  --primary-100: #dcf2e4;
  --primary-200: #bce5cd;
  --primary-600: #267f56;
  --primary-700: #1f6546;
  --accent-100: #fcefd0;
  --accent-600: #cf6913;
  --accent-700: #ac4a12;
  --shadow-soft: 0 12px 35px rgba(47, 47, 47, 0.12);
  --shadow-strong: 0 24px 60px rgba(47, 47, 47, 0.22);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper-50);
  color: var(--ink-800);
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--primary-100);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(38, 127, 86, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  color: var(--ink-900);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--paper-500);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  color: var(--ink-700);
  font-size: 15px;
  font-weight: 700;
  padding: 22px 0;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary-700);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary-600);
}

.header-search {
  position: relative;
  flex: 0 1 270px;
}

.header-search input,
.local-filter input {
  width: 100%;
  border: 1px solid var(--primary-100);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-900);
  padding: 12px 16px;
  outline: none;
  box-shadow: 0 8px 24px rgba(47, 47, 47, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.local-filter input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(38, 127, 86, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 86vw);
  background: #fff;
  border: 1px solid var(--primary-100);
  border-radius: 18px;
  box-shadow: var(--shadow-strong);
  padding: 12px;
  display: none;
  max-height: 70vh;
  overflow: auto;
}

.search-results.open {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: var(--primary-50);
}

.search-result-item img {
  width: 64px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--paper-200);
}

.search-result-item strong {
  display: block;
  color: var(--ink-900);
  line-height: 1.35;
}

.search-result-item small {
  color: var(--paper-500);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-50);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary-700);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  max-height: 820px;
  overflow: hidden;
  background: var(--ink-900);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 90px 20px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-kicker,
.card-tags,
.detail-tags,
.channel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-kicker span,
.card-tags span,
.detail-tags span,
.channel-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(38, 127, 86, 0.9);
  color: #fff;
}

.hero-kicker span:nth-child(2n),
.card-tags span:nth-child(2n),
.detail-tags span:nth-child(2n),
.channel-tags span:nth-child(2n) {
  background: rgba(207, 105, 19, 0.92);
}

.hero h1 {
  max-width: 760px;
  margin: 20px 0 6px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
}

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

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  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: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: #fff;
  box-shadow: 0 12px 28px rgba(38, 127, 86, 0.26);
}

.btn.accent {
  background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
  color: #fff;
  box-shadow: 0 12px 28px rgba(207, 105, 19, 0.22);
}

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

.btn.light {
  border: 1px solid var(--primary-200);
  background: #fff;
  color: var(--primary-700);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 24px;
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 32px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

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

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 68px 20px 0;
}

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

.section-eyebrow {
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-copy h2 {
  margin: 6px 0 0;
  color: var(--ink-900);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  max-width: 660px;
  color: var(--paper-500);
  margin: 10px 0 0;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-100));
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.62));
  opacity: 0.75;
}

.play-icon {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--primary-600);
  color: #fff;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rank-badge {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-600);
  color: #fff;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 12px 0 8px;
  color: var(--ink-900);
  font-size: 20px;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--primary-700);
}

.card-body p {
  margin: 0;
  color: var(--paper-500);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--paper-500);
  font-size: 13px;
}

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

.category-card a {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 210px;
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-orb {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
}

.category-card h2 {
  position: relative;
  margin: 0 0 12px;
  color: var(--ink-900);
  font-size: 26px;
}

.category-card p {
  position: relative;
  margin: 0;
  color: var(--paper-500);
}

.category-samples {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.category-samples a {
  display: inline-flex;
  min-height: auto;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: none;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 13px;
}

.page-hero {
  background: linear-gradient(135deg, #ffffff, var(--primary-50) 46%, var(--accent-100));
  border-bottom: 1px solid var(--primary-100);
}

.page-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--paper-500);
  font-size: 14px;
}

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

.local-filter {
  max-width: 520px;
  margin: 26px 0 0;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 120px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.ranking-number {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--ink-900);
  color: #fff;
  font-weight: 900;
}

.ranking-item:nth-child(-n+3) .ranking-number {
  background: linear-gradient(135deg, var(--accent-600), var(--primary-600));
}

.ranking-item img {
  width: 120px;
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--paper-200);
}

.ranking-item h2 {
  margin: 0 0 6px;
  color: var(--ink-900);
  font-size: 21px;
}

.ranking-item p {
  margin: 0;
  color: var(--paper-500);
}

.ranking-meta {
  display: flex;
  gap: 10px;
  color: var(--paper-500);
  font-size: 13px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  color: #fff;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 20px;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.74);
}

.player-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 20px 0;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-overlay span {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-600);
  font-size: 30px;
  box-shadow: 0 16px 34px rgba(38, 127, 86, 0.34);
}

.player-overlay strong {
  font-size: clamp(22px, 4vw, 42px);
}

.detail-copy {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 20px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
}

.copy-card,
.side-card {
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.copy-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--ink-900);
  font-size: 28px;
}

.copy-card p,
.side-card p {
  color: var(--ink-700);
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--paper-200);
}

.info-list dt {
  color: var(--paper-500);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--ink-900);
}

.site-footer {
  margin-top: 80px;
  padding: 42px 20px;
  background: var(--ink-900);
  color: var(--paper-200);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  max-width: 620px;
  color: var(--paper-400);
}

.footer-inner nav {
  display: flex;
  gap: 18px;
}

.footer-inner nav a:hover {
  color: #fff;
}

.copyright {
  max-width: 1180px;
  margin: 24px auto 0;
  color: var(--paper-400);
  font-size: 13px;
}

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

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
    gap: 12px;
  }

  .brand-text small {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 18px;
    background: #fff;
    border-bottom: 1px solid var(--primary-100);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 0;
  }

  .site-nav a.active::after {
    display: none;
  }

  .header-search {
    order: 4;
    flex-basis: 100%;
    display: none;
  }

  .site-header.search-open .header-search {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 110px;
  }

  .hero-controls {
    align-items: end;
  }

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

  .ranking-item {
    grid-template-columns: 52px 92px 1fr;
  }

  .ranking-item .btn {
    grid-column: 2 / 4;
    justify-self: start;
  }

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

@media (max-width: 560px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    min-height: 650px;
  }

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

  .section,
  .player-section,
  .detail-copy {
    padding-left: 14px;
    padding-right: 14px;
  }

  .section-heading {
    display: block;
  }

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

  .ranking-item {
    grid-template-columns: 44px 1fr;
  }

  .ranking-item img {
    grid-column: 1 / 3;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .ranking-item .btn {
    grid-column: 1 / 3;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner nav {
    margin-top: 20px;
  }
}
