:root {
  color-scheme: light;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --teal-700: #0f766e;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.1);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--stone-50);
  color: var(--gray-800);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--emerald-800), var(--teal-700));
  box-shadow: 0 12px 30px rgba(6, 95, 70, 0.25);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand {
  color: var(--white);
  font-size: 21px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.nav-link {
  padding: 20px 0;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 3px;
  border-radius: 999px;
  background: #a7f3d0;
  transform: scaleX(0);
  transition: transform 0.22s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.site-search {
  margin-left: auto;
  position: relative;
  width: min(330px, 30vw);
}

.site-search-input,
.page-filter,
.page-filter-select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  outline: none;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.92);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-header .site-search-input {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  padding-left: 20px;
}

.site-header .site-search-input::placeholder {
  color: rgba(236, 253, 245, 0.84);
}

.site-search-input:focus,
.page-filter:focus,
.page-filter-select:focus {
  border-color: #a7f3d0;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
  background: rgba(255, 255, 255, 0.98);
  color: var(--gray-800);
}

.site-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 90vw);
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--stone-200);
  overflow: hidden;
  color: var(--gray-800);
}

.search-result-link {
  display: block;
  padding: 13px 16px;
  border-bottom: 1px solid var(--stone-100);
}

.search-result-link:hover {
  background: #ecfdf5;
}

.search-result-link strong {
  display: block;
  line-height: 1.3;
}

.search-result-link span {
  color: var(--gray-500);
  font-size: 13px;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav a {
  display: block;
  color: #ffffff;
  padding: 10px 0;
  font-weight: 700;
}

.mobile-search {
  margin-top: 10px;
  position: relative;
}

.hero-slider {
  position: relative;
  height: 580px;
  background: #000000;
  overflow: hidden;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(5, 150, 105, 0.25);
  border: 1px solid rgba(167, 243, 208, 0.35);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.05;
  font-weight: 900;
  max-width: 850px;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.86);
  margin: 18px 0 0;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-700));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.32);
}

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

.ghost-btn.light {
  background: rgba(255, 255, 255, 0.14);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  padding: 0;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}

.intro-search-section {
  padding-bottom: 18px;
}

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

.section-heading h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  color: var(--gray-800);
  font-weight: 900;
}

.section-heading h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 34px;
  border-radius: 999px;
  background: var(--emerald-600);
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--gray-500);
  max-width: 780px;
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading.light h2,
.section-heading.light p {
  color: #ffffff;
}

.text-link {
  color: var(--emerald-700);
  white-space: nowrap;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #134e4a, #111827);
}

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

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

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.84);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge,
.rank-corner {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.year-badge {
  left: 12px;
  background: rgba(0, 0, 0, 0.48);
}

.rank-corner {
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.meta-line {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--gray-800);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  margin: 0 0 13px;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  background: #ecfdf5;
  border-color: #d1fae5;
  color: var(--emerald-700);
}

.movie-card.compact .movie-card-body {
  padding: 15px;
}

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

.emerald-panel {
  max-width: none;
  background: linear-gradient(135deg, var(--emerald-800), var(--teal-700));
  color: #ffffff;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.18);
}

.category-tile span {
  display: block;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.38), transparent 34%), linear-gradient(135deg, #052e2b, #0f172a);
  color: #ffffff;
}

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

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

.compact-hero,
.category-hero,
.ranking-hero,
.library-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
}

.filter-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
  padding: 18px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--stone-200);
}

.full-filter {
  flex-wrap: wrap;
}

.full-filter .page-filter {
  flex: 1 1 280px;
}

.full-filter .page-filter-select {
  flex: 0 1 180px;
  border-color: var(--stone-200);
}

.page-card-grid,
.ranking-page-grid {
  align-items: stretch;
}

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

.category-overview-card {
  padding: 26px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--stone-200);
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.category-overview-head h2 {
  margin: 0;
  font-size: 26px;
}

.category-overview-head p {
  margin: 8px 0 0;
  color: var(--gray-500);
}

.mini-row {
  grid-auto-columns: minmax(220px, 260px);
}

.detail-hero {
  min-height: 640px;
}

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-bg {
  opacity: 0.32;
  filter: blur(3px) saturate(1.15);
  transform: scale(1.02);
}

.detail-mask {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.46) 55%, rgba(0, 0, 0, 0.68));
}

.detail-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  margin-bottom: 34px;
}

.breadcrumb a:hover {
  color: #d1fae5;
}

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

.detail-cover {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

.detail-info h1 {
  max-width: 880px;
}

.detail-info .hero-tags span {
  color: #ffffff;
}

.detail-meta {
  margin-top: 22px;
}

.detail-section {
  padding-top: 52px;
  padding-bottom: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #ffffff;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.28), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

.player-overlay span {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 150, 105, 0.9);
  box-shadow: 0 20px 50px rgba(5, 150, 105, 0.42);
  font-size: 34px;
  padding-left: 6px;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 28px;
}

.text-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 1px solid var(--stone-200);
  box-shadow: var(--shadow-card);
}

.text-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-card p {
  margin: 0;
  color: var(--gray-700);
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.site-footer {
  background: linear-gradient(135deg, var(--slate-900), #1e293b);
  color: #cbd5e1;
  margin-top: 34px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 15px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer p {
  margin: 0;
  color: #cbd5e1;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

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

  .mobile-toggle {
    display: inline-flex;
  }

  .header-inner {
    gap: 14px;
  }

  .hero-slider {
    height: 520px;
  }

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

  .detail-cover {
    max-width: 280px;
  }

  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    bottom: 60px;
  }

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

  .content-section,
  .page-hero,
  .detail-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-card h2 {
    font-size: 15px;
  }

  .movie-card p,
  .tag-row,
  .meta-line {
    font-size: 12px;
  }

  .filter-panel {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .detail-hero {
    min-height: auto;
  }

  .player-overlay span {
    width: 70px;
    height: 70px;
    font-size: 26px;
  }
}
