:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: #111827;
  --card-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.16), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), #2563eb);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.25);
}

.brand-name {
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.14);
}

.header-search {
  width: 260px;
  display: flex;
  align-items: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
}

.header-search input,
.big-search input,
.search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
}

.header-search input::placeholder,
.big-search input::placeholder,
.search-panel input::placeholder {
  color: #64748b;
}

.header-search button,
.big-search button,
.search-panel button {
  border: 0;
  color: #ffffff;
  background: var(--emerald);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
}

.mobile-nav a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--muted-strong);
}

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

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-position: center;
  background-size: cover;
  filter: blur(1px) saturate(1.08);
  transform: scale(1.05);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 60px;
  padding: 120px 0 100px;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--emerald-bright);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 20px;
  max-width: 900px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.movie-tags,
.year-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span,
.movie-tags a,
.year-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.09);
  color: #bbf7d0;
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.25s ease;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), #2563eb);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.24);
}

.btn.ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: #ffffff;
  font-weight: 700;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 30px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #64748b;
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--emerald-bright);
}

.search-panel {
  position: relative;
  z-index: 3;
  margin-top: -38px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel form,
.big-search {
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  background: rgba(2, 6, 23, 0.72);
}

.category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 16px;
  padding-bottom: 4px;
}

.category-chip {
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.68);
  transition: 0.25s ease;
}

.category-chip span {
  color: var(--muted);
  font-size: 13px;
}

.category-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(52, 211, 153, 0.55);
}

.section-block {
  padding: 76px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.section-more,
.result-count {
  color: var(--emerald-bright);
  font-weight: 700;
}

.filter-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 22px;
  padding-bottom: 6px;
}

.filter-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  padding: 10px 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.25s ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.5);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 2.82;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-type,
.poster-duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.poster-type {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: rgba(16, 185, 129, 0.86);
}

.poster-duration {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
}

.rank-badge {
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.9);
}

.movie-info {
  padding: 15px;
}

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.25s ease;
}

.movie-title:hover {
  color: var(--emerald-bright);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-info p {
  display: -webkit-box;
  min-height: 45px;
  overflow: hidden;
  margin: 11px 0 13px;
  color: var(--muted-strong);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags {
  gap: 6px;
}

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

.rank-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
}

.sticky-panel {
  position: sticky;
  top: 96px;
}

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

.mini-list.tight {
  gap: 8px;
}

.mini-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
  transition: 0.25s ease;
}

.mini-card:hover {
  border-color: rgba(52, 211, 153, 0.5);
  transform: translateX(3px);
}

.mini-card img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.mini-card strong,
.mini-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card strong {
  color: #ffffff;
  font-size: 14px;
}

.mini-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mini-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #ffffff;
  font-weight: 900;
}

.mini-rank + img {
  display: none;
}

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

.category-feature,
.category-overview-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.78));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.category-feature a,
.category-overview-card {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.category-feature span,
.category-overview-head span {
  color: var(--emerald-bright);
  font-size: 13px;
  font-weight: 800;
}

.category-feature strong,
.category-overview-head strong {
  color: #ffffff;
  font-size: 24px;
}

.category-feature em,
.category-overview-card p {
  color: var(--muted-strong);
  font-style: normal;
}

.page-main {
  padding: 42px 0 90px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(37, 99, 235, 0.12)),
    rgba(15, 23, 42, 0.72);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 17px;
}

.category-hero .year-tags {
  margin-top: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--emerald-bright);
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-link {
  justify-self: start;
  margin-top: 8px;
}

.search-page .page-hero {
  display: grid;
  gap: 12px;
}

.big-search {
  max-width: 760px;
  margin-top: 12px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  margin-bottom: 40px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.18), transparent 30rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 2.82;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.detail-intro {
  max-width: 780px;
  margin: 0 0 20px;
  color: var(--muted-strong);
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
  color: var(--muted-strong);
  font-size: 13px;
}

.player-section {
  margin-bottom: 36px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.76);
}

.player-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.player-heading h2 {
  margin: 0;
  font-size: 28px;
}

.player-heading > span {
  color: var(--muted);
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.4);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2)),
    radial-gradient(circle, rgba(16, 185, 129, 0.18), transparent 28rem);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-player.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), #2563eb);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.28);
  font-size: 28px;
  text-indent: 4px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 16px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 30px;
  padding: 48px 0 34px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

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

  .header-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-block;
  }

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

  .split-layout,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .hero-carousel {
    min-height: 760px;
  }

  .hero-content,
  .detail-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster,
  .detail-cover {
    max-width: 340px;
  }

  .movie-grid,
  .compact-grid,
  .all-grid,
  .related-grid,
  .category-feature-grid,
  .category-overview-grid,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-search {
    display: none;
  }
}

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

  .nav-shell {
    min-height: 64px;
  }

  .brand-name {
    font-size: 15px;
  }

  .hero-carousel {
    min-height: 700px;
  }

  .hero-content {
    padding: 78px 0 92px;
  }

  .hero-copy p,
  .detail-intro {
    font-size: 15px;
  }

  .hero-poster,
  .detail-cover {
    max-width: 260px;
  }

  .search-panel form,
  .big-search {
    flex-direction: column;
    border-radius: 20px;
  }

  .search-panel button,
  .big-search button {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .all-grid,
  .related-grid,
  .category-feature-grid,
  .category-overview-grid,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero,
  .player-section {
    padding: 20px;
    border-radius: 22px;
  }

  .section-heading,
  .player-heading,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
