:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --radius: 18px;
  --shadow: 0 20px 70px rgba(8, 145, 178, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.38);
}

.brand-name,
.footer-brand {
  font-size: 20px;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--muted-strong);
  padding: 9px 13px;
  border-radius: 12px;
  transition: 180ms ease;
}

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

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

.header-search input,
.mobile-search input,
.filter-box input,
.search-panel input,
.search-panel select {
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
  outline: none;
  border-radius: 12px;
  padding: 10px 13px;
  min-width: 220px;
  transition: 180ms ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-box input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(34, 211, 238, 0.64);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-search button,
.btn,
.hero-link,
.play-cover span {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  border-radius: 13px;
  padding: 10px 15px;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(8, 145, 178, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.header-search button:hover,
.mobile-search button:hover,
.btn:hover,
.hero-link:hover,
.play-cover:hover span {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.34);
}

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

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

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

main {
  min-height: 72vh;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.06) 34%, transparent 70%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 380px;
  align-items: center;
  gap: 40px;
  padding: 70px 0 110px;
}

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

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

.hero p {
  max-width: 740px;
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-meta,
.movie-meta,
.card-meta {
  color: var(--muted);
  font-size: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 28px 0;
}

.hero-link.secondary,
.btn.secondary {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(34, 211, 238, 0.26);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

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

.hero-poster::after,
.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.82));
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 10px;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
}

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

.hero-dot.active {
  background: var(--cyan);
}

.page-hero,
.content-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero {
  padding: 64px 0 34px;
}

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

.page-hero p {
  max-width: 850px;
  color: var(--muted-strong);
  font-size: 18px;
}

.content-wrap {
  padding: 42px 0 74px;
}

.home-sections {
  display: grid;
  gap: 80px;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading p {
  margin: 6px 0 0;
  max-width: 720px;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62));
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

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

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0b1120;
}

.card-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 280ms ease;
}

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

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(34, 211, 238, 0.82);
  box-shadow: 0 10px 26px rgba(34, 211, 238, 0.3);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #06101a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 7px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-body p {
  min-height: 54px;
  margin: 0 0 13px;
  color: var(--muted-strong);
  font-size: 14px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span,
.detail-tags span,
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  padding: 4px 9px;
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 9rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.74));
  transition: transform 190ms ease, border-color 190ms ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-card p {
  color: var(--muted-strong);
  margin: 0;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 28px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 86px 36px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  transition: border-color 190ms ease, transform 190ms ease;
}

.compact-card:hover {
  border-color: rgba(34, 211, 238, 0.5);
  transform: translateX(4px);
}

.compact-card img {
  width: 86px;
  height: 56px;
  object-fit: cover;
  border-radius: 11px;
}

.compact-card b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: #06101a;
  background: var(--cyan);
}

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

.compact-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.filter-box,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
}

.filter-box input,
.search-panel input {
  flex: 1 1 300px;
}

.search-panel select {
  min-width: 180px;
}

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

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.48));
  z-index: 1;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.56;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 50px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 330px;
  gap: 34px;
  align-items: center;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 24px;
  background: black;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: rgba(2, 6, 23, 0.22);
  cursor: pointer;
}

.play-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.play-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), rgba(2, 6, 23, 0.7));
}

.play-cover span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 19px;
  font-weight: 800;
  padding: 14px 22px;
}

.play-cover.is-hidden {
  display: none;
}

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

.detail-info p {
  color: var(--muted-strong);
  font-size: 17px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.7fr;
  gap: 30px;
}

.article-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  padding: 24px;
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-panel p {
  margin: 0 0 18px;
  color: var(--muted-strong);
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 10px;
  color: var(--muted-strong);
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 10px;
}

.info-list span:first-child {
  color: var(--muted);
}

.breadcrumbs {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 14px;
}

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

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.show {
  display: block;
}

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

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

.footer-inner p {
  max-width: 560px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: var(--muted-strong);
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.footer-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.42);
}

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

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

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

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

  .hero-poster,
  .detail-poster {
    max-width: 380px;
  }
}

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

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

  .site-header.nav-open .mobile-panel {
    display: block;
  }

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

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

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

  .hero-content {
    padding-top: 40px;
  }

  .hero-poster {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .mobile-panel,
  .page-hero,
  .content-wrap,
  .detail-inner,
  .footer-inner,
  .hero-content,
  .hero-dots {
    width: min(100% - 22px, 1200px);
  }

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

  .hero-link,
  .btn {
    text-align: center;
  }

  .compact-card {
    grid-template-columns: 72px 32px minmax(0, 1fr);
  }

  .compact-card img {
    width: 72px;
  }
}
