:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(51, 65, 85, 0.62);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #06b6d4;
  --green: #22c55e;
  --orange: #fb923c;
  --blue: #60a5fa;
  --radius: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img,
video {
  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(51, 65, 85, 0.6);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
}

.nav-bar {
  min-height: 76px;
  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: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, var(--cyan), var(--cyan-deep));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.35);
  transition: transform 0.7s ease;
}

.brand:hover .brand-icon {
  transform: rotate(180deg);
}

.brand-text {
  display: grid;
  gap: 0;
}

.brand-text strong {
  font-size: 1.32rem;
  letter-spacing: 0.03em;
}

.brand-text small {
  color: rgba(103, 232, 249, 0.72);
  font-size: 0.76rem;
}

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

.nav-link {
  color: var(--muted-strong);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(30, 41, 59, 0.65);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}

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

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

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.hero-overlay {
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.76) 34%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-side-overlay {
  background: linear-gradient(to right, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.34) 55%, rgba(2, 6, 23, 0.52) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
}

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

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid rgba(6, 182, 212, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.16);
  backdrop-filter: blur(8px);
  font-weight: 650;
  font-size: 0.88rem;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.85rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.08rem;
  max-width: 760px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
  color: #fff;
  background: var(--cyan-deep);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  background: #0891b2;
  box-shadow: 0 18px 52px rgba(6, 182, 212, 0.42);
}

.ghost-button {
  color: #fff;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(51, 65, 85, 0.92);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  font-size: 2.2rem;
  line-height: 1;
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-arrow:hover {
  background: rgba(30, 41, 59, 0.92);
  transform: translateY(-50%) scale(1.05);
}

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--cyan-deep);
}

.section {
  padding: 70px 0;
}

.section-gradient {
  background: linear-gradient(to bottom, #020617, #0f172a);
}

.section-gradient-reverse {
  background: linear-gradient(to bottom, #0f172a, #020617);
}

.section-solid {
  background: #0f172a;
}

.section-deep {
  background: #020617;
}

.section-heading,
.split-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.split-heading {
  justify-content: space-between;
}

.section-heading h2,
.split-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.1;
}

.split-heading a {
  color: var(--cyan);
  font-weight: 750;
}

.section-icon {
  color: var(--cyan);
  font-size: 1.6rem;
}

.section-heading.orange .section-icon {
  color: var(--orange);
}

.section-heading.green .section-icon {
  color: var(--green);
}

.section-heading.blue .section-icon {
  color: var(--blue);
}

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

.movie-grid .movie-card.compact-card {
  min-height: 0;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.55);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.012);
  background: rgba(30, 41, 59, 0.92);
  box-shadow: 0 28px 70px rgba(6, 182, 212, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.28), rgba(15, 23, 42, 0.9));
}

.movie-card.compact-card .poster-frame {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.36), transparent);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 999px;
  color: #fff;
  background: rgba(6, 182, 212, 0.88);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.28);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.genre-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 750;
}

.card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 18px;
}

.card-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 1.04rem;
}

.card-copy em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-style: normal;
}

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

.category-tile,
.category-card-large {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.7));
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

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

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

.category-thumb-stack img,
.category-mosaic img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.category-tile strong,
.category-card-large strong {
  color: #fff;
  font-size: 1.2rem;
}

.category-tile em,
.category-card-large em {
  color: var(--muted);
  font-style: normal;
}

.year-block {
  margin-bottom: 46px;
}

.year-block h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cyan);
  font-size: 1.45rem;
}

.year-block h3 span {
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: var(--cyan);
}

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

.latest-row,
.rank-row {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.5);
  transition: background 0.22s ease, transform 0.22s ease;
}

.latest-row:hover,
.rank-row:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.92);
}

.latest-row img,
.rank-row img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
}

.latest-copy,
.rank-copy {
  display: grid;
  gap: 6px;
}

.latest-copy strong,
.rank-copy strong {
  color: #fff;
  font-size: 1.12rem;
}

.latest-copy em,
.rank-copy em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-style: normal;
}

.latest-copy small,
.rank-copy small {
  color: #64748b;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 112px 0 76px;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.18), transparent 28%),
    linear-gradient(135deg, #020617, #0f172a 58%, #020617);
}

.page-hero.compact-hero {
  padding: 92px 0 60px;
}

.page-hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
}

.eyebrow {
  width: fit-content;
  padding: 6px 14px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.14);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-input,
.filter-select {
  min-height: 46px;
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: 14px;
  color: #fff;
  background: rgba(2, 6, 23, 0.64);
  outline: none;
}

.filter-input {
  width: 100%;
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  gap: 12px;
}

.filter-select {
  padding: 0 38px 0 14px;
}

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

.empty-state {
  display: none;
  margin: 0 0 24px;
  padding: 18px;
  border-radius: 16px;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.58);
}

.empty-state.show {
  display: block;
}

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

.rank-row {
  grid-template-columns: 56px 190px 1fr;
}

.rank-num {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: rgba(6, 182, 212, 0.22);
  font-weight: 900;
}

.detail-hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 88px 0;
  background-image: var(--detail-poster);
  background-size: cover;
  background-position: center;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.92)),
    linear-gradient(to top, #020617, rgba(2, 6, 23, 0.25));
  backdrop-filter: blur(10px);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.8);
}

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

.detail-copy {
  display: grid;
  gap: 20px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.54));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  box-shadow: 0 20px 52px rgba(6, 182, 212, 0.36);
  font-size: 2rem;
}

.player-overlay strong {
  font-size: 1.1rem;
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
}

.content-panel {
  padding: 26px;
  border: 1px solid rgba(51, 65, 85, 0.68);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.content-panel h2 {
  margin: 0 0 12px;
  color: #fff;
}

.content-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.meta-panel {
  grid-column: span 2;
}

.meta-panel dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 18px;
  margin: 0;
}

.meta-panel dt {
  color: var(--muted);
}

.meta-panel dd {
  margin: 0;
  color: var(--muted-strong);
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: #0f172a;
}

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

.footer-grid p {
  color: var(--muted);
  max-width: 520px;
}

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

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

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

.is-hidden-by-filter {
  display: none !important;
}

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

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

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-carousel {
    height: 72vh;
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 74px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .movie-grid,
  .category-grid,
  .category-overview,
  .hero-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .latest-row,
  .rank-row {
    grid-template-columns: 120px 1fr;
  }

  .rank-row {
    grid-template-columns: 44px 96px 1fr;
  }

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

  .filter-selects {
    flex-direction: column;
  }

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

  .detail-poster {
    max-width: 320px;
  }

  .meta-panel {
    grid-column: auto;
  }
}

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

  .brand-text strong {
    font-size: 1.05rem;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.15rem;
  }

  .movie-grid,
  .category-grid,
  .category-overview,
  .hero-mini-grid {
    grid-template-columns: 1fr;
  }

  .latest-row,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-num {
    position: absolute;
    margin: 10px;
  }

  .split-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero,
  .detail-hero {
    padding: 72px 0 48px;
  }
}
