:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50) 0%, #ffffff 58%, #ffffff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  min-height: 70vh;
}

.container {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.86);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(100% - 32px, 1280px);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--gray-900);
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

.brand-name {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--gray-600);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-700);
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, 1280px);
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.16));
}

.hero-content-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-content {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  max-width: 720px;
}

.hero-tag,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--emerald-500);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-kicker {
  color: var(--emerald-700);
  background: var(--emerald-100);
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 18px 0 16px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-search {
  display: flex;
  width: min(100%, 640px);
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 18px;
  color: #ffffff;
  background: transparent;
  outline: none;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.hero-search button,
.primary-button {
  border: 0;
  border-radius: 14px;
  padding: 14px 24px;
  color: #ffffff;
  background: var(--emerald-600);
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.hero-search button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  background: var(--emerald-700);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

.primary-button.small {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 14px 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.text-button {
  color: var(--emerald-700);
  border-color: var(--emerald-100);
  background: var(--emerald-50);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.page-stack {
  padding: 72px 0;
}

.content-section + .content-section {
  margin-top: 80px;
}

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

.section-head h2 {
  margin: 12px 0 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.section-head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

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

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

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

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

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

.movie-slider .movie-card {
  scroll-snap-align: start;
}

.movie-card,
.movie-row,
.category-card,
.category-overview-card,
.detail-panel,
.side-panel {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #e5e7eb);
}

.card-cover img,
.category-card img,
.category-overview-card img,
.detail-hero img,
.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card img,
.movie-row img,
.category-card img {
  transition: transform 0.4s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
}

.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: var(--emerald-600);
}

.cover-title {
  position: absolute;
  z-index: 3;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
}

.cover-title span,
.card-tags span,
.row-meta span:first-child {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: var(--emerald-100);
  font-size: 12px;
  font-weight: 800;
}

.cover-title span {
  color: #ffffff;
  background: var(--emerald-500);
}

.cover-title h3 {
  margin: 9px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.card-body {
  padding: 18px;
}

.card-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.card-tags em {
  color: var(--gray-500);
  font-size: 12px;
  font-style: normal;
}

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

.movie-card:hover h3,
.movie-row:hover h3 {
  color: var(--emerald-600);
}

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

.movie-card-large .card-body p {
  -webkit-line-clamp: 3;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 700;
}

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

.movie-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 110px;
  overflow: hidden;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.row-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #e5e7eb);
}

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

.row-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 20px;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.72));
}

.category-card div {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
}

.category-card span,
.category-overview-body span {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.category-card p,
.category-overview-body p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--gray-900);
}

.compact-hero {
  padding: 90px 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.32), transparent 28%),
    linear-gradient(135deg, #111827 0%, #0f172a 50%, #064e3b 100%);
}

.category-hero {
  min-height: 420px;
  display: flex;
  align-items: center;
}

.category-hero > img,
.detail-hero > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.58;
}

.page-hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.2));
}

.page-hero .container,
.detail-hero-inner {
  position: relative;
  z-index: 2;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  min-height: 210px;
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body h2 {
  margin: 10px 0 0;
  font-size: 22px;
  line-height: 1.35;
}

.category-overview-body p {
  color: var(--gray-600);
}

.filter-scope {
  padding: 28px;
  border: 1px solid var(--gray-200);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  min-width: min(100%, 520px);
}

.filter-input,
.filter-select {
  min-height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-700);
  background: #ffffff;
  outline: none;
}

.filter-input {
  flex: 1;
  min-width: 260px;
  padding: 0 16px;
}

.filter-select {
  padding: 0 14px;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.empty-state {
  display: none;
  margin: 32px 0 0;
  padding: 22px;
  border-radius: 18px;
  color: var(--gray-600);
  background: var(--gray-100);
  text-align: center;
}

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

.detail-hero {
  min-height: 520px;
  display: flex;
  align-items: end;
  padding: 92px 0 70px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: -42px;
}

.detail-main,
.detail-side {
  position: relative;
  z-index: 3;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 700;
}

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

.player-section,
.detail-panel,
.side-panel {
  border-radius: 24px;
  overflow: hidden;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
  font-size: 20px;
  font-weight: 900;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  display: inline-grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--emerald-600);
  box-shadow: 0 20px 48px rgba(5, 150, 105, 0.38);
}

.detail-panel,
.side-panel {
  margin-top: 24px;
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.detail-title-row h2 {
  margin: 10px 0 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

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

.meta-list div {
  padding: 16px;
  border-radius: 16px;
  background: var(--gray-50);
}

.meta-list dt {
  margin-bottom: 7px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.meta-list dd {
  margin: 0;
  color: var(--gray-900);
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  font-size: 13px;
  font-weight: 800;
}

.article-block + .article-block {
  margin-top: 28px;
}

.article-block h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.article-block p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.9;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 96px;
}

.side-list {
  margin-top: 18px;
}

.side-list .movie-row {
  grid-template-columns: 120px 1fr;
}

.side-list .movie-row p {
  -webkit-line-clamp: 1;
}

.site-footer {
  margin-top: 80px;
  padding: 44px 0;
  border-top: 1px solid var(--gray-200);
  background: #ffffff;
}

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

.footer-brand {
  font-size: 22px;
}

.site-footer p {
  max-width: 680px;
  color: var(--gray-600);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 24px;
  color: var(--gray-600);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--emerald-700);
}

@media (max-width: 1080px) {
  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-overview-grid,
  .movie-grid-four,
  .movie-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-side {
    position: static;
  }
}

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

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

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

  .hero {
    min-height: 660px;
  }

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

  .hero-search,
  .section-head-split,
  .filter-controls,
  .detail-title-row,
  .footer-inner {
    display: grid;
  }

  .hero-search button {
    width: 100%;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-overview-grid,
  .movie-grid-four,
  .movie-grid-three {
    grid-template-columns: 1fr;
  }

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

  .movie-row,
  .side-list .movie-row {
    grid-template-columns: 120px 1fr;
  }

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

  .detail-panel,
  .side-panel,
  .filter-scope {
    padding: 20px;
  }

  .filter-input {
    min-width: 100%;
  }

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

@media (max-width: 480px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

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

  .movie-row,
  .side-list .movie-row {
    grid-template-columns: 1fr;
  }

  .row-cover {
    aspect-ratio: 16 / 9;
  }

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