* {
  box-sizing: border-box;
}

:root {
  --primary-50: #f0f9f4;
  --primary-100: #dcf2e4;
  --primary-200: #bce5cd;
  --primary-400: #5ab889;
  --primary-600: #267f56;
  --primary-700: #1f6546;
  --accent-100: #fcefd0;
  --accent-400: #f0a838;
  --accent-500: #ea8b1c;
  --accent-600: #cf6913;
  --ink-400: #888888;
  --ink-500: #6d6d6d;
  --ink-600: #5d5d5d;
  --ink-700: #4f4f4f;
  --ink-900: #3d3d3d;
  --paper-50: #fafaf9;
  --paper-200: #e7e5e4;
  --paper-300: #d6d3d1;
  --paper-400: #a8a29e;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 45px rgb(0 0 0 / 0.18);
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid var(--primary-100);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

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

.brand-text strong,
.footer-brand strong,
h1,
h2,
h3 {
  font-family: Georgia, Cambria, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
}

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

.brand-text em {
  font-size: 12px;
  color: var(--ink-500);
  font-style: normal;
}

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

.nav-link {
  position: relative;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  border: 1px solid var(--primary-200);
  border-radius: 10px;
  color: var(--ink-900);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 9px 12px;
}

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

.header-search button,
.mobile-search button,
.primary-btn {
  border: 0;
  border-radius: 10px;
  color: var(--white);
  background: var(--primary-600);
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-700);
  background: var(--primary-50);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--primary-100);
  background: var(--white);
  padding: 14px 24px 20px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-panel .nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

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

.mobile-search input {
  width: 100%;
  padding: 10px 12px;
}

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.84), rgb(0 0 0 / 0.50), rgb(0 0 0 / 0.12)),
    linear-gradient(0deg, rgb(0 0 0 / 0.45), transparent 45%);
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary-100);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0 0 16px;
  color: var(--white);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
}

.hero-desc {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--paper-200);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-feature-card {
  max-width: 650px;
  padding: 24px;
  color: var(--white);
  background: rgb(255 255 255 / 0.12);
  border: 1px solid rgb(255 255 255 / 0.20);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(16px);
}

.hero-feature-card span {
  color: var(--primary-100);
  font-size: 14px;
  font-weight: 700;
}

.hero-feature-card h2 {
  margin: 8px 0;
  font-size: clamp(26px, 3vw, 36px);
}

.hero-feature-card p {
  margin: 0 0 18px;
  color: var(--paper-200);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgb(255 255 255 / 0.20);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgb(255 255 255 / 0.34);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.50);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: var(--white);
}

.section-wrap {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.intro-strip {
  margin-top: 28px;
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--ink-900);
  background: linear-gradient(135deg, var(--primary-50), #fff7e8);
  border: 1px solid var(--primary-100);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.intro-strip strong {
  display: block;
  font-size: 22px;
  font-family: Georgia, Cambria, "Times New Roman", "Noto Serif SC", serif;
}

.intro-strip span {
  color: var(--ink-600);
}

.intro-strip a,
.text-link {
  color: var(--primary-700);
  font-weight: 800;
}

.section-heading {
  margin: 0 0 28px;
}

.section-heading.centered {
  text-align: center;
}

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--ink-900);
  font-size: clamp(28px, 3vw, 40px);
}

.section-heading p {
  margin: 0;
  color: var(--ink-600);
}

.section-wrap > .section-heading,
.section-wrap.soft-panel,
.two-column,
.page-main {
  margin-top: 64px;
}

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

.featured-grid {
  margin-bottom: 20px;
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgb(220 242 228 / 0.75);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--ink-900);
}

.compact-card .poster-link {
  aspect-ratio: 3 / 4;
}

.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(0deg, rgb(0 0 0 / 0.72), transparent 45%);
  opacity: 0.9;
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  color: var(--white);
  background: rgb(38 127 86 / 0.90);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgb(207 105 19 / 0.92);
}

