:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(34, 211, 238, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --orange: #fb923c;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 30rem),
    radial-gradient(circle at 80% 0, rgba(59, 130, 246, 0.18), transparent 24rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  width: min(1240px, calc(100% - 28px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

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

.brand-copy {
  display: grid;
}

.brand-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #e0f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  font-size: 12px;
  color: rgba(34, 211, 238, 0.65);
}

.site-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
}

.site-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 12px;
}

.site-search button,
.primary-action,
.ghost-action,
.panel-link,
.side-more,
.section-link {
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 10px 18px;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.site-search button:hover,
.primary-action:hover,
.ghost-action:hover,
.panel-link:hover,
.side-more:hover,
.section-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 22px 55px rgba(34, 211, 238, 0.32);
}

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

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  color: #cbd5e1;
  padding: 10px 13px;
  border-radius: 12px;
  transition: background 0.25s ease, color 0.25s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(34, 211, 238, 0.12);
  background: rgba(2, 6, 23, 0.95);
}

.mobile-panel nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.mobile-panel.is-open {
  display: block;
}

.hero-shell {
  width: min(1240px, calc(100% - 28px));
  min-height: 640px;
  margin: 28px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.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.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 640px;
  max-width: 760px;
  padding: 88px clamp(28px, 6vw, 78px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge,
.detail-meta,
.movie-meta,
.tag-row,
.detail-tags,
.hero-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badge span,
.detail-meta span,
.movie-meta span,
.tag-row span,
.hero-tags span,
.detail-tags a {
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #bfdbfe;
  padding: 5px 10px;
  font-size: 12px;
}

.hero-content h1 {
  margin: 18px 0 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 950;
  background: linear-gradient(90deg, #ffffff, #cffafe, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

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

.ghost-action {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: none;
}

.hero-control {
  position: absolute;
  z-index: 4;
  left: clamp(24px, 5vw, 72px);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.hero-side,
.ranking-panel,
.content-panel,
.story-panel,
.category-card,
.filter-panel,
.ranking-card,
.player-wrap {
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-side {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-title,
.panel-title {
  font-size: 20px;
  font-weight: 900;
  color: #e0f2fe;
}

.movie-card {
  min-width: 0;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

.poster img,
.ranking-cover img,
.category-covers img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.35s ease;
}

.movie-card:hover .poster img,
.category-card:hover .category-covers img,
.ranking-card:hover .ranking-cover img {
  transform: scale(1.08);
  filter: saturate(1.14);
}

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(34, 211, 238, 0.88);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  color: white;
  padding: 5px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.movie-info {
  padding: 13px 2px 0;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 1.45em;
  color: #f8fafc;
  font-weight: 850;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--cyan);
}

.movie-meta {
  margin: 8px 0;
}

.movie-meta span {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.5);
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact .movie-desc {
  -webkit-line-clamp: 1;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--cyan);
  font-weight: 900;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.content-section,
.category-overview,
.split-section,
.page-main {
  margin-top: 56px;
  margin-bottom: 56px;
}

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

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

.movie-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.movie-strip .movie-card {
  scroll-snap-align: start;
}

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

.category-tile {
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.06)),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-tile span {
  display: block;
  color: #e0f2fe;
  font-size: 18px;
  font-weight: 900;
}

.category-tile small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

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

.content-panel,
.ranking-panel {
  padding: 22px;
}

.ranking-list {
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px;
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.66);
}

.ranking-list a:hover {
  background: rgba(34, 211, 238, 0.12);
}

.ranking-list span {
  color: var(--orange);
  font-weight: 950;
}

.ranking-list strong,
.ranking-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-hero,
.ranking-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(34px, 6vw, 72px);
}

.page-hero span,
.ranking-hero span {
  color: var(--cyan);
  font-weight: 900;
}

.page-hero h1 {
  margin-top: 12px;
  font-size: clamp(38px, 6vw, 68px);
}

.category-list-grid {
  margin-top: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 180px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  min-height: 180px;
  background: #0f172a;
}

.category-copy {
  padding: 24px;
}

.category-copy h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

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

.filter-panel {
  margin: 26px 0;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 190px;
  gap: 14px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.6);
  padding: 12px 14px;
}

.empty-state {
  margin: 20px 0;
  padding: 30px;
  text-align: center;
  border: 1px dashed rgba(34, 211, 238, 0.28);
  border-radius: 20px;
  color: var(--muted);
}

.page-grid {
  margin-top: 24px;
}

.ranking-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 26px;
}

.ranking-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 24px;
}

.ranking-hero h1 {
  margin: 12px 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
}

.ranking-hero p {
  color: #cbd5e1;
  line-height: 1.8;
  margin: 0 0 24px;
}

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

.ranking-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 64px 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  font-weight: 950;
}

.ranking-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
}

.detail-main {
  padding-bottom: 40px;
}

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

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.55)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 48%);
}

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

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
}

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

.detail-copy h1 {
  margin: 20px 0;
  font-size: clamp(42px, 7vw, 78px);
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0 30px;
}

.detail-tags a:hover {
  color: white;
  background: rgba(34, 211, 238, 0.22);
}

.player-section {
  margin-top: -64px;
  position: relative;
  z-index: 3;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(2, 6, 23, 0.38);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.38);
  font-size: 34px;
}

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

.detail-content {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.story-panel {
  padding: 28px;
}

.story-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.story-panel p {
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.95;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(34, 211, 238, 0.16);
  background: rgba(2, 6, 23, 0.72);
}

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

.footer-logo {
  color: var(--cyan);
  font-size: 22px;
  font-weight: 950;
}

.footer-links {
  display: flex;
  gap: 8px;
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-grid;
  }

  .site-search {
    max-width: none;
  }

  .hero-shell,
  .split-section,
  .detail-layout,
  .ranking-hero {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-layout {
    padding-top: 40px;
    padding-bottom: 90px;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .brand-title {
    font-size: 19px;
  }

  .site-search {
    order: 3;
    flex-basis: 100%;
  }

  .hero-shell {
    width: min(100% - 20px, 1240px);
    min-height: auto;
    margin-top: 14px;
  }

  .hero-stage,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 54px 24px 96px;
  }

  .hero-actions,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-side,
  .movie-grid,
  .small-grid,
  .category-grid,
  .category-list-grid,
  .detail-content,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    gap: 18px;
  }

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

  .category-covers {
    min-height: 210px;
  }

  .ranking-card {
    grid-template-columns: 54px 96px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 14px;
  }

  .detail-hero,
  .detail-layout {
    min-height: auto;
  }

  .detail-layout {
    gap: 26px;
  }

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

  .detail-copy h1 {
    font-size: 42px;
  }

  .detail-one-line {
    font-size: 17px;
  }

  .player-section {
    margin-top: 0;
    width: min(100% - 20px, 1180px);
  }

  .story-panel {
    padding: 22px;
  }
}
