:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.18);
  --pink: #e879f9;
  --yellow: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(8, 145, 178, 0.28), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(168, 85, 247, 0.20), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

.navbar {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.52);
}

.brand-text {
  font-size: 20px;
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  position: relative;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--cyan);
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #67e8f9;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
}

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

.mobile-panel {
  display: none;
  padding: 10px 18px 18px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel .nav-link {
  display: block;
  padding: 10px 0;
}

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

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

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

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

.hero-slide::before,
.detail-hero::before,
.poster-link::before,
.detail-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(168, 85, 247, 0.14)),
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.24), transparent 38%),
    linear-gradient(135deg, #0f172a, #020617);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 44%, rgba(2, 6, 23, 0.30) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 92px;
}

.hero-kicker,
.page-hero span,
.section-title span,
.detail-kicker {
  color: #67e8f9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 12px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 23px);
}

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

.hero-tags span,
.tag-row span,
.chip-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

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

.btn.primary {
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.32);
}

.btn.ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.74);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(10px);
  font-size: 34px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(6, 182, 212, 0.36);
  transform: translateY(-1px);
}

.hero-control.prev {
  left: max(18px, calc((100% - 1240px) / 2));
}

.hero-control.next {
  right: max(18px, calc((100% - 1240px) / 2));
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #22d3ee;
}

.search-band,
.section-wrap,
.page-hero,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  margin-top: -46px;
  position: relative;
  z-index: 9;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.search-band h2,
.section-title h2,
.page-hero h1,
.detail-info h1,
.detail-article h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-band p,
.page-hero p,
.detail-one-line,
.detail-article p,
.category-tile p,
.category-card-large p,
.movie-card p,
.ranking-feature p,
.site-footer p {
  color: var(--muted);
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 16px;
  outline: none;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 14px;
}

.search-box button {
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  color: #001018;
  background: #22d3ee;
  font-weight: 900;
  cursor: pointer;
}

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

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

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

.section-title a {
  color: #67e8f9;
  font-weight: 800;
}

.compact-title {
  align-items: center;
}

.compact-title h2 {
  font-size: 28px;
}

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

.listing-grid {
  align-items: stretch;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 26px 70px rgba(6, 182, 212, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 22;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.poster-link img,
.detail-poster img,
.ranking-feature img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 12px 12px 12px;
  z-index: 2;
  height: 60px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.20);
  filter: blur(24px);
}

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  color: #001018;
  background: #facc15;
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  padding: 18px;
}

.movie-meta-line {
  margin-bottom: 7px;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #67e8f9;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-card-large {
  position: relative;
  min-height: 160px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(168, 85, 247, 0.09)),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.34);
}

.category-tile span,
.category-card-large h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-card-large p {
  margin: 0;
  font-size: 14px;
}

.category-index {
  color: rgba(103, 232, 249, 0.6);
  font-size: 42px;
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px minmax(120px, 210px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(103, 232, 249, 0.38);
}

.rank-no {
  color: #67e8f9;
  font-size: 18px;
  font-weight: 900;
}

.rank-title {
  font-weight: 900;
}

.rank-desc {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-main {
  padding-top: 96px;
}

.page-hero {
  min-height: 300px;
  display: grid;
  align-items: center;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(38px, 7vw, 72px);
}

.page-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  font-size: 18px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.chip-link.active {
  color: #001018;
  background: #22d3ee;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ranking-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.ranking-feature {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #0f172a;
}

.ranking-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.24) 65%);
}

.ranking-feature div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.ranking-feature span {
  color: #facc15;
  font-weight: 900;
}

.ranking-feature h2 {
  margin: 6px 0 8px;
}

.large-rank .rank-item {
  grid-template-columns: 52px 240px 1fr;
}

.detail-main {
  padding-top: 68px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 90px 0 58px;
  background: #020617;
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.46) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 58%);
}

.detail-shell {
  position: relative;
  z-index: 2;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #67e8f9;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  position: relative;
  aspect-ratio: 16 / 22;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin-top: 12px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1;
}

.detail-one-line {
  max-width: 850px;
  font-size: 19px;
}

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

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

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.22), transparent 35%),
    #020617;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  aspect-ratio: 16 / 9;
}

.movie-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

.movie-player.is-playing .player-overlay {
  display: none;
}

.play-mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  box-shadow: 0 0 38px rgba(34, 211, 238, 0.38);
  font-size: 30px;
}

.detail-article {
  max-width: 980px;
}

.detail-article h2 {
  margin-top: 28px;
  font-size: 28px;
}

.detail-article p {
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.info-table div {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.info-table span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.info-table strong {
  display: block;
}

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

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

.footer-logo {
  font-size: 18px;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
}

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

  .split-layout,
  .search-band,
  .filter-panel,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .ranking-feature-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(280px, 72vw);
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 84px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-overview-grid,
  .info-table {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .large-rank .rank-item {
    grid-template-columns: 42px 1fr;
  }

  .rank-desc {
    grid-column: 2;
    white-space: normal;
  }

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

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

  .footer-inner {
    display: block;
  }
}
