:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #111827;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #111827;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --cyan-400: #22d3ee;
  --amber-500: #f59e0b;
  --rose-500: #f43f5e;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #001b14;
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-400));
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.45);
}

.logo-text {
  background: linear-gradient(90deg, var(--emerald-500), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.main-nav a,
.mobile-panel a {
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--emerald-500);
}

.header-search {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 250px;
}

.header-search input,
.hero-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  outline: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.62);
  padding: 11px 48px 11px 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.header-search button,
.hero-search button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #022c22;
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-400));
  cursor: pointer;
}

.nav-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 0 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

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

.mobile-panel a {
  display: block;
  padding: 11px 6px;
}

.section {
  padding: 68px 0;
}

.section.alt {
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

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

.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--emerald-600);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-title {
  margin: 0;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.2;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--gray-600);
  line-height: 1.8;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.28), transparent 28%),
    radial-gradient(circle at 80% 15%, rgba(34, 211, 238, 0.22), transparent 26%),
    linear-gradient(100deg, var(--slate-950), #064e3b 48%, var(--slate-900));
  padding: 78px 0 84px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.10) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.08) 25%, transparent 25%);
  background-size: 64px 64px;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-head {
  max-width: 880px;
  margin: 0 auto 38px;
  text-align: center;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--emerald-500), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 760px;
  margin: 18px auto 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: clamp(17px, 2.5vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.hero-search {
  position: relative;
  max-width: 600px;
  margin: 30px auto 0;
}

.hero-search input {
  height: 56px;
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn,
.link-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #022c22;
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-400));
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.25);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.36);
}

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

.link-more {
  color: var(--emerald-700);
  background: #ecfdf5;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: #d1fae5;
  font-size: 13px;
  font-weight: 800;
}

.hero .chip {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(15, 23, 42, 0.32);
}

.hero-grid,
.movie-grid,
.category-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.movie-card,
.feature-card,
.category-card,
.rank-card,
.info-panel,
.detail-panel {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.movie-card,
.feature-card,
.category-card,
.rank-card {
  display: block;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover,
.feature-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(16, 185, 129, 0.38);
}

.poster-wrap,
.feature-media {
  position: relative;
  overflow: hidden;
  background: var(--slate-800);
}

.poster-wrap img,
.feature-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.movie-card:hover img,
.feature-card:hover img {
  transform: scale(1.06);
  filter: saturate(1.08);
}

.feature-media img {
  aspect-ratio: 16 / 13;
}

.feature-overlay,
.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(2, 6, 23, 0.34);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feature-card:hover .feature-overlay,
.movie-card:hover .poster-overlay {
  opacity: 1;
}

.play-circle,
.player-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: var(--white);
  background: var(--emerald-500);
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.35);
}

.play-circle::before,
.player-play::before {
  content: "";
  display: block;
  margin-left: 4px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid currentColor;
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.card-body,
.feature-body {
  padding: 18px;
}

.card-title,
.feature-title {
  display: -webkit-box;
  margin: 10px 0 8px;
  overflow: hidden;
  color: var(--gray-900);
  font-weight: 900;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title {
  min-height: 44px;
  font-size: 17px;
}

.feature-title {
  color: var(--white);
  font-size: 26px;
}

.card-desc,
.feature-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--gray-600);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.feature-desc {
  color: rgba(226, 232, 240, 0.92);
}

.card-meta,
.feature-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 14px;
  color: var(--gray-500);
  font-size: 13px;
}

.feature-card {
  position: relative;
  min-height: 430px;
  color: var(--white);
  background: var(--slate-900);
}

.feature-card .feature-media,
.feature-card .feature-media img {
  height: 100%;
}

.feature-card .feature-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.90));
}

.feature-card .chip {
  color: var(--white);
  background: var(--emerald-500);
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.24), transparent 28%),
    linear-gradient(100deg, var(--slate-950), var(--slate-800));
  padding: 58px 0;
}

.page-hero h1 {
  max-width: 880px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--emerald-500);
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px 140px;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  background: var(--slate-900);
  box-shadow: var(--shadow-card);
}

.filter-select {
  color: var(--gray-900);
  background: var(--white);
  padding-right: 18px;
}

.result-count {
  color: var(--white);
  font-weight: 800;
  text-align: center;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 170px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 18px 12px 12px;
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #022c22;
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-400));
  font-size: 20px;
  font-weight: 900;
}

.rank-cover img {
  width: 170px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.rank-title {
  margin: 0 0 7px;
  font-size: 20px;
}

.rank-desc {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-card {
  padding: 24px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
}

.category-card p {
  color: var(--gray-600);
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-main {
  padding: 38px 0 72px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

.detail-poster {
  position: sticky;
  top: 92px;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  background: var(--slate-800);
}

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

.detail-panel,
.info-panel {
  padding: 26px;
}

.detail-panel h2,
.info-panel h2,
.related-section h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.detail-panel p,
.info-panel p {
  color: var(--gray-700);
  line-height: 1.9;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 0;
}

.player-box {
  overflow: hidden;
  border-radius: 22px;
  background: var(--slate-950);
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  z-index: 4;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.30), rgba(2, 6, 23, 0.78));
}

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

.player-play {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-play:hover {
  transform: scale(1.08);
  background: var(--emerald-600);
}

.player-caption {
  padding: 18px 22px;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
}

.player-caption h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.player-caption p {
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  line-height: 1.7;
}

.related-section {
  margin-top: 34px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
  padding: 48px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 28px;
  margin-bottom: 34px;
}

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

.site-footer p,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.8;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 18px;
  color: var(--gray-600);
  background: var(--white);
  text-align: center;
  box-shadow: var(--shadow-card);
}

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

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

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

  .hero-grid,
  .movie-grid,
  .movie-grid.three,
  .category-grid,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card {
    min-height: 380px;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .detail-poster {
    position: static;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 62px;
  }

  .hero {
    padding: 54px 0 62px;
  }

  .hero-grid,
  .movie-grid,
  .movie-grid.three,
  .category-grid,
  .footer-grid,
  .detail-layout,
  .filters {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 46px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .rank-card {
    grid-template-columns: 50px 96px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-cover img {
    width: 96px;
  }

  .rank-action {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
