:root {
  --bg: #07111f;
  --bg-soft: #0f1b2d;
  --bg-card: rgba(15, 23, 42, 0.86);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 28rem),
    linear-gradient(180deg, #08111f 0%, #0f172a 44%, #020617 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 70%);
  z-index: -1;
}

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

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

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 74px;
}

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 18px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 38px rgba(34, 211, 238, 0.28);
}

.brand-copy strong,
.footer-brand strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.nav-link {
  color: #dbeafe;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.nav-link:hover {
  transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  outline: none;
  padding: 12px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 11px 17px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.mobile-nav {
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(2, 6, 23, 0.96);
}

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

.hero {
  position: relative;
}

.hero-stage {
  position: relative;
  height: 660px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.12) 45%);
}

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

.hero-copy {
  width: min(690px, 100%);
  padding-top: 32px;
}

.eyebrow,
.card-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.95));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.22);
}

.eyebrow {
  padding: 9px 15px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
}

.hero h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4.8vw, 56px);
  line-height: 1.04;
}

.hero p,
.page-hero p,
.detail-copy .lead {
  color: #dbeafe;
  font-size: clamp(16px, 2.4vw, 21px);
  line-height: 1.75;
}

.hero p {
  max-width: 650px;
  margin: 22px 0;
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.meta-line span {
  position: relative;
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after,
.meta-line span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 10px;
  border-radius: 999px;
  vertical-align: middle;
  background: rgba(148, 163, 184, 0.65);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.34);
}

.primary-button.small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.015);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.hero-quick-links {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: -34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-quick-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
}

.main-stack,
.page-shell {
  padding: 74px 0;
}

.main-stack {
  display: grid;
  gap: 80px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 38px);
  letter-spacing: -0.03em;
}

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

.featured-grid,
.poster-grid,
.category-grid,
.category-list-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

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

.movie-card,
.category-box,
.category-card-large,
.content-card,
.filter-panel,
.rank-row {
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.23);
  backdrop-filter: blur(14px);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link,
.wide-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link {
  aspect-ratio: 2 / 3;
}

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

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

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 10px;
  font-size: 12px;
}

.hover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 24px;
  opacity: 0;
  background: rgba(34, 211, 238, 0.88);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.34);
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body,
.wide-body {
  padding: 17px;
}

.card-body h3,
.wide-body h3,
.rank-body h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p,
.wide-body p,
.rank-body p,
.category-box p,
.category-card-large p,
.content-card p {
  color: var(--muted);
  line-height: 1.7;
}

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

.meta-line {
  font-size: 13px;
}

.wide-card {
  display: grid;
  grid-template-columns: 185px 1fr;
  min-height: 220px;
}

.wide-cover {
  min-height: 100%;
}

.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  padding: 7px 10px;
  color: #a5f3fc;
  font-size: 12px;
  background: rgba(8, 145, 178, 0.12);
}

.ranking-preview {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 24px;
}

.wide-list {
  display: grid;
  gap: 18px;
}

.category-panel {
  margin-inline: calc((100vw - min(1180px, calc(100% - 32px))) / -2);
  padding: 58px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(59, 130, 246, 0.08));
}

.category-box,
.category-card-large,
.content-card,
.filter-panel {
  border-radius: var(--radius);
  padding: 24px;
}

.category-box h3,
.category-card-large h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.mini-links {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.mini-links.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-links a {
  overflow: hidden;
  color: #dbeafe;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.latest-layout {
  display: grid;
  grid-template-columns: 0.96fr 1.5fr;
  gap: 24px;
}

.recommend-panel {
  border-radius: 28px;
  padding: 30px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid var(--line);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(38px, 8vw, 78px);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 23rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.68));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.04;
}

.page-hero p {
  max-width: 760px;
}

.filter-panel {
  margin: 34px 0 28px;
}

.filter-title {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 800;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 12px;
}

.empty-state {
  margin-top: 28px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 20px;
  padding: 38px;
  color: var(--muted);
  text-align: center;
}

.category-card-large {
  display: grid;
  align-content: space-between;
  min-height: 330px;
}

.rank-list {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}

.rank-row {
  display: grid;
  grid-template-columns: 72px 98px 1fr auto;
  align-items: center;
  gap: 18px;
  border-radius: 22px;
  padding: 14px 18px;
}

.rank-num {
  color: transparent;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 55%);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 48px 0 84px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumbs a {
  color: #a5f3fc;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
}

.detail-copy .lead {
  max-width: 780px;
}

.watch-panel {
  margin-top: -54px;
  position: relative;
  z-index: 5;
}

.watch-panel h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 38px);
}

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

.video-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.22));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-mark {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 48px rgba(34, 211, 238, 0.38);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 46px;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-recommend {
  margin-top: 48px;
  margin-bottom: 72px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.65), #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 42px;
  padding: 52px 0;
}

.footer-main p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.75;
}

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

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

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 16px;
  color: #64748b;
  text-align: center;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .featured-grid,
  .poster-grid,
  .poster-grid.compact,
  .all-movies {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-preview,
  .latest-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

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

  .header-inner {
    min-height: 66px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .hero-stage {
    height: 620px;
  }

  .hero-copy {
    padding-top: 10px;
  }

  .hero-control {
    display: none;
  }

  .hero-quick-links {
    margin-top: -22px;
  }

  .main-stack,
  .page-shell {
    padding: 44px 0;
  }

  .featured-grid,
  .poster-grid,
  .poster-grid.compact,
  .all-movies,
  .category-grid,
  .category-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body,
  .wide-body {
    padding: 13px;
  }

  .card-body h3 {
    min-height: auto;
    font-size: 15px;
  }

  .card-body p {
    min-height: auto;
    font-size: 13px;
  }

  .wide-card {
    grid-template-columns: 116px 1fr;
    min-height: 160px;
  }

  .wide-body p,
  .wide-body .tag-row {
    display: none;
  }

  .category-panel {
    margin-inline: -12px;
    padding: 38px 12px;
  }

  .filter-grid,
  .footer-grid,
  .detail-layout,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-hero-content {
    padding: 30px 0 78px;
  }

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

  .rank-row {
    align-items: start;
  }

  .rank-cover {
    width: 120px;
  }

  .page-hero {
    border-radius: 24px;
    padding: 30px 22px;
  }

  .recommend-panel {
    padding: 18px;
  }
}
