:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: rgba(17, 24, 39, 0.92);
  --panel-soft: rgba(31, 41, 55, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #a1a1aa;
  --soft: #d1d5db;
  --gold: #facc15;
  --gold-strong: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 8%, rgba(250, 204, 21, 0.16), transparent 34rem),
    radial-gradient(circle at 82% 12%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(135deg, #111827 0%, #0b1120 52%, #111827 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  background: rgba(17, 24, 39, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand {
  font-size: 21px;
}

.brand:hover {
  color: var(--gold);
}

.brand-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  color: #111827;
  font-size: 15px;
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 12px;
  padding: 0 14px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 650;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  background: rgba(31, 41, 55, 0.95);
  color: var(--gold);
}

.search-box,
.mobile-search,
.panel-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box input,
.mobile-search input,
.panel-search input,
.local-filter {
  width: 260px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  border-radius: 14px;
  outline: none;
  background: rgba(31, 41, 55, 0.92);
  color: #fff;
  padding: 11px 14px;
  transition: 0.22s ease;
}

.search-box input:focus,
.mobile-search input:focus,
.panel-search input:focus,
.local-filter:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.15);
}

.search-box button,
.mobile-search button,
.panel-search button {
  border: 0;
  border-radius: 14px;
  background: var(--gold);
  color: #111827;
  padding: 11px 16px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(75, 85, 99, 0.72);
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.8);
  color: #e5e7eb;
  width: 42px;
  height: 42px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(75, 85, 99, 0.45);
  padding: 14px 16px 18px;
  background: rgba(17, 24, 39, 0.98);
}

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

.mobile-search {
  margin-bottom: 14px;
}

.mobile-search input {
  width: 100%;
}

.mobile-links {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #111827;
}

.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,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide.active img {
  animation: heroZoom 9s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.98) 0%, rgba(17, 24, 39, 0.88) 42%, rgba(17, 24, 39, 0.25) 100%),
    linear-gradient(0deg, rgba(11, 17, 32, 0.85) 0%, transparent 38%);
  z-index: 1;
}

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

.hero-copy {
  max-width: 720px;
  padding: 42px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  max-width: 840px;
}

.hero h2 {
  margin: 22px 0 12px;
  color: var(--gold);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.hero p,
.page-hero p,
.detail-info .lead {
  margin: 0;
  max-width: 760px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.85;
}

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

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

.hero-tags span,
.tag-row span,
.meta-badges span {
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.09);
  color: #fde68a;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 750;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 900;
  transition: 0.22s ease;
}

.btn.primary {
  background: var(--gold);
  color: #111827;
  box-shadow: 0 16px 36px rgba(250, 204, 21, 0.28);
}

.btn.primary:hover {
  background: #fde047;
  transform: translateY(-2px) scale(1.02);
}

.btn.ghost {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(31, 41, 55, 0.82);
  color: #fff;
}

.btn.ghost:hover,
.btn.dark:hover {
  border-color: rgba(250, 204, 21, 0.45);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn.dark {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(17, 24, 39, 0.72);
  color: #e5e7eb;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  backdrop-filter: blur(10px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

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

.section-block {
  padding: 56px 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: -52px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(17, 24, 39, 0.86);
  box-shadow: var(--shadow);
  padding: 28px;
  position: relative;
  z-index: 7;
}

.intro-panel h2,
.section-heading h2,
.detail-text h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.2;
}

.intro-panel p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.section-heading a {
  color: var(--gold);
  font-weight: 850;
}

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

.category-card,
.category-overview {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(31, 41, 55, 0.75);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.category-card img,
.category-overview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img,
.category-overview:hover img {
  transform: scale(1.1);
  opacity: 0.92;
}

.category-glow,
.category-card::after,
.category-overview::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.28));
}

.category-card strong,
.category-card small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 1;
}

.category-card strong {
  bottom: 58px;
  color: #fff;
  font-size: 24px;
}

.category-card small {
  bottom: 20px;
  color: #d1d5db;
  line-height: 1.5;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.23);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, 0.34);
  box-shadow: 0 28px 62px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: #1f2937;
}

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(0.78);
}

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

.poster-badge {
  top: 12px;
  right: 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.95);
  color: #111827;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  left: 50%;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.95);
  color: #111827;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: 0.24s ease;
}

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

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 1.5em;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--gold);
}

