:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.76);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #e5e7eb;
  --white: #ffffff;
  --accent: #14b8a6;
  --accent-strong: #0f766e;
  --accent-soft: rgba(20, 184, 166, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.16), transparent 34%), var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.24);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}

.nav-link {
  padding: 22px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--white);
}

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

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

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.65);
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 40%);
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  color: #5eead4;
  background: rgba(20, 184, 166, 0.1);
  font-size: 13px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--white);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 78px);
}

.hero p {
  margin: 22px 0 0;
  max-width: 620px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 16px 36px rgba(20, 184, 166, 0.24);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  color: var(--white);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 70px;
  z-index: 6;
  display: flex;
  width: min(720px, calc(100% - 32px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.hero-search input,
.filter-row input,
.filter-row select {
  min-width: 0;
  border: 1px solid var(--line);
  outline: none;
  color: var(--white);
  background: rgba(2, 6, 23, 0.72);
}

.hero-search input {
  flex: 1;
  border: 0;
  padding: 0 16px;
  background: transparent;
}

.hero-search button {
  border: 0;
  border-radius: 13px;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.content-section {
  padding: 58px 0;
}

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

.section-head h2,
.panel-block-head h2,
.panel-block-head h3,
.text-card h2,
.side-card h2 {
  margin: 0;
  color: var(--white);
  line-height: 1.2;
}

.section-head h2 {
  font-size: 30px;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.panel-block-head a {
  color: #5eead4;
  font-weight: 700;
  font-size: 14px;
}

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

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.45);
  background: rgba(15, 23, 42, 0.96);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.movie-cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, rgba(2, 6, 23, 0.1) 50%, transparent 100%);
}

.movie-play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(20, 184, 166, 0.92);
}

.movie-card-body {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.movie-card-body strong {
  overflow: hidden;
  color: var(--white);
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card-body span,
.movie-card-body em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card-wide .movie-card-link {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.movie-card-wide .movie-cover-wrap {
  aspect-ratio: 16 / 10;
}

.movie-card-wide .movie-card-body {
  align-content: center;
}

.movie-card-wide .movie-card-body em {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
}

.rank-panel,
.panel-block,
.filter-panel,
.text-card,
.side-card,
.player-card,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
}

.rank-panel {
  position: sticky;
  top: 92px;
  height: max-content;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.42);
}

.rank-item span,
.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), #2563eb);
  font-weight: 800;
}

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

.rank-item em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.category-pill-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(37, 99, 235, 0.08));
}

.category-pill-card strong {
  color: var(--white);
  font-size: 18px;
}

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

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

.panel-block {
  padding: 22px;
}

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

.page-hero {
  border-bottom: 1px solid var(--line);
  padding: 78px 0;
  background: radial-gradient(circle at 78% 30%, rgba(20, 184, 166, 0.18), transparent 32%), linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 58px);
}

.page-hero p {
  width: min(720px, 100%);
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

.category-overview-card {
  overflow: hidden;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 2px;
  background: #020617;
}

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

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

.category-overview-body h2 {
  margin: 0;
  color: var(--white);
}

.category-overview-body p {
  margin: 8px 0 14px;
  color: var(--muted);
}

.category-overview-body span {
  color: #5eead4;
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 18px;
}

.filter-title {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 18px;
  font-weight: 800;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 12px;
}

.filter-row input,
.filter-row select {
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
}

.empty-state {
  display: none;
  padding: 42px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 46px 118px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

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

.rank-meta {
  min-width: 0;
}

.rank-meta strong,
.rank-meta em,
.rank-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-meta strong {
  color: var(--white);
  font-size: 18px;
  white-space: nowrap;
}

.rank-meta em {
  color: #5eead4;
  font-style: normal;
  font-size: 13px;
}

.rank-meta small {
  color: var(--muted);
  white-space: nowrap;
}

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

.detail-bg,
.detail-bg-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(22px) saturate(1.1);
  transform: scale(1.08);
}

.detail-bg-mask {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72)), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 70%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  min-height: 440px;
  padding: 46px 0;
}

.detail-poster img {
  width: 260px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.breadcrumb a {
  color: #5eead4;
}

.detail-info h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.detail-line {
  max-width: 780px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span,
.tag-row span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #cbd5e1;
  font-size: 13px;
}

.tag-row span {
  border-color: rgba(20, 184, 166, 0.28);
  color: #5eead4;
  background: rgba(20, 184, 166, 0.1);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 44px 0 66px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.text-card,
.side-card {
  padding: 18px;
}

.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #000000;
}

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

.play-button {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(20, 184, 166, 0.22), rgba(2, 6, 23, 0.48) 50%, rgba(2, 6, 23, 0.82));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 48px rgba(20, 184, 166, 0.32);
  font-size: 28px;
}

.play-button strong {
  font-size: 18px;
}

.text-card h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.text-card p {
  margin: 0 0 12px;
  color: #cbd5e1;
}

.detail-side {
  min-width: 0;
}

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

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

.compact-item {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.36);
}

.compact-item img {
  width: 126px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

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

.compact-item strong {
  color: var(--white);
}

.compact-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.4fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
}

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

.footer-grid a {
  display: block;
  margin: 6px 0;
}

.footer-links {
  columns: 2;
}

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

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

  .nav-toggle {
    display: block;
  }

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

  .poster-grid-large,
  .poster-grid-compact,
  .panel-grid,
  .category-overview-grid,
  .split-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero {
    min-height: 78vh;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-search {
    bottom: 80px;
  }

  .hero-arrow {
    display: none;
  }

  .poster-grid,
  .poster-grid-large,
  .poster-grid-compact,
  .library-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .movie-card-wide .movie-card-link {
    display: block;
  }

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

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

  .rank-card {
    grid-template-columns: 40px 88px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-card img {
    width: 88px;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .detail-poster img {
    width: 190px;
  }

  .compact-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .compact-item img {
    width: 96px;
  }

  .footer-links {
    columns: 1;
  }
}
