* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --sky-50: #eff6ff;
  --sky-100: #dbeafe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --blue-700: #1d4ed8;
  --indigo-700: #4338ca;
  --emerald-500: #10b981;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(2, 132, 199, 0.16);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--slate-800);
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sky-600);
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-700));
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.main-nav a {
  color: var(--slate-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--sky-600);
}

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

.header-search input,
.filter-input {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--slate-800);
  background: var(--white);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-input:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.header-search button,
.filter-inline button,
.filter-pills button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--sky-600);
  padding: 10px 16px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.filter-inline button:hover,
.filter-pills button:hover {
  background: var(--sky-700);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--sky-600);
  background: var(--sky-50);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 22px;
}

.hero-slider {
  position: relative;
  height: 640px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-600), var(--indigo-700));
}

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

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

.hero-shade,
.detail-hero-shade,
.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.56) 45%, rgba(14, 165, 233, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 54px;
}

.hero-copy h1 {
  max-width: 850px;
  margin: 12px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--sky-500);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(18px, 2.5vw, 24px);
}

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

.hero-tags span,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--sky-700);
  background: rgba(239, 246, 255, 0.92);
  font-size: 13px;
  font-weight: 750;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 850;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px) scale(1.01);
}

.button-primary {
  color: var(--sky-700);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.button-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--white);
}

.search-panel,
.section-block {
  margin-top: 48px;
  margin-bottom: 48px;
}

.search-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: var(--radius-xl);
  padding: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.search-panel h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.search-panel p {
  margin: 0;
  color: var(--slate-600);
}

.filter-inline,
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-inline .filter-input {
  min-width: 240px;
  flex: 1;
}

.filter-inline a,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-600);
  background: var(--sky-50);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.small-heading h2 {
  font-size: 28px;
}

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

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  display: flex;
  align-items: end;
  isolation: isolate;
  color: var(--white);
  background-color: var(--sky-600);
  background-position: center;
  background-size: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 60px rgba(2, 132, 199, 0.25);
}

.category-card-shade {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.88));
  z-index: -1;
}

.category-card-content {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.category-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.category-card em {
  color: #dbeafe;
  font-style: normal;
  font-size: 14px;
}

.mini-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-title-row span {
  max-width: 100%;
  overflow: hidden;
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 850;
}

.year-badge {
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, #f97316, #e11d48);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: var(--sky-600);
}

.movie-meta,
.movie-one-line {
  margin: 0 0 10px;
  color: var(--slate-600);
  font-size: 14px;
}

.movie-one-line {
  display: -webkit-box;
  min-height: 45px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  color: var(--emerald-500);
  background: #ecfdf5;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
}

.movie-card-compact .poster-link img {
  height: 100%;
  min-height: 138px;
}

.movie-card-compact .movie-card-body {
  align-self: center;
}

.movie-card-compact .movie-one-line,
.movie-card-compact .tag-row {
  display: none;
}

.highlight-band {
  margin-top: 56px;
  padding: 56px 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(29, 78, 216, 0.16));
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.side-card,
.content-card,
.player-card {
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 96px;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  color: var(--slate-800);
  background: var(--white);
  border-radius: 16px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-item:hover {
  background: var(--sky-50);
  transform: translateX(4px);
}

.ranking-number {
  color: var(--sky-600);
  font-weight: 900;
  font-size: 20px;
}

.ranking-item img {
  width: 54px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--sky-100);
}

.ranking-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ranking-copy strong {
  overflow: hidden;
  color: var(--slate-900);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy em {
  overflow: hidden;
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-600), var(--blue-700) 54%, var(--indigo-700));
  padding: 78px 0 70px;
}

.page-hero h1 {
  max-width: 920px;
  margin: 8px 0 14px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

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

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

.breadcrumb.light {
  color: #dbeafe;
}

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

.filter-toolbar {
  justify-content: space-between;
  margin-bottom: 28px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-xl);
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.sticky-filter {
  position: sticky;
  top: 88px;
  z-index: 8;
}

.filter-toolbar .filter-input {
  min-width: min(380px, 100%);
  flex: 1;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pills button {
  color: var(--sky-700);
  background: var(--sky-50);
}

.filter-pills button:hover,
.filter-pills button.is-active {
  color: var(--white);
  background: var(--sky-600);
}

.empty-state {
  margin: 34px 0 0;
  padding: 26px;
  color: var(--slate-600);
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background-color: var(--sky-700);
  background-position: center;
  background-size: cover;
  padding: 48px 0 70px;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
  background: var(--sky-100);
}

.detail-hero-copy h1 {
  margin: 12px 0 18px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
}

.detail-hero-copy p {
  max-width: 850px;
  color: #dbeafe;
  font-size: 19px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
  margin-top: 42px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.content-card,
.player-card,
.side-card {
  padding: 22px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 16px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.2), rgba(2, 6, 23, 0.75));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-mark {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.45);
  font-size: 30px;
}

.player-cover span:last-child {
  font-size: 18px;
  font-weight: 850;
}

.detail-side {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 96px;
}

.meta-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.meta-list div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
}

.meta-list dt {
  color: var(--slate-500);
}

.meta-list dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 750;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 42px;
  padding: 48px 0 36px;
}

.footer-logo {
  color: #7dd3fc;
}

.site-footer p {
  max-width: 620px;
  margin: 14px 0 0;
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: var(--white);
}

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

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 20px 16px;
  color: #94a3b8;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

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

  .main-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-top: 1px solid var(--slate-200);
    padding: 14px 0 4px;
  }

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

  .header-search {
    order: 4;
    width: 100%;
    min-width: 100%;
  }

  .hero-slider {
    height: auto;
    min-height: 720px;
  }

  .hero-slide {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: 82px 0 92px;
  }

  .hero-poster {
    max-width: 260px;
    transform: none;
  }

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

  .category-grid,
  .category-grid-large,
  .movie-grid,
  .compact-grid,
  .ranking-list-wide,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-hero-grid {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
  }
}

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

  .site-logo {
    font-size: 20px;
  }

  .hero-copy h1,
  .detail-hero-copy h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .hero-desc,
  .detail-hero-copy p,
  .page-hero p {
    font-size: 16px;
  }

  .category-grid,
  .category-grid-large,
  .movie-grid,
  .compact-grid,
  .ranking-list-wide,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-compact {
    grid-template-columns: 96px minmax(0, 1fr);
  }

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

  .detail-poster {
    width: 190px;
  }

  .filter-toolbar {
    align-items: stretch;
  }

  .filter-pills {
    width: 100%;
  }

  .filter-pills button {
    flex: 1;
  }
}