.card-meta {
  margin: 8px 0 0;
  color: #9ca3af;
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 10px 0 0;
  overflow: hidden;
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row.large {
  margin-top: 18px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 0%, rgba(250, 204, 21, 0.16), transparent 30rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(11, 17, 32, 0.92));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.small-hero {
  padding: 86px 0 72px;
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(36px, 5vw, 60px);
}

.page-hero p {
  margin-top: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #a1a1aa;
  font-size: 14px;
}

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

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

.category-overview {
  min-height: 250px;
}

.category-overview > div {
  position: absolute;
  inset: auto 22px 22px 22px;
  z-index: 2;
}

.category-overview h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 28px;
}

.category-overview p:not(.eyebrow) {
  margin: 0 0 16px;
  color: #d1d5db;
  line-height: 1.65;
}

.category-overview span {
  color: var(--gold);
  font-weight: 900;
}

.filter-area {
  padding-top: 36px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.76);
  padding: 16px;
}

.sticky-filter {
  position: sticky;
  top: 84px;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.local-filter {
  width: 100%;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.85);
  color: #e5e7eb;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: rgba(250, 204, 21, 0.48);
  background: rgba(250, 204, 21, 0.14);
  color: var(--gold);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 82px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.72);
  padding: 12px;
  transition: 0.22s ease;
}

.rank-row:hover {
  border-color: rgba(250, 204, 21, 0.36);
  background: rgba(31, 41, 55, 0.82);
  transform: translateX(4px);
}

.rank-num {
  color: var(--gold);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.rank-row img {
  width: 82px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-main strong {
  color: #fff;
  font-size: 18px;
}

.rank-main small,
.rank-main em {
  color: #9ca3af;
  font-style: normal;
}

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

.rank-play {
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  color: var(--gold);
  padding: 8px 13px;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  min-height: 720px;
  padding: 80px 0 72px;
  overflow: hidden;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 17, 32, 0.96), rgba(17, 24, 39, 0.76), rgba(11, 17, 32, 0.92)),
    linear-gradient(0deg, #0b1120 0%, rgba(11, 17, 32, 0.18) 40%);
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 34px;
  align-items: center;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  background: #050816;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #050816;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: #111827;
  padding: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.56);
}

.big-play {
  position: absolute;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: #111827;
  font-size: 30px;
  box-shadow: 0 18px 46px rgba(250, 204, 21, 0.32);
}

.detail-info h1 {
  font-size: clamp(36px, 5vw, 60px);
}

.meta-badges {
  margin-top: 22px;
}

.detail-info .lead {
  margin-top: 24px;
}

.detail-content {
  margin-top: -40px;
  position: relative;
  z-index: 3;
}

.detail-text {
  margin-bottom: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.82);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.2);
  padding: 28px;
}

.detail-text p {
  margin: 16px 0 0;
  color: #d1d5db;
  font-size: 17px;
  line-height: 1.95;
}

.episode-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}

.episode-nav a {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.7);
  color: #e5e7eb;
  padding: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-nav a:hover {
  border-color: rgba(250, 204, 21, 0.4);
  color: var(--gold);
}

.related-block {
  padding-top: 20px;
}

.site-footer {
  margin-top: 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(9, 14, 27, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 36px;
  padding: 48px 0 34px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-brand {
  margin-bottom: 14px;
  font-size: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #9ca3af;
  padding: 18px 0 26px;
  font-size: 14px;
}

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

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

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

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-wrap {
    height: 62px;
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    height: 720px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(11, 17, 32, 0.98) 0%, rgba(17, 24, 39, 0.76) 54%, rgba(17, 24, 39, 0.58) 100%);
  }

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

  .hero h1 {
    font-size: 40px;
  }

  .hero h2 {
    font-size: 30px;
  }

  .hero p,
  .page-hero p,
  .detail-info .lead {
    font-size: 16px;
  }

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

  .panel-search,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-search input,
  .panel-search button {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .overview-grid,
  .footer-grid,
  .episode-nav {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 76px 1fr;
  }

  .rank-play {
    display: none;
  }

  .detail-hero {
    padding-top: 42px;
  }

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

  .small-hero {
    padding: 54px 0 46px;
  }
}

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

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .card-body,
  .detail-text {
    padding: 16px;
  }

  .section-block {
    padding: 36px 0;
  }
}
