:root {
  color-scheme: dark;
  --bg-deep: #020617;
  --bg-main: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(148, 163, 184, 0.18);
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --accent-warm: #f97316;
  --shadow: 0 20px 60px rgba(8, 145, 178, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text-main);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner,
.footer-inner,
.section-inner,
.main-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.35);
  transition: transform 0.5s ease;
}

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

.brand-text {
  display: grid;
  line-height: 1.15;
}

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

.brand-text small {
  margin-top: 3px;
  color: var(--accent);
  font-size: 12px;
}

.brand.mini .brand-mark {
  width: 34px;
  height: 34px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.main-nav a {
  color: var(--text-soft);
  font-size: 14px;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
}

.header-search {
  width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text-main);
  background: transparent;
  padding: 8px 8px 8px 12px;
}

.header-search button,
.btn-primary,
.btn-secondary {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #ffffff;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
  background: var(--accent-strong);
  font-size: 13px;
}

.header-search button:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: #ffffff;
}

.hero {
  position: relative;
  height: 620px;
  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-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.04);
}

.hero-slide.active .hero-image {
  animation: slowZoom 8s ease forwards;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hero::before {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.16));
}

.hero::after {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 42%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  animation: slideUp 0.72s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.78;
}

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

.hero-tags {
  margin: 24px 0 34px;
}

.hero-tags span,
.tag-list span,
.detail-tags span {
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.14);
  font-size: 13px;
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 800;
}

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

.btn-primary:hover {
  background: #0891b2;
}

.btn-secondary {
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.58);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 54px;
  display: flex;
  gap: 12px;
}

.hero-control {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

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

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

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

.section,
.page-hero,
.main-wrap {
  padding: 72px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.34);
}

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

.section-title h2,
.page-hero h1,
.detail-section h2,
.side-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-title p,
.page-hero p {
  max-width: 690px;
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.78;
}

.section-link {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card a {
  display: block;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: var(--bg-main);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.88);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.movie-info strong {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-meta,
.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
}

.movie-meta {
  -webkit-line-clamp: 1;
}

.movie-desc {
  -webkit-line-clamp: 3;
}

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

.movie-card:hover .poster-shade {
  opacity: 1;
}

.movie-card:hover .movie-info strong,
.rail-card:hover strong,
.list-card:hover strong {
  color: var(--accent);
}

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

.category-tile {
  display: block;
  min-height: 176px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), transparent 55%),
    rgba(15, 23, 42, 0.66);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 20px;
}

.category-tile span,
.category-tile p {
  color: var(--text-muted);
  line-height: 1.7;
}

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 0 18px;
  scroll-snap-type: x proximity;
}

.rail-card {
  width: 190px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.rail-card img {
  width: 190px;
  height: 254px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--bg-main);
  transition: transform 0.48s ease;
}

.rail-card strong {
  display: -webkit-box;
  min-height: 2.7em;
  margin-top: 12px;
  overflow: hidden;
  color: #ffffff;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.rail-card span {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 13px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
}

.rank-timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.rank-timeline::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(34, 211, 238, 0.08));
}

.list-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.list-card:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(30, 41, 59, 0.8);
}

.rank-number {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent-strong);
  font-weight: 900;
}

.list-card img {
  width: 92px;
  height: 122px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.list-card strong,
.list-card small,
.list-card em {
  display: block;
}

.list-card strong {
  color: #ffffff;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.list-card small {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.list-card em {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.feature-panel {
  display: grid;
  gap: 18px;
}

.feature-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.72));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.34);
}

.feature-card img {
  width: 170px;
  height: 220px;
  object-fit: cover;
}

.feature-card span {
  padding: 22px;
}

.feature-card strong,
.feature-card small,
.feature-card em {
  display: block;
}

.feature-card strong {
  color: #ffffff;
  font-size: 20px;
}

.feature-card small {
  margin-top: 8px;
  color: var(--text-muted);
}

.feature-card em {
  display: -webkit-box;
  margin-top: 14px;
  overflow: hidden;
  color: var(--text-soft);
  font-style: normal;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.page-hero {
  padding-bottom: 34px;
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr;
  gap: 12px;
  margin: 8px 0 30px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-bar input,
.filter-bar select,
.search-panel input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: 0;
  border-radius: 14px;
  color: var(--text-main);
  background: rgba(2, 6, 23, 0.54);
  padding: 13px 14px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.68);
}

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

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

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

.detail-title {
  margin-bottom: 24px;
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.detail-title p {
  max-width: 830px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.78;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.36);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.16));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  box-shadow: 0 0 0 18px rgba(34, 211, 238, 0.14);
  font-size: 34px;
  text-indent: 5px;
}

.detail-section,
.side-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
}

.detail-section h2,
.side-card h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

.detail-section p {
  color: var(--text-soft);
  line-height: 1.86;
}

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

.info-table {
  display: grid;
  gap: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-row span:first-child {
  color: var(--text-muted);
}

.info-row span:last-child {
  color: #ffffff;
  text-align: right;
}

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

.related-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 78px;
  height: 104px;
  object-fit: cover;
  border-radius: 10px;
}

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-item small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
}

.related-item:hover strong {
  color: var(--accent);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 24px 0 34px;
}

.search-panel button {
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--accent-strong);
  padding: 0 24px;
  cursor: pointer;
}

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

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

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr);
  gap: 48px;
  padding: 46px 0 30px;
}

.footer-brand p {
  max-width: 560px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

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

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

.copyright {
  margin: 0;
  padding: 22px 0 30px;
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
}

@keyframes slowZoom {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav.open {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
  }

  .main-nav.open a {
    padding: 13px 0;
  }

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .footer-inner,
  .section-inner,
  .main-wrap {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    height: 680px;
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.68));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 116px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-controls {
    right: 16px;
    bottom: 32px;
  }

  .hero-dots {
    left: 18px;
    bottom: 48px;
    transform: none;
  }

  .section,
  .page-hero,
  .main-wrap {
    padding: 48px 0;
  }

  .section-title {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 12px;
  }

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

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

  .feature-card {
    grid-template-columns: 120px 1fr;
  }

  .feature-card img {
    width: 120px;
    height: 190px;
  }

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

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

  .list-card {
    grid-template-columns: 42px 78px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
  }

  .list-card img {
    width: 78px;
    height: 104px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .search-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-desc {
    display: none;
  }

  .hero-actions {
    display: grid;
  }
}
