:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --blue: #2563eb;
  --yellow: #facc15;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(8, 145, 178, 0.22), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.35);
}

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: white;
  background: rgba(6, 182, 212, 0.16);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  color: white;
  background: rgba(15, 23, 42, 0.76);
}

.hero-slider {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 108px max(24px, calc((100vw - 1180px) / 2)) 96px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1s ease, transform 5s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(8, 145, 178, 0.2);
  color: var(--cyan-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.64);
  color: var(--soft);
  font-size: 12px;
}

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

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

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.24);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.55);
  color: white;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.52);
  color: white;
  font-size: 38px;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(8, 145, 178, 0.78);
  transform: translateY(-2px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-search {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 92px;
  z-index: 5;
  display: flex;
  width: min(420px, calc(100% - 48px));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 6px;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(16px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  outline: none;
  background: rgba(15, 23, 42, 0.82);
  color: white;
}

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

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  background: var(--cyan);
  color: white;
  font-weight: 800;
}

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

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

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-heading a,
.category-title-link span {
  color: var(--cyan-light);
  font-weight: 800;
}

.compact-heading {
  align-items: center;
  margin-bottom: 18px;
}

.compact-heading h2,
.compact-heading h3 {
  font-size: 22px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.42));
  box-shadow: 0 10px 38px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 22px 46px rgba(6, 182, 212, 0.14);
}

.card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

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

.compact .poster-wrap {
  aspect-ratio: 16 / 10;
}

.poster-wrap img,
.detail-poster img,
.mini-movie img,
.ranking-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

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

.poster-type {
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(2, 6, 23, 0.72);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.86);
  color: white;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 46px;
  margin: 0;
  color: white;
  font-size: 17px;
  line-height: 1.35;
}

.card-meta,
.card-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-summary {
  min-height: 42px;
}

.tag-row {
  margin-top: 12px;
}

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

.category-panel,
.category-overview-card,
.rank-card,
.text-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: var(--shadow);
}

.category-panel,
.category-overview-card,
.rank-card {
  padding: 24px;
}

.category-overview-card p {
  min-height: 52px;
  margin: 0 0 18px;
  color: var(--soft);
  line-height: 1.7;
}

.category-title-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.category-title-link h2 {
  margin: 0;
  font-size: 24px;
}

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

.mini-movie {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 12px;
  color: white;
}

.mini-movie img {
  height: 54px;
  border-radius: 12px;
}

.mini-movie span {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.rank-card ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-card li a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  border-radius: 12px;
  padding: 12px;
  color: var(--soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.rank-card li a:hover {
  background: rgba(6, 182, 212, 0.1);
  color: white;
}

.rank-number,
.ranking-index {
  color: var(--cyan-light);
  font-weight: 900;
}

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

.rank-score,
.ranking-score {
  color: var(--yellow);
  font-weight: 900;
  text-align: right;
}

.page-hero {
  padding: 74px 0 42px;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(37, 99, 235, 0.1)),
    rgba(2, 6, 23, 0.22);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.compact-hero {
  padding-top: 86px;
}

.page-hero h1 {
  max-width: 860px;
}

.page-hero p {
  max-width: 760px;
}

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

.breadcrumb a {
  color: var(--cyan-light);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
  height: 50px;
  padding: 0 16px;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.detail-hero {
  min-height: 660px;
  padding: 72px 0 56px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-hero-inner {
  padding-top: 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  max-width: 840px;
}

.detail-one-line {
  max-width: 820px;
}

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

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

.scroll-play {
  margin-top: 30px;
}

.player-section {
  padding-bottom: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: black;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

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

.movie-video {
  z-index: 1;
  object-fit: contain;
  background: black;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.78)),
    rgba(2, 6, 23, 0.55);
  color: white;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.32);
  font-size: 34px;
}

.player-cover span:last-child {
  display: block;
  font-size: 18px;
  font-weight: 900;
}

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

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 28px;
}

.text-card {
  padding: 28px;
}

.text-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.text-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

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

.ranking-row {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-2px);
}

.ranking-link {
  display: grid;
  grid-template-columns: 60px 84px minmax(0, 1fr) 80px;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
}

.ranking-link img {
  height: 72px;
  border-radius: 14px;
}

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

.ranking-info strong {
  font-size: 18px;
}

.ranking-info em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.8);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--soft);
}

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

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

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

  .rank-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    border-radius: 14px;
  }

  .hero-slider {
    min-height: 620px;
    height: 78vh;
  }

  .hero-slide {
    padding: 110px 24px 134px;
  }

  .hero-search {
    left: 24px;
    right: 24px;
    bottom: 76px;
    width: auto;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .detail-poster {
    width: min(260px, 100%);
  }

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

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero-slider {
    min-height: 610px;
  }

  .hero-slide {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-search {
    left: 16px;
    right: 16px;
  }

  .hero-search button {
    padding: 10px 14px;
  }

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

  .movie-grid,
  .archive-grid,
  .compact-grid,
  .category-grid,
  .overview-grid,
  .detail-text {
    grid-template-columns: 1fr;
  }

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

  .ranking-link {
    grid-template-columns: 42px 66px minmax(0, 1fr);
  }

  .ranking-score {
    grid-column: 3;
    text-align: left;
  }

  .player-shell {
    border-radius: 18px;
  }
}
