:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 18px;
  --container: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 0%, rgba(6, 182, 212, 0.16), transparent 30%), linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.header-inner {
  width: var(--container);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 36px rgba(6, 182, 212, 0.28);
}

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

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand-text em {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a,
.mobile-nav a,
.footer-links a {
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-toggle {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: var(--container);
  margin: 0 auto;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
}

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 45%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-copy {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(680px, calc(100vw - 48px));
  transform: translateY(-50%);
  display: grid;
  gap: 22px;
}

.hero-kicker,
.section-label {
  width: max-content;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.48);
}

.hero-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.detail-meta,
.detail-tags,
.sibling-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 46px rgba(6, 182, 212, 0.26);
}

.btn.ghost {
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.24);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 5;
}

.hero-controls button {
  color: #fff;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(10px);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}

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

.hero-dots button {
  width: 18px;
  height: 5px;
  padding: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
}

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

.hero-category-strip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 6;
  width: var(--container);
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}

.hero-category-strip::-webkit-scrollbar {
  display: none;
}

.hero-category-strip a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid transparent;
}

.hero-category-strip a:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.18);
}

.section-wrap {
  width: var(--container);
  margin: 0 auto;
  padding: 72px 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.intro-panel h2,
.section-head h2,
.sub-hero h1,
.detail-copy h1,
.player-section h2,
.detail-text h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.intro-panel p,
.sub-hero p,
.detail-text p,
.category-overview-card p {
  color: var(--muted-strong);
  line-height: 1.9;
}

.home-search,
.list-tools {
  display: flex;
  gap: 12px;
}

.home-search input,
.list-tools input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}

.home-search input:focus,
.list-tools input:focus {
  border-color: rgba(6, 182, 212, 0.68);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.home-search button {
  min-width: 96px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--cyan);
  font-weight: 800;
}

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

.section-head a {
  color: var(--cyan);
  font-weight: 800;
}

.compact-head {
  margin-bottom: 18px;
}

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

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

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

.video-card {
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.48);
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.12);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.6));
}

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

.video-card:hover .poster-wrap img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.card-badge,
.card-year,
.rank-mark {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(10px);
}

.card-badge {
  left: 12px;
}

.card-year {
  right: 12px;
  color: #67e8f9;
}

.rank-mark {
  left: 12px;
  top: auto;
  bottom: 12px;
  color: #fde68a;
}

.card-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.card-body.compact {
  padding: 14px;
}

.card-meta {
  margin: 0;
  min-height: 18px;
  color: #67e8f9;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(148, 163, 184, 0.12);
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

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

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

.rank-list.large {
  max-height: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(6, 182, 212, 0.48);
}

.rank-no {
  color: #fde68a;
  font-weight: 900;
  font-size: 20px;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-info {
  color: var(--muted);
  font-size: 13px;
}

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

.category-card {
  min-height: 160px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.12)), rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.48);
}

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.sub-hero {
  width: var(--container);
  margin: 0 auto;
  padding: 88px 0 40px;
}

.sub-hero h1 {
  margin-bottom: 14px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.overview-stack {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  gap: 24px;
  padding-bottom: 72px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 28px;
  align-items: center;
  padding: 26px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.overview-copy h2 {
  margin: 12px 0;
  font-size: 32px;
}

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

.mini-card {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
}

.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 10px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.list-tools {
  padding-top: 24px;
  padding-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.list-tools input {
  flex: 1 1 280px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pills button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.filter-pills button.active,
.filter-pills button:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.55);
  background: rgba(6, 182, 212, 0.18);
}

.movie-card.is-hidden {
  display: none;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.78) 52%, rgba(2, 6, 23, 0.4) 100%), linear-gradient(0deg, #020617 0%, transparent 60%);
}

.detail-content {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.85);
}

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

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

.detail-copy h1 {
  margin-top: 0;
  font-size: clamp(38px, 5vw, 68px);
}

.detail-one-line {
  margin: 0;
  color: var(--muted-strong);
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

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

.player-box {
  position: relative;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(6, 182, 212, 0.28);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.2), rgba(2, 6, 23, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.36);
}

.detail-text {
  padding-top: 20px;
  display: grid;
  gap: 16px;
}

.detail-text h2 {
  font-size: 28px;
}

.sibling-links a {
  color: var(--cyan);
  font-weight: 800;
}

.related-grid {
  padding-bottom: 16px;
}

.rank-page-layout {
  grid-template-columns: 0.72fr 1.28fr;
}

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

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

.footer-inner {
  width: var(--container);
  margin: 0 auto;
  padding: 42px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.footer-inner p {
  max-width: 660px;
  color: var(--muted);
  line-height: 1.8;
}

.copyright {
  width: var(--container);
  margin: 0 auto;
  padding: 0 0 30px;
  color: #64748b;
  font-size: 13px;
}

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

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

  .split-section,
  .rank-page-layout,
  .category-overview-card,
  .intro-panel {
    grid-template-columns: 1fr;
  }

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

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

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

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

  .hero-copy {
    top: 46%;
  }

  .hero-controls {
    left: 24px;
    right: auto;
    bottom: 108px;
  }

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

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

  .detail-content {
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

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

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

  .rank-info {
    grid-column: 2;
  }
}

@media (max-width: 540px) {
  :root {
    --container: min(100vw - 24px, 1180px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-text em {
    display: none;
  }

  .hero-slider {
    height: 82vh;
    min-height: 600px;
  }

  .hero-copy {
    left: 16px;
    width: calc(100vw - 32px);
  }

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

  .hero-controls {
    left: 16px;
  }

  .section-wrap {
    padding: 48px 0;
  }

  .movie-grid,
  .movie-grid.dense,
  .hot-card-grid,
  .category-grid,
  .mini-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .card-body h3 {
    font-size: 16px;
  }

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

  .detail-content {
    padding: 46px 0;
  }

  .player-start {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
