:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-soft: rgba(30, 41, 59, 0.68);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.16), transparent 30rem),
    radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
}

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: 80;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.9));
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  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;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.28);
}

.brand-text {
  display: grid;
  gap: 3px;
}

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

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #cbd5e1;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 24px 0;
  transition: color 0.25s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 17px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--cyan);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

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

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

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

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 6s ease;
}

.hero-bg-img.is-active {
  opacity: 0.55;
  transform: scale(1.1);
}

.hero-mask {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 38%);
}

.hero-inner {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 56px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-lead,
.page-hero p,
.detail-lead {
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.34);
  font-size: 12px;
  font-weight: 700;
}

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

.btn-primary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.26);
}

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

.btn-ghost,
.section-link {
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.64);
}

.slim {
  min-height: 40px;
  padding: 0 18px;
}

.hero-poster {
  position: relative;
  width: min(360px, 100%);
  justify-self: end;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 18px;
  text-align: center;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(14px);
}

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.56);
  backdrop-filter: blur(12px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(15, 23, 42, 0.88);
}

.hero-prev {
  left: 0;
  transform: translate(-20%, -50%);
}

.hero-next {
  right: 0;
  transform: translate(20%, -50%);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--cyan);
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-panel {
  margin-top: -38px;
  padding: 26px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-top: 18px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  outline: none;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.68);
  padding: 0 16px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

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

.category-tile,
.category-panel,
.content-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.72));
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.26);
}

.category-tile {
  min-height: 172px;
  padding: 20px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile span {
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small,
.category-tile em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.category-tile em {
  color: #67e8f9;
  font-size: 12px;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.52);
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 24px 64px rgba(34, 211, 238, 0.12);
}

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

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card-wide .poster-wrap img {
  aspect-ratio: 16 / 9;
}

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.04) 62%);
  opacity: 0.86;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
  background: rgba(8, 47, 73, 0.76);
  backdrop-filter: blur(12px);
}

.play-mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.32);
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: scale(1);
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-info strong {
  min-height: 1.4em;
  color: white;
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-info small,
.movie-line {
  color: var(--muted);
  line-height: 1.65;
}

.movie-line {
  display: -webkit-box;
  min-height: 3.25em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  gap: 6px;
}

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

.empty-state {
  display: none;
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.66);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover {
  transform: translateX(5px);
  border-color: rgba(34, 211, 238, 0.46);
}

.rank-num {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 950;
}

.rank-row img {
  width: 70px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

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

.rank-main small,
.rank-meta {
  color: var(--muted);
  line-height: 1.55;
}

.rank-main small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-main {
  padding-top: 24px;
}

.page-hero {
  padding: 72px 0 38px;
}

.page-hero h1 {
  margin-bottom: 18px;
}

.category-panels {
  display: grid;
  gap: 24px;
  padding-bottom: 68px;
}

.category-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  padding: 26px;
  border-radius: 28px;
}

.category-panel-copy p {
  color: var(--muted);
  line-height: 1.8;
}

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

.compact-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.32);
}

.compact-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.compact-card span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.compact-card strong,
.compact-card small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card small {
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.detail-bg,
.detail-bg img,
.detail-bg span {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-bg span {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.66)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.18));
}

.detail-grid {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

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

.breadcrumb a {
  color: #67e8f9;
}

.breadcrumb em {
  color: #e2e8f0;
  font-style: normal;
}

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

.player-section {
  padding-top: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player,
.player-cover,
.player-cover img,
.player-cover-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 2;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  object-fit: cover;
}

.player-cover-mask {
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.2), rgba(2, 6, 23, 0.82));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.35);
  transform: translate(-50%, -50%);
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.content-card {
  padding: 26px;
  border-radius: 26px;
}

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

.content-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.tag-card {
  grid-row: span 2;
}

.tag-card dl {
  display: grid;
  gap: 14px;
  margin: 0 0 20px;
}

.tag-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 12px;
}

.tag-card dt {
  color: var(--muted);
}

.tag-card dd {
  margin: 0;
  color: white;
  text-align: right;
}

.site-footer {
  margin-top: 54px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(2, 6, 23, 0.96));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-grid p,
.footer-grid a,
.copyright {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid div {
  display: grid;
  gap: 8px;
}

.footer-grid strong {
  margin-bottom: 6px;
  color: white;
}

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

.footer-grid a:hover {
  color: var(--cyan);
}

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 18px;
  text-align: center;
}

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

  .wide-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 13px 14px;
    border-radius: 14px;
  }

  .main-nav a::after {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 72px 0 96px;
  }

  .hero-poster {
    width: min(260px, 80vw);
    justify-self: start;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .detail-poster {
    width: min(260px, 70vw);
  }

  .rank-row {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

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

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

  .brand-text small {
    display: none;
  }

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

  .category-grid,
  .movie-grid,
  .wide-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .search-panel {
    margin-top: -24px;
    padding: 20px;
  }

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

  .player-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
