:root {
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-100: #d1fae5;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 25px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: var(--stone-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  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: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--emerald-800), var(--teal-700));
  box-shadow: 0 10px 30px rgba(6, 95, 70, 0.25);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--emerald-900);
  background: var(--emerald-100);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

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

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

.nav-link {
  font-weight: 600;
  opacity: 0.88;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: 280px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder {
  color: var(--emerald-100);
}

.header-search button {
  border: 0;
  color: var(--emerald-900);
  background: var(--emerald-100);
  padding: 10px 16px;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 26px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.mobile-nav-link {
  display: block;
  padding: 12px 0;
  font-weight: 700;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

.mobile-search input::placeholder {
  color: var(--emerald-100);
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--emerald-900);
  background: var(--emerald-100);
  font-weight: 800;
}

.quick-category-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 12px;
  scrollbar-width: none;
}

.quick-category-strip::-webkit-scrollbar {
  display: none;
}

.quick-category-strip a {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--emerald-100);
  font-size: 14px;
}

.hero {
  position: relative;
  height: 560px;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.72) 35%, rgba(0, 0, 0, 0.22) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 54px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--emerald-100);
  background: rgba(5, 150, 105, 0.76);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 840px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 760px;
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: clamp(16px, 2.2vw, 22px);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(209, 250, 229, 0.92);
  color: var(--emerald-800);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: var(--emerald-600);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.35);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--emerald-700);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.ghost-button.dark {
  color: var(--emerald-800);
  border-color: var(--emerald-100);
  background: var(--emerald-100);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.48);
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.tinted-section {
  background: linear-gradient(135deg, #f1f5f9, #f5f5f4);
}

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

.section-heading h2,
.page-intro h2,
.compact-section h2 {
  position: relative;
  margin: 0;
  padding-left: 18px;
  color: var(--gray-800);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-heading h2::before,
.page-intro h2::before,
.compact-section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12em;
  width: 7px;
  height: 1.05em;
  border-radius: 999px;
  background: var(--emerald-600);
}

.section-heading a,
.text-link {
  color: var(--emerald-700);
  font-weight: 800;
}

.page-intro p {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--gray-600);
}

.featured-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 24px;
  scroll-snap-type: x mandatory;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-lg);
  background: var(--white);
  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);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--stone-200);
}

.featured-row .card-cover {
  aspect-ratio: 16 / 10;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 55%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(5, 150, 105, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-year,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  display: inline-flex;
  min-width: 46px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  right: 12px;
  background: rgba(5, 150, 105, 0.92);
}

.rank-badge {
  left: 12px;
  background: rgba(234, 88, 12, 0.92);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

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

.category-tile,
.category-overview-card a {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-800), var(--teal-600));
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-overview-card a {
  min-height: 190px;
}

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

.category-tile span,
.category-overview-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-overview-card span {
  color: var(--emerald-100);
  font-weight: 800;
}

.category-overview-card p {
  margin: 12px 0 20px;
  color: rgba(255, 255, 255, 0.88);
}

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

.wide-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.wide-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.wide-card strong {
  color: var(--gray-900);
  font-size: 22px;
}

.wide-card p {
  margin: 8px 0 12px;
  color: var(--gray-600);
}

.wide-card span {
  color: var(--gray-500);
  font-size: 14px;
}

.sub-hero {
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.55), transparent 35%), linear-gradient(135deg, var(--emerald-900), var(--teal-700));
}

.sub-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0;
}

.sub-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

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

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-keyword {
  display: block;
  margin-bottom: 16px;
}

.filter-panel span {
  display: block;
  margin-bottom: 7px;
  color: var(--gray-700);
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  outline: 0;
  padding: 11px 14px;
  background: var(--stone-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

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

.filter-count {
  margin-top: 14px;
  color: var(--gray-500);
  font-size: 14px;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  grid-row: span 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--emerald-600);
  font-weight: 900;
}

.ranking-list a {
  color: var(--gray-900);
  font-weight: 900;
}

.ranking-list small {
  color: var(--gray-500);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: #000;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  filter: blur(8px);
  transform: scale(1.04);
}

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

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

.detail-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: var(--emerald-100);
  font-size: 14px;
  font-weight: 700;
}

.detail-text h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.lead {
  max-width: 800px;
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-section {
  padding-top: 42px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(5, 150, 105, 0.2), rgba(0, 0, 0, 0.22));
  cursor: pointer;
}

.play-cover.is-hidden {
  display: none;
}

.play-cover span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 20px 40px rgba(5, 150, 105, 0.35);
  font-size: 34px;
  transform: translateX(2px);
}

.player-side {
  align-self: stretch;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-side h2 {
  margin: 0 0 12px;
  color: var(--gray-900);
  font-size: 24px;
}

.player-side p {
  margin: 0 0 20px;
  color: var(--gray-600);
}

.compact-section {
  max-width: 980px;
}

.article-text {
  margin: 14px 0 28px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  color: var(--gray-700);
  font-size: 17px;
}

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

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

.footer-logo {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.footer-brand p {
  max-width: 480px;
  margin: 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--emerald-100);
}

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

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

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

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

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
  }

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

  .hero {
    height: 560px;
  }

  .hero-content {
    bottom: 56px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .card-body {
    padding: 13px;
  }

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

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

  .wide-card {
    grid-template-columns: 120px 1fr;
    gap: 14px;
  }

  .wide-card strong {
    font-size: 17px;
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .ranking-list {
    grid-template-columns: 1fr;
  }

  .detail-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 46px 0;
  }

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

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

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

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

  .wide-card {
    grid-template-columns: 1fr;
  }
}
