*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --bg-card-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --orange: #f97316;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.15), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(59, 130, 246, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  -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-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 38px rgba(34, 211, 238, 0.45);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #020617;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.68);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: #e2e8f0;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
}

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

.mobile-panel-inner {
  padding: 14px 0 18px;
  display: grid;
  gap: 8px;
}

.home-main,
.page-main {
  min-height: 70vh;
}

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

.hero-section {
  position: relative;
  min-height: 760px;
  padding: 132px 0 72px;
  overflow: hidden;
}

.hero-bg-one,
.hero-bg-two {
  position: absolute;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.8;
  pointer-events: none;
}

.hero-bg-one {
  width: 420px;
  height: 420px;
  left: 8%;
  top: 18%;
  background: rgba(34, 211, 238, 0.16);
}

.hero-bg-two {
  width: 520px;
  height: 520px;
  right: 3%;
  bottom: 8%;
  background: rgba(59, 130, 246, 0.18);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  gap: 42px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.12);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.simple-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, #e0faff, var(--cyan), var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead,
.simple-hero p,
.detail-one-line {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

.hero-search {
  margin: 30px 0 20px;
  max-width: 580px;
  display: flex;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.hero-search input,
.search-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.hero-search input {
  padding: 12px 14px;
}

.hero-search button,
.primary-button,
.ghost-button,
.filter-buttons button {
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-search button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  color: #03131d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.26);
}

.primary-button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(34, 211, 238, 0.34);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: #e2e8f0;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.56);
}

.ghost-button:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.72);
  transform: translateY(-2px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-showcase {
  position: relative;
  min-height: 540px;
}

.hero-card {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(0.96) translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-card.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero-card img,
.category-card img,
.category-wide-image img,
.poster-frame img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-failed {
  display: none;
}

.hero-card > img {
  position: absolute;
  inset: 0;
}

.hero-card-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.78) 58%, rgba(2, 6, 23, 0.96) 100%),
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.22), transparent 24rem);
}

.hero-card-content {
  position: relative;
  z-index: 2;
  padding: 34px;
}

.hero-card-content h2 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.hero-card-content p {
  max-width: 620px;
  color: #cbd5e1;
  line-height: 1.75;
}

.hero-dots {
  position: absolute;
  left: 32px;
  bottom: 22px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 28px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
}

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

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

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

.section-heading.compact,
.section-heading.inline-only {
  display: block;
}

.section-heading p {
  margin: 0 0 6px;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2,
.section-heading h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.16;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.3);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 26px 70px rgba(8, 145, 178, 0.18);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 260px;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.25), transparent 14rem),
    linear-gradient(135deg, #0f172a, #020617);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #03131d;
  background: var(--cyan);
  box-shadow: 0 0 35px rgba(34, 211, 238, 0.5);
}

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

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-line span,
.detail-meta span {
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
}

.movie-card h2,
.rank-info h2,
.text-card h2 {
  margin: 12px 0 10px;
  font-size: 19px;
  line-height: 1.32;
}

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

.movie-card p,
.rank-info p,
.text-card p {
  color: #cbd5e1;
  line-height: 1.68;
}

.movie-card p {
  min-height: 74px;
  margin: 0 0 14px;
  font-size: 14px;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.18);
  font-size: 12px;
  font-weight: 800;
}

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

.category-card,
.category-wide-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card {
  min-height: 220px;
  display: grid;
  align-content: end;
  padding: 22px;
  border-radius: 24px;
}

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

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.24;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 23px;
}

.category-card em {
  margin-top: 8px;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.55;
}

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

.category-wide-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 16px;
  border-radius: 26px;
}

.category-wide-image {
  height: 210px;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

.category-wide-card h2 {
  margin: 12px 0 8px;
  font-size: 28px;
}

.category-wide-card p {
  color: #cbd5e1;
  line-height: 1.72;
}

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

.ranking-panel,
.search-panel,
.text-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.ranking-panel,
.search-panel {
  padding: 24px;
}

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

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

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

.small-rank .rank-item {
  grid-template-columns: 44px 64px minmax(0, 1fr);
  padding: 10px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #03131d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 950;
}

.rank-cover {
  width: 86px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.small-rank .rank-cover {
  width: 64px;
}

.rank-info h2 {
  margin-top: 0;
}

.rank-info p {
  margin: 0 0 10px;
  font-size: 14px;
}

.page-hero {
  margin-top: 26px;
}

.simple-hero {
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 16%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

.simple-hero h1 {
  font-size: clamp(36px, 6vw, 62px);
}

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

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

.search-control-row {
  display: grid;
  gap: 16px;
}

.search-input {
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.62);
}

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

.filter-buttons button {
  padding: 9px 14px;
  color: #cbd5e1;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.75);
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: #03131d;
  background: var(--cyan);
}

.detail-hero {
  margin-top: 26px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 72% 22%, rgba(59, 130, 246, 0.2), transparent 30rem),
    rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
}

.detail-poster {
  min-height: 480px;
  border-radius: 28px;
}

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-tags {
  margin: 18px 0 26px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 50% 35%, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.88));
  text-align: center;
}

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

.player-play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: #03131d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 54px rgba(34, 211, 238, 0.5);
  font-size: 28px;
}

.player-layer strong {
  font-size: clamp(24px, 4vw, 40px);
}

.player-layer em {
  color: #a5f3fc;
  font-style: normal;
  font-weight: 900;
}

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

.text-card {
  padding: 28px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
  padding: 44px 0;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.72;
}

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

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .hero-inner,
  .split-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-showcase {
    min-height: 520px;
  }

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

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-section {
    min-height: auto;
    padding-top: 112px;
  }

  .hero-inner {
    gap: 28px;
  }

  .hero-showcase,
  .hero-card {
    min-height: 460px;
  }

  .movie-grid,
  .listing-grid,
  .latest-grid,
  .related-grid,
  .category-grid,
  .category-wide-grid,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-poster {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 22px, 1240px);
  }

  .nav-shell {
    height: 66px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero-copy h1,
  .simple-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.04em;
  }

  .hero-search,
  .hero-actions {
    display: grid;
  }

  .hero-showcase,
  .hero-card {
    min-height: 420px;
  }

  .hero-card-content,
  .simple-hero,
  .detail-grid,
  .search-panel,
  .ranking-panel,
  .text-card {
    padding: 20px;
  }

  .movie-grid,
  .listing-grid,
  .latest-grid,
  .related-grid,
  .category-grid,
  .category-wide-grid,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .small-rank .rank-item {
    grid-template-columns: 44px 62px minmax(0, 1fr);
  }

  .rank-cover,
  .small-rank .rank-cover {
    width: 62px;
  }

  .poster-frame {
    min-height: 320px;
  }

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