:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --blue-deep: #2563eb;
  --orange: #fb923c;
  --green: #34d399;
  --radius: 22px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.32), transparent 34rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.4);
}

.brand-name {
  font-size: 20px;
  white-space: nowrap;
}

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

.nav-link {
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

.nav-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: white;
  padding: 11px 12px 11px 16px;
  background: transparent;
}

.nav-search button {
  border: 0;
  color: white;
  padding: 11px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: white;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  height: min(76vh, 720px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.70) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 42%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  padding-top: 38px;
}

.hero-kicker,
.eyebrow,
.section-heading span,
.player-topline span {
  display: inline-flex;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.75;
}

.hero-tags,
.tag-list,
.detail-meta,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(15, 23, 42, 0.58);
}

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

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

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.36);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.text-button {
  color: rgba(255, 255, 255, 0.85);
}

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

.primary-button.small,
.ghost-button.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

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

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

.hero-dot.is-active {
  width: 58px;
  background: white;
}

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

.section-heading {
  margin-bottom: 30px;
  text-align: center;
}

.section-heading.left {
  text-align: left;
}

.section-heading h2,
.inner-hero h1,
.detail-info h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.inner-hero p,
.category-overview-card p,
.footer-grid p,
.detail-one-line,
.detail-text-card p {
  color: var(--muted);
  line-height: 1.8;
}

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

.featured-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(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.18);
}

.movie-card.large .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
}

.poster-link img,
.category-tile img,
.compact-card img,
.rank-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.compact-card:hover img {
  transform: scale(1.05);
  filter: saturate(1.08);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.card-body {
  padding: 16px;
}

.card-meta {
  gap: 6px;
  margin-bottom: 10px;
}

.card-meta span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.25;
}

.card-body h2 a:hover,
.rank-info h2 a:hover,
.category-overview-card h2 a:hover {
  color: var(--blue);
}

.card-body p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list {
  align-items: flex-start;
}

.tag-list span {
  min-height: 24px;
  padding: 3px 8px;
  color: rgba(186, 230, 253, 0.92);
  font-size: 12px;
}

.category-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0));
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.12));
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 58px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.45;
}

.ranking-band {
  background:
    radial-gradient(circle at center left, rgba(251, 146, 60, 0.16), transparent 28rem),
    linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.34));
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.5fr;
  align-items: start;
  gap: 34px;
}

.compact-grid,
.mini-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 94px;
  padding: 10px;
  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;
}

.compact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.42);
}

.compact-card img {
  grid-row: 1 / 3;
  height: 74px;
  border-radius: 12px;
}

.compact-card span {
  align-self: end;
  font-weight: 800;
  line-height: 1.35;
}

.compact-card small {
  align-self: start;
  color: var(--muted);
}

.page-main {
  min-height: 68vh;
}

.inner-hero {
  padding: 92px 0 54px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(30, 64, 175, 0.22), rgba(15, 23, 42, 0));
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.74);
}

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

.inline-search,
.search-panel {
  display: flex;
  max-width: 680px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.inline-search input,
.search-panel input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 17px 20px;
  color: white;
  background: transparent;
}

.search-panel button {
  border: 0;
  padding: 0 26px;
  color: white;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
}

.category-overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.category-overview-card h2 {
  margin: 8px 0 8px;
  font-size: 30px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 70px 110px 1fr 70px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  border-color: rgba(251, 146, 60, 0.45);
}

.rank-number {
  color: rgba(255, 255, 255, 0.38);
  font-size: 30px;
  font-weight: 900;
}

.rank-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-card strong {
  color: #facc15;
  font-size: 24px;
}

.detail-hero {
  padding: 58px 0 36px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0));
}

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

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin-top: 12px;
  font-size: clamp(38px, 6vw, 72px);
}

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

.detail-meta {
  margin: 22px 0 16px;
}

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

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(2, 6, 23, 0.92);
  box-shadow: var(--shadow);
}

.player-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-topline strong {
  font-size: 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: black;
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  color: white;
  font-size: 30px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.45);
}

.video-overlay em {
  color: rgba(255, 255, 255, 0.84);
  font-style: normal;
}

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

.detail-text-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.detail-text-card h2 {
  margin: 0 0 12px;
}

.site-footer {
  margin-top: 40px;
  padding: 52px 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(0, 0, 0, 0.42));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  font-size: 22px;
}

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

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

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

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

.search-status {
  margin-bottom: 22px;
  color: var(--muted);
}

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

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

  .ranking-layout,
  .category-overview-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .nav-wrap {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-menu,
  .nav-search {
    display: none;
    width: 100%;
  }

  .nav-menu.is-open,
  .nav-search.is-open {
    display: flex;
  }

  .nav-menu {
    flex-wrap: wrap;
    order: 4;
    margin-left: 0;
  }

  .nav-search {
    order: 5;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .compact-grid,
  .mini-row,
  .detail-text-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-card {
    grid-template-columns: 52px 82px 1fr;
  }

  .rank-card strong {
    grid-column: 3;
  }
}

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

  .brand-name {
    font-size: 17px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 42px;
  }

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

  .primary-button,
  .ghost-button,
  .text-button {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .compact-grid,
  .mini-row,
  .detail-text-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .category-overview-card {
    padding: 18px;
  }

  .rank-card {
    grid-template-columns: 44px 74px 1fr;
    gap: 12px;
  }

  .rank-number {
    font-size: 22px;
  }

  .rank-info h2 {
    font-size: 18px;
  }

  .rank-info p {
    display: none;
  }

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

  .play-circle {
    width: 68px;
    height: 68px;
  }
}
