:root {
  --bg-deep: #020617;
  --bg-dark: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
  --accent: #10b981;
  --accent-strong: #059669;
  --accent-soft: rgba(16, 185, 129, 0.16);
  --warning: #f59e0b;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.22), transparent 30%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body.is-menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #34d399);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.32);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-soft);
  transition: color 0.25s ease, background 0.25s ease;
}

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

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

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(2, 6, 23, 0.98);
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #020617;
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.93) 0%, rgba(2, 6, 23, 0.72) 43%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, #020617 0%, transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 78vh;
  padding-top: 96px;
  padding-bottom: 64px;
}

.hero-copy {
  width: min(680px, 100%);
}

.hero-tags,
.tag-row,
.detail-tags,
.hero-meta,
.card-meta,
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.13);
}

.hero h1,
.page-hero h1,
.rank-hero h1,
.detail-intro h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.rank-hero p,
.detail-intro p {
  margin: 0 0 24px;
  max-width: 760px;
  color: var(--text-soft);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-meta {
  margin-bottom: 30px;
  color: var(--text-soft);
}

.hero-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.primary-button,
.ghost-button,
.search-panel button,
.global-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.search-panel button,
.global-search-form button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.28);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.68);
}

.primary-button:hover,
.ghost-button:hover,
.search-panel button:hover,
.global-search-form button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.55);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--accent);
}

.search-band {
  position: relative;
  z-index: 8;
  margin-top: -54px;
}

.search-panel {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h2,
.ranking-title h2,
.section-heading h2,
.detail-article h2,
.detail-side-card h2 {
  margin: 4px 0 0;
  font-size: clamp(25px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.global-search-form,
.search-tools,
.local-filter {
  display: flex;
  gap: 12px;
}

.global-search-form input,
.search-tools input,
.search-tools select,
.local-filter input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.62);
  outline: none;
  padding: 0 16px;
}

.search-tools select {
  max-width: 220px;
}

.page-section {
  padding: 78px 0;
}

.page-section-muted {
  background: rgba(15, 23, 42, 0.42);
}

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

.eyebrow {
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-more,
.text-link {
  color: #6ee7b7;
  font-weight: 800;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-tile:hover img {
  opacity: 0.62;
  transform: scale(1.08);
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 18px;
}

.category-tile span {
  padding-top: 98px;
  font-size: 23px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 7px;
  color: var(--text-soft);
  line-height: 1.55;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(15, 23, 42, 0.96);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.9));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(10px);
}

.poster-play {
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 17px;
}

.card-meta {
  color: var(--text-muted);
  font-size: 13px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-card h2 a:hover {
  color: #6ee7b7;
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 48px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.compact-card .card-body {
  padding: 13px;
}

.compact-card p,
.compact-card .tag-row {
  display: none;
}

.ranking-panel,
.detail-side-card,
.detail-article,
.video-shell,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 38px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.ranking-item:hover {
  background: rgba(16, 185, 129, 0.14);
}

.rank-number {
  color: #6ee7b7;
  font-weight: 900;
}

.ranking-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 42px 0;
  color: var(--text-soft);
  background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 30px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: var(--text-soft);
}

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

.inner-page {
  padding-top: 72px;
}

.page-hero,
.compact-hero,
.category-hero {
  padding: 86px 0 54px;
  background:
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.95));
}

.compact-hero h1,
.category-hero h1,
.rank-hero h1 {
  font-size: clamp(40px, 6vw, 70px);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-cover-stack img {
  width: 100%;
  height: 190px;
  border-radius: 16px;
  object-fit: cover;
}

.category-overview-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-overview-body h2 {
  margin: 8px 0;
  font-size: 32px;
}

.category-overview-body p {
  max-width: 620px;
  color: var(--text-soft);
  line-height: 1.8;
}

.local-filter,
.search-tools {
  margin-top: 24px;
  align-items: center;
}

.local-filter {
  flex-direction: column;
  align-items: stretch;
}

.filter-buttons button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  padding: 0 14px;
}

.filter-buttons button:hover,
.filter-buttons button.is-active {
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.48);
  background: rgba(16, 185, 129, 0.18);
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--text-soft);
  text-align: center;
}

.rank-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
}

.rank-hero img,
.rank-hero-mask {
  position: absolute;
  inset: 0;
}

.rank-hero-mask {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.38));
}

.rank-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 88px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.ranking-card-poster {
  position: relative;
}

.ranking-card-poster span {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: rgba(16, 185, 129, 0.9);
}

.ranking-card-poster img {
  width: 108px;
  height: 150px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.ranking-card p {
  margin: 0 0 14px;
  color: var(--text-soft);
  line-height: 1.7;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

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

.detail-backdrop {
  filter: blur(2px);
  transform: scale(1.02);
}

.detail-mask {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, #020617, transparent 48%);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 42px;
  padding-bottom: 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: #6ee7b7;
}

.detail-intro {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 270px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-meta {
  margin-bottom: 20px;
}

.player-section {
  padding-top: 0;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.26), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.38);
}

.play-overlay strong {
  font-size: 22px;
}

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

.detail-article,
.detail-side-card {
  padding: 28px;
}

.detail-article p {
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.95;
}

.detail-side-card {
  position: sticky;
  top: 94px;
}

.detail-side-card dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.detail-side-card div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-side-card dt {
  color: var(--text-muted);
}

.detail-side-card dd {
  margin: 0;
  color: var(--text-main);
}

@media (max-width: 1120px) {
  .category-grid,
  .large-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .ranking-panel,
  .detail-side-card {
    position: static;
  }
}

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

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

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

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .footer-grid,
  .category-overview-card,
  .detail-intro {
    grid-template-columns: 1fr;
  }

  .global-search-form,
  .search-tools {
    flex-direction: column;
  }

  .search-tools select {
    max-width: none;
  }

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

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

  .detail-poster {
    width: 210px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

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

  .movie-grid,
  .large-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .ranking-card-poster img {
    width: 86px;
    height: 124px;
  }

  .page-section {
    padding: 54px 0;
  }

  .detail-side-card div {
    grid-template-columns: 1fr;
  }
}
