:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --text: #172033;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 36px rgba(15, 23, 42, 0.1);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--slate-200);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

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

.nav-link {
  color: var(--slate-300);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input {
  width: 220px;
  height: 40px;
  border: 0;
  outline: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.top-search input::placeholder {
  color: var(--slate-400);
}

.top-search button,
.hero-search button,
.search-panel button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--slate-700);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.hero-search button:hover,
.search-panel button:hover {
  background: var(--slate-600);
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 620px;
  background: var(--slate-900);
  color: #ffffff;
  overflow: hidden;
}

.hero-stage {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(51, 65, 85, 0.2), transparent 35%), linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.74) 48%, rgba(15, 23, 42, 0.16) 100%);
}

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

.hero-copy {
  width: min(680px, 100%);
  padding-top: 34px;
}

.hero-kicker,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy .hero-headline {
  margin: 12px 0 0;
  color: #ffffff;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy .hero-headline {
  display: block;
}

.hero-copy h2 {
  margin: 12px 0 18px;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1.1;
  font-weight: 850;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 20px;
  color: var(--slate-200);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: #ffffff;
  color: var(--slate-900);
  box-shadow: 0 18px 36px rgba(255, 255, 255, 0.15);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.btn.full {
  width: 100%;
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-tools {
  position: relative;
  z-index: 3;
  padding-top: 500px;
  padding-bottom: 34px;
  display: grid;
  grid-template-columns: minmax(260px, 520px) 1fr auto;
  gap: 18px;
  align-items: center;
}

.hero-search,
.search-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-panel input,
.search-panel select,
.filter-panel input {
  min-width: 0;
  width: 100%;
  height: 44px;
  border: 0;
  outline: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--slate-800);
}

.hero-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-shortcuts a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 700;
}

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

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

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

.page-main {
  padding: 42px 0 72px;
}

.page-hero {
  border-radius: var(--radius);
  padding: 56px;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  color: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-hero.slim {
  min-height: 240px;
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--slate-200);
  font-size: 18px;
}

.section-block {
  padding: 64px 0;
}

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

.section-heading h2 {
  margin: 8px 0 4px;
  color: var(--slate-800);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--slate-800);
  background: var(--slate-200);
  font-weight: 800;
  white-space: nowrap;
}

.section-dark {
  padding: 64px 0;
  background: var(--slate-800);
}

.section-dark .section-heading h2,
.section-dark .section-more {
  color: #ffffff;
}

.section-dark .section-heading p {
  color: var(--slate-300);
}

.section-dark .section-more {
  background: rgba(255, 255, 255, 0.12);
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card a {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--slate-200);
  overflow: hidden;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.card-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  font-weight: 900;
}

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

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

.movie-card-body p {
  min-height: 50px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.meta-line {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 800;
}

.movie-card.compact {
  border-radius: 16px;
}

.movie-card.compact a {
  display: grid;
  grid-template-columns: 88px 1fr;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: auto;
  height: 132px;
}

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

.movie-card.compact .movie-card-body h3 {
  min-height: auto;
  font-size: 16px;
}

.movie-card.compact .movie-card-body p {
  min-height: auto;
}

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

.category-tile {
  position: relative;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.category-tile strong,
.category-tile span {
  position: relative;
}

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

.category-tile span {
  color: var(--slate-300);
  font-size: 14px;
}

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

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 34px;
  align-items: start;
}

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

.rank-list.expanded {
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-index {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: var(--slate-800);
  color: #ffffff;
  font-weight: 900;
}

.rank-link {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.rank-link img {
  width: 76px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--slate-200);
}

.rank-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-text strong {
  overflow: hidden;
  color: var(--slate-900);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

.rank-text small {
  color: var(--muted);
  font-size: 14px;
}

.filter-panel,
.search-panel {
  margin-bottom: 24px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-panel {
  padding: 20px;
}

.filter-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--slate-800);
  font-weight: 850;
}

.filter-panel input,
.search-panel input,
.search-panel select {
  background: var(--slate-100);
  box-shadow: inset 0 0 0 1px var(--line);
}

.search-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  padding: 14px;
  background: #ffffff;
}

.simple-links h2 {
  margin: 0 0 16px;
}

.simple-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.simple-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 750;
}

.breadcrumb-wrap {
  margin-bottom: 20px;
}

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

.breadcrumb a {
  color: var(--slate-700);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-primary {
  min-width: 0;
}

.player-card,
.content-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-core {
  width: 100%;
  height: 100%;
  background: #000000;
  display: block;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #000000;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

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

.play-orb {
  position: absolute;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.36);
}

.play-orb span {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid var(--slate-900);
}

.detail-article {
  margin-top: 24px;
  padding: 30px;
}

.detail-article h1 {
  margin: 10px 0 14px;
  color: var(--slate-900);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
}

.detail-article .lead {
  color: var(--slate-700);
  font-size: 20px;
  font-weight: 700;
}

.detail-article h2,
.info-card h2 {
  margin: 26px 0 10px;
  color: var(--slate-800);
  font-size: 24px;
}

.detail-article p {
  color: var(--slate-600);
}

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

.poster-card {
  padding: 14px;
}

.poster-card img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 14px;
  background: var(--slate-200);
}

.poster-card .btn.primary {
  background: var(--slate-900);
  color: #ffffff;
}

.info-card {
  padding: 22px;
}

.info-card h2 {
  margin-top: 0;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.info-card dl div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: start;
}

.info-card dt {
  color: var(--slate-500);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--slate-800);
}

.all-tags span {
  margin-bottom: 2px;
}

.site-footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 44px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
  font-weight: 850;
}

.footer-grid p {
  max-width: 760px;
  margin: 10px 0 0;
}

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

.footer-links a {
  color: #ffffff;
  font-weight: 750;
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--slate-500);
  font-size: 14px;
}

[data-card].is-hidden {
  display: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 42px;
  border-radius: 20px;
  background: #ffffff;
  color: var(--slate-600);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1060px) {
  .top-search {
    display: none;
  }

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

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

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

  .detail-side {
    position: static;
    grid-template-columns: minmax(220px, 320px) 1fr;
  }

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

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

  .nav-shell {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
  }

  .brand {
    font-size: 20px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 5;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 0;
  }

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

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
  }

  .hero {
    min-height: 690px;
  }

  .hero-content {
    align-items: start;
    padding-top: 100px;
  }

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

  .hero-tools {
    padding-top: 470px;
    grid-template-columns: 1fr;
  }

  .hero-search {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-dots {
    justify-content: center;
  }

  .page-main {
    padding-top: 24px;
  }

  .page-hero {
    padding: 32px 22px;
  }

  .section-block,
  .section-dark {
    padding: 42px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

  .movie-card-body h3 {
    min-height: auto;
    font-size: 16px;
  }

  .movie-card-body p {
    display: none;
  }

  .tag-row span:nth-child(n+3) {
    display: none;
  }

  .rank-item {
    grid-template-columns: 44px 1fr;
    padding: 10px;
  }

  .rank-index {
    width: 40px;
    height: 40px;
  }

  .rank-link {
    grid-template-columns: 58px 1fr;
  }

  .rank-link img {
    width: 58px;
    height: 76px;
  }

  .rank-text small {
    display: none;
  }

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

  .detail-article {
    padding: 22px;
  }

  .play-orb {
    width: 70px;
    height: 70px;
  }

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

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

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.compact a {
    grid-template-columns: 84px 1fr;
  }

  .category-tile {
    min-height: 136px;
  }
}