.play-mark {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--primary-700);
  background: rgb(255 255 255 / 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--ink-500);
  font-size: 13px;
}

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

.compact-card h3 {
  font-size: 17px;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--ink-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  padding: 4px 8px;
  color: var(--primary-700);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.category-card {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.4s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.16));
  z-index: 1;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 6px 0 0;
  color: var(--paper-200);
  font-size: 13px;
}

.ranking-box,
.soft-panel,
.filter-panel,
.text-card,
.detail-card,
.side-card {
  background: var(--white);
  border: 1px solid var(--primary-100);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.ranking-box,
.soft-panel {
  padding: 28px;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: var(--primary-50);
  transform: translateX(3px);
}

.mini-card img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.mini-card strong {
  display: block;
  color: var(--ink-900);
  line-height: 1.35;
}

.mini-card em {
  display: block;
  color: var(--ink-500);
  font-style: normal;
  font-size: 12px;
}

.mini-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--accent-600);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px;
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgb(90 184 137 / 0.46), transparent 38%),
    linear-gradient(135deg, var(--ink-900), #1f6546 65%, #cf6913);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 4vw, 56px);
}

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

.page-hero .eyebrow {
  color: var(--primary-100);
}

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

.category-overview-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--primary-100);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.thumb-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 170px;
  overflow: hidden;
}

.thumb-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-card div:last-child {
  padding: 22px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-overview-card p {
  margin: 0;
  color: var(--ink-600);
}

.filter-panel {
  margin: 30px 0;
  padding: 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: end;
}

.filter-panel h2 {
  margin: 0 0 6px;
}

.filter-panel p {
  margin: 0;
  color: var(--ink-600);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 150px 150px 150px;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 11px 12px;
}

.empty-state {
  display: none;
  margin: 30px 0;
  padding: 36px;
  color: var(--ink-600);
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--primary-200);
  border-radius: 18px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--ink-600);
  font-size: 14px;
}

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

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

.player-card {
  overflow: hidden;
  background: var(--ink-900);
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink-900);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.46), rgb(0 0 0 / 0.18));
  transition: opacity 0.2s ease;
}

.video-player.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.player-cover button {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: var(--primary-700);
  background: rgb(255 255 255 / 0.92);
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-cover button:hover {
  background: var(--white);
  transform: scale(1.05);
}

.player-cover span {
  display: inline-block;
  margin-left: 5px;
  font-size: 34px;
}

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

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.detail-card h2 {
  margin: 30px 0 10px;
  font-size: 24px;
}

.detail-card p {
  color: var(--ink-700);
  font-size: 16px;
}

.lead-text {
  padding-left: 16px;
  border-left: 4px solid var(--primary-600);
  font-weight: 700;
}

.detail-tags {
  margin: 18px 0;
}

.detail-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 18px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
}

.primary-btn.full {
  width: 100%;
  display: block;
  text-align: center;
}

.inner-related {
  width: 100%;
  margin-top: 56px;
}

.text-page {
  max-width: 980px;
}

.text-card {
  margin-top: 28px;
  padding: 34px;
}

.text-card p {
  color: var(--ink-700);
  font-size: 17px;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  max-width: 560px;
  color: var(--paper-300);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--paper-300);
}

.site-footer a:hover {
  color: var(--primary-400);
}

.copyright {
  padding: 20px 24px;
  color: var(--paper-400);
  text-align: center;
  border-top: 1px solid #454545;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .two-column,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .section-wrap,
  .footer-inner {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-text em {
    display: none;
  }

  .hero-slider {
    min-height: 680px;
  }

  .hero-content {
    padding: 74px 16px 96px;
  }

  .hero-control {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .hero-prev {
    left: 16px;
  }

  .hero-next {
    right: 16px;
  }

  .intro-strip,
  .filter-controls {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 42px 24px;
  }

  .detail-card,
  .ranking-box,
  .soft-panel,
  .filter-panel {
    padding: 22px;
  }
}
