* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c31;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --violet: #7c3aed;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(6, 182, 212, 0.18), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #111827 46%, #0f172a 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.main-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.14);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #ffffff;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.15) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.22) 45%, rgba(15, 23, 42, 0.35) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 12%;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-copy {
  width: min(760px, 100%);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.28);
  color: #a5f3fc;
  font-size: 14px;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

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

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-action,
.secondary-action,
.hero-actions a,
.section-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-action,
.hero-actions a:first-child,
.section-actions a:first-child {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
}

.secondary-action,
.hero-actions a:not(:first-child),
.section-actions a:not(:first-child) {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.primary-action:hover,
.secondary-action:hover,
.hero-actions a:hover,
.section-actions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.28);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
}

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

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

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

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

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

.main-shell,
.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 56px 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 48px 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(6, 182, 212, 0.5);
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

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

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

.movie-card h3 {
  margin: 10px 0 8px;
  min-height: 48px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.rank-title a:hover,
.category-links a:hover {
  color: #67e8f9;
}

.movie-card p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0 0 13px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.58;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.compact-card h3 {
  min-height: 0;
}

.compact-card p {
  min-height: 46px;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  padding: 4px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.12);
  font-size: 12px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.category-cover {
  min-height: 180px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.28), transparent 20%),
    linear-gradient(135deg, rgba(6, 182, 212, 0.85), rgba(37, 99, 235, 0.86), rgba(124, 58, 237, 0.84));
  box-shadow: inset 0 0 48px rgba(255, 255, 255, 0.12);
}

.category-cover span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  color: #ffffff;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.category-tile-body h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile-body p {
  margin: 0 0 14px;
  color: var(--muted-strong);
  line-height: 1.72;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 2fr;
  gap: 16px;
  margin: 28px 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.filter-search input,
.filter-selects select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  outline: none;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
}

.filter-search input {
  padding: 0 16px;
}

.filter-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.filter-selects label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.filter-selects select {
  padding: 0 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 92px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.rank-number {
  color: #67e8f9;
  font-size: 24px;
  font-weight: 900;
}

.rank-poster {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
}

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

.rank-title h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-title p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.rank-score {
  justify-self: end;
  color: #bae6fd;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 54px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  filter: blur(26px);
  transform: scale(1.08);
}

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

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), #0f172a 94%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

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

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 20px;
  color: var(--muted-strong);
  font-size: 20px;
  line-height: 1.7;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.76));
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.24s ease;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 46px rgba(6, 182, 212, 0.38);
}

.play-icon::before {
  content: "";
  margin-left: 5px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #ffffff;
}

.detail-content {
  display: grid;
  gap: 14px;
  padding-top: 20px;
  color: var(--muted-strong);
  line-height: 1.9;
}

.detail-content h2 {
  margin: 24px 0 0;
  color: #ffffff;
  font-size: 28px;
}

.detail-content p {
  margin: 0;
}

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

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
}

.is-filter-hidden {
  display: none !important;
}

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

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

  .detail-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-block;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero {
    height: 78vh;
    min-height: 620px;
  }

  .hero-slide::after {
    background:
      linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.34) 100%),
      linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.3));
  }

  .hero-arrow {
    display: none;
  }

  .section-heading {
    display: block;
  }

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

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

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

  .rank-row {
    grid-template-columns: 54px 72px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 540px) {
  .nav-wrap,
  .main-shell,
  .content-section,
  .footer-inner,
  .hero-content,
  .detail-layout {
    width: min(100% - 24px, 1280px);
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .detail-info h1 {
    letter-spacing: -0.03em;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner p {
    margin-top: 12px;
  }
}
