:root {
  --bg: #07111f;
  --bg-soft: #0d1b2e;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --brand: #38bdf8;
  --brand-strong: #2563eb;
  --accent: #f97316;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.36), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #07111f 42%, #111827 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 76%);
}

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: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(240px, 360px) auto;
  gap: 22px;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
}

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

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.34);
}

.brand-text {
  white-space: nowrap;
  font-size: 1.08rem;
}

.desktop-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.nav-link,
.mobile-nav a,
.footer-links a,
.text-button,
.section-more {
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.header-search {
  position: relative;
}

.global-search,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.global-search {
  padding: 0 18px;
}

.global-search::placeholder,
.filter-bar input::placeholder {
  color: rgba(203, 213, 225, 0.68);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: none;
  width: min(520px, 92vw);
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.search-panel.open {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-result img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.search-result strong {
  display: block;
  margin-bottom: 4px;
}

.search-result span {
  color: var(--subtle);
  font-size: 0.88rem;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: white;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 590px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 48%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 340px;
  gap: 42px;
  align-items: center;
  min-height: 590px;
  padding: 64px;
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker,
.page-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  font-weight: 700;
  font-size: 0.86rem;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 760px;
  font-size: clamp(2.45rem, 7vw, 5.8rem);
}

.hero-copy p,
.page-hero p,
.lead-text {
  color: var(--muted);
  line-height: 1.8;
}

.hero-copy p {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: 1.08rem;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(56, 189, 248, 0.13);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 11px;
  border: 1px solid rgba(125, 211, 252, 0.2);
}

.hero-actions,
.detail-copy .primary-button {
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.primary-button {
  min-height: 48px;
  padding: 0 22px;
  color: white;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.36);
}

.ghost-button {
  min-height: 48px;
  margin-left: 12px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.44);
  transform: rotate(2deg);
}

.hero-poster::before {
  position: absolute;
  inset: 16px -16px -16px 16px;
  z-index: -1;
  content: "";
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(34, 211, 238, 0.2));
}

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

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 6;
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 1.6rem;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.active {
  width: 28px;
  background: var(--brand);
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 0;
}

.quick-panel a,
.category-tile,
.movie-card,
.category-card-large,
.rank-row,
.filter-bar,
.detail-text article,
.player-shell {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.2);
}

.quick-panel a {
  padding: 22px;
  border-radius: 24px;
}

.quick-panel span {
  display: block;
  color: var(--subtle);
  font-size: 0.9rem;
}

.quick-panel strong {
  display: block;
  margin-top: 5px;
  font-size: 1.2rem;
}

.content-section,
.category-list,
.rank-list,
.detail-text,
.player-section {
  margin-top: 54px;
}

.wide-section {
  margin-top: 28px;
}

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

.section-heading h2,
.rank-list h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--subtle);
}

.section-more,
.text-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover,
.category-tile:hover,
.category-card-large:hover,
.rank-row:hover,
.quick-panel a:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.88), transparent);
}

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 800;
}

.play-pill {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(37, 99, 235, 0.86);
  font-size: 0.78rem;
}

.rank-badge {
  top: 10px;
  left: 10px;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.28);
}

.card-body {
  padding: 14px;
}

.meta-line {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--subtle);
  font-size: 0.82rem;
}

.card-body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.15em;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  padding: 4px 7px;
  font-size: 0.75rem;
}

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

.category-tile {
  display: block;
  overflow: hidden;
  border-radius: 26px;
}

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

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

.category-info {
  padding: 18px;
}

.category-info h3,
.category-copy h2 {
  margin: 0 0 8px;
  font-weight: 900;
}

.category-info p,
.category-copy p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.6;
}

.page-hero {
  margin-top: 28px;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(8, 145, 178, 0.12)),
    rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  overflow: hidden;
  border-radius: 28px;
}

.category-visual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 260px;
}

.category-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

.category-copy {
  padding: 28px 28px 28px 0;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.13);
  font-size: 0.88rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 14px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 24px;
}

.filter-bar input,
.filter-bar select {
  padding: 0 16px;
}

.filter-bar select {
  appearance: none;
}

.rank-list {
  margin-bottom: 64px;
}

.rank-rows {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(220px, auto);
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 18px;
}

.rank-number {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--subtle);
  font-size: 0.9rem;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--subtle);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 14% 4%, rgba(56, 189, 248, 0.22), transparent 28rem),
    var(--panel);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #111827;
}

.detail-copy h1 {
  font-size: clamp(2.2rem, 5.5vw, 5rem);
}

.lead-text {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: 1.08rem;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 16px;
  place-items: center;
  border: 0;
  color: white;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78)),
    rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

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

.play-circle {
  display: inline-grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 20px 52px rgba(37, 99, 235, 0.4);
  font-size: 2rem;
}

.play-overlay strong {
  max-width: min(720px, 80vw);
  text-align: center;
  font-size: clamp(1.2rem, 3vw, 2rem);
}

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

.detail-text article {
  padding: 26px;
  border-radius: 26px;
}

.detail-text p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.9;
}

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

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

.footer-inner p {
  max-width: 420px;
  margin: 12px 0 0;
  color: var(--subtle);
  line-height: 1.7;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 30px;
  color: var(--subtle);
  font-size: 0.9rem;
}

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr 250px;
    padding: 46px;
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-search {
    grid-column: 1 / -1;
    order: 3;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    align-content: end;
    padding: 34px;
  }

  .hero-poster {
    display: none;
  }

  .quick-panel,
  .detail-text,
  .footer-inner,
  .detail-layout,
  .category-card-large,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .category-copy {
    padding: 24px;
  }

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

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

  .page-hero,
  .detail-layout {
    padding: 28px;
  }

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

  .rank-row {
    grid-template-columns: 44px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }

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

@media (max-width: 520px) {
  main,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1240px);
  }

  .hero-carousel,
  .page-hero,
  .detail-layout {
    border-radius: 24px;
  }

  .hero-content {
    padding: 26px;
  }

  .hero-copy p {
    font-size: 0.98rem;
  }

  .ghost-button {
    margin: 12px 0 0;
  }

  .hero-actions {
    display: grid;
  }

  .movie-grid,
  .catalog-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }
}
