:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #60a5fa;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 4%, rgba(34, 211, 238, 0.12), transparent 34rem),
    radial-gradient(circle at 86% 14%, rgba(59, 130, 246, 0.11), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  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: grid;
  place-items: center;
  border-radius: 14px;
  color: #031923;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
}

.brand-text {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  padding: 9px 14px;
  color: #cbd5e1;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.86);
}

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

.header-search input,
.mobile-search input {
  width: 170px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 7px 8px 7px 12px;
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.text-link {
  border: 0;
  cursor: pointer;
  color: #031923;
  font-weight: 800;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.text-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.32);
}

.secondary-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(34, 211, 238, 0.32);
  box-shadow: none;
}

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

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

.mobile-panel {
  display: none;
  padding: 14px 18px 22px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  border-radius: 14px;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  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.32) 100%);
  z-index: 2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) brightness(0.72);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags span,
.tag-list span,
.info-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  min-height: 470px;
}

.hero-poster img {
  width: 100%;
  height: 470px;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent);
}

.hero-poster-info {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.hero-poster-info strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.hero-poster-info span {
  color: var(--muted);
  font-size: 14px;
}

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

.hero-dot {
  width: 32px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  width: 48px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

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

.section-title h1,
.section-title h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.035em;
}

.section-title p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
  margin: 12px 0 0;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.48));
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card::before {
  content: attr(data-accent);
  position: absolute;
  right: 18px;
  top: 8px;
  color: rgba(34, 211, 238, 0.12);
  font-size: 76px;
  font-weight: 900;
  line-height: 1;
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card span {
  position: relative;
  color: var(--cyan);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.5));
}

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

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

.score-badge,
.type-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #031923;
  background: var(--amber);
  font-weight: 900;
  font-size: 13px;
}

.score-badge {
  left: 12px;
}

.type-badge {
  right: 12px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--cyan);
}

.movie-meta {
  margin: 9px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 66px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.text-link {
  display: inline-flex;
  padding: 8px 13px;
  font-size: 13px;
}

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

.muted-link:hover {
  color: var(--cyan);
}

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

.rank-panel,
.side-panel,
.info-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
}

.rank-panel {
  padding: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(3px);
  border-color: rgba(34, 211, 238, 0.32);
}

.rank-num {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.8);
}

.rank-info {
  min-width: 0;
}

.rank-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
  gap: 12px;
  margin: 26px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.46);
  padding: 0 12px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.54);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 10px;
}

.page-hero .section-title h1 {
  max-width: 880px;
}

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

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

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

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid rgba(34, 211, 238, 0.26);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 42%, rgba(34, 211, 238, 0.18), transparent 16rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.86));
}

.player-box.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.play-core {
  display: grid;
  place-items: center;
  gap: 14px;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #031923;
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.36);
}

.play-core strong {
  font-size: 22px;
}

.play-core span {
  color: var(--muted);
}

.detail-content {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.content-panel {
  padding: 28px;
}

.content-panel h2,
.side-panel h2,
.info-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.side-panel,
.info-panel {
  padding: 20px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid transparent;
}

.related-card:hover {
  border-color: rgba(34, 211, 238, 0.32);
}

.related-card img {
  width: 68px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.8);
}

.related-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.site-footer {
  margin-top: 86px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.96));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 30px;
}

.footer-brand p,
.footer-column a,
.footer-bottom {
  color: var(--muted);
}

.footer-brand p {
  max-width: 520px;
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

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

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

  .hero-poster {
    max-width: 340px;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .desktop-nav {
    display: none;
  }

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

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

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

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

  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 52px 0 78px;
  }

  .hero-poster {
    display: none;
  }

  .section-header {
    display: block;
  }

  .category-grid,
  .movie-grid,
  .movie-grid.wide,
  .filter-bar,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .content-panel,
  .side-panel,
  .info-panel {
    padding: 18px;
  }
}
