:root {
  color-scheme: light;
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cyan: #0891b2;
  --teal: #0f766e;
  --orange: #f97316;
  --purple: #7c3aed;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan), var(--teal));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.brand-text {
  font-size: 1.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 48%, #0f766e 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.18), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.22));
}

.hero-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 660px;
  margin: 0 auto;
  padding: 72px 0 46px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 52px;
  min-height: 510px;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.18)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 36px;
  padding: 52px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.5s ease both;
}

.hero-content {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #dbeafe;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--primary);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 18px 0 12px;
  font-size: clamp(1.55rem, 3.5vw, 2.5rem);
  line-height: 1.16;
  font-weight: 900;
}

.hero p,
.page-hero p,
.detail-one-line {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions,
.page-actions,
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.secondary-btn,
.page-actions a,
.intro-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
}

.primary-btn,
.intro-actions a:first-child {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(255, 255, 255, 0.18);
}

.secondary-btn,
.page-actions a,
.intro-actions a:last-child {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.intro-actions a {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.primary-btn:hover,
.secondary-btn:hover,
.page-actions a:hover,
.intro-actions a:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  justify-self: center;
  width: min(340px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  box-shadow: 0 30px 68px rgba(0, 0, 0, 0.34);
}

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

.hero-poster span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 900;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}

.hero-control,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-control {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 2rem;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}

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

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

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-top: -28px;
  padding: 34px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-panel h2,
.section-heading h2,
.content-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.intro-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.section-heading > a {
  color: var(--primary);
  font-weight: 900;
}

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

.category-card,
.category-overview-card a {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 22px;
  color: #ffffff;
  border-radius: 24px;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.82)),
    var(--category-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--soft-shadow);
  transition: 0.2s ease;
}

.category-card:hover,
.category-overview-card a:hover,
.movie-card:hover {
  transform: translateY(-4px);
}

.category-name,
.category-card span,
.category-overview-card span {
  width: max-content;
  padding: 7px 10px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.85);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.category-card strong,
.category-overview-card h2 {
  margin: 12px 0 6px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.category-card em,
.category-overview-card em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  line-height: 1.6;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  transition: 0.2s ease;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe, #ccfbf1);
}

.poster-frame img {
  transition: transform 0.35s ease;
}

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

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 7px 10px;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 950;
  font-size: 0.82rem;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.score-badge {
  right: 12px;
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

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

.movie-title {
  display: block;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 950;
}

.movie-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.movie-card p {
  margin: 10px 0 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.65;
}

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

.tag-row span,
.detail-tag {
  padding: 5px 9px;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 160px auto auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.search-box {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}

.search-box input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

.search-box input:focus,
.filter-bar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-reset {
  min-height: 44px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.filter-result {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background-image:
    linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(8, 145, 178, 0.86), rgba(15, 118, 110, 0.9)),
    var(--page-image);
  background-size: cover;
  background-position: center;
}

.page-hero-inner,
.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0;
}

.page-hero-inner {
  max-width: 840px;
}

.page-actions a {
  min-height: 44px;
}

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

.category-overview-card {
  min-width: 0;
}

.category-overview-card a {
  min-height: 260px;
}

.category-overview-card p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.detail-hero {
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.86)),
    var(--detail-image);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.detail-cover span {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 8px 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  border-radius: 999px;
  font-weight: 950;
}

.detail-copy h1 {
  max-width: 880px;
}

.detail-one-line {
  margin-top: 18px;
  max-width: 850px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-meta-grid strong,
.detail-meta-grid span {
  display: block;
}

.detail-meta-grid strong {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.detail-meta-grid span {
  margin-top: 4px;
  font-weight: 900;
}

.player-section {
  padding-bottom: 24px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-layer span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.42);
  font-size: 2rem;
}

.play-layer strong {
  font-size: 1.08rem;
}

.video-player.playing .play-layer {
  opacity: 0;
  pointer-events: none;
}

.detail-text {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.content-card {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.content-card p {
  margin: 16px 0 0;
  color: #334155;
  line-height: 1.92;
}

.accent-card {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.prev-next a {
  padding: 18px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}

.prev-next a:last-child {
  text-align: right;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 950;
}

.site-footer p {
  margin: 12px 0 0;
  line-height: 1.8;
}

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

.footer-links a {
  padding: 8px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-weight: 800;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .hero-shell {
    min-height: auto;
    padding: 36px 0;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 28px;
    min-height: 0;
  }

  .hero-poster {
    width: min(260px, 100%);
  }

  .intro-panel,
  .section-heading,
  .detail-layout,
  .detail-text,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(260px, 100%);
  }

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

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

  .prev-next {
    grid-template-columns: 1fr;
  }

  .prev-next a:last-child {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .hero-shell,
  .section-shell,
  .page-hero-inner,
  .detail-hero-inner,
  .footer-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    font-size: 1rem;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.25rem;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

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