:root {
  --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;
  --rose-600: #e11d48;
  --amber-600: #d97706;
  --blue-600: #2563eb;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  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.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: var(--slate-600);
  font-size: 12px;
}

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

.desktop-nav a {
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 600;
  padding: 22px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--slate-900);
  border-color: var(--slate-900);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

.header-search input {
  width: 170px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 9px 13px;
  background: var(--white);
  color: var(--slate-900);
  outline: none;
}

.header-search input:focus {
  border-color: var(--slate-500);
}

.header-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.primary-btn {
  color: var(--white);
  background: var(--slate-900);
}

.header-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.ghost-btn.dark {
  color: var(--slate-900);
  background: var(--white);
  border: 1px solid var(--slate-200);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: var(--slate-100);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  color: var(--slate-900);
}

.mobile-nav {
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}

.mobile-nav.open {
  display: grid;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--slate-700);
  font-weight: 600;
}

.mobile-nav a:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0 32px 104px;
}

.hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  color: var(--white);
}

.hero-kicker {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero-line {
  margin: 18px 0 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-desc {
  max-width: 720px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

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

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

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

.small-actions {
  margin-top: 20px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 34px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: var(--white);
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 68px;
  width: min(560px, calc(100% - 42px));
  transform: translateX(-50%);
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow-md);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--slate-900);
}

.hero-search button {
  border: 0;
  padding: 0 20px;
  color: var(--white);
  background: var(--slate-900);
  font-weight: 800;
}

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
}

.section-soft,
.page-hero {
  background: linear-gradient(135deg, var(--slate-100), var(--slate-200));
}

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

.section-heading > div {
  min-width: 0;
}

.section-heading h2 {
  margin: 0;
  display: inline-block;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: 10px;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
}

.section-more {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--white);
  border: 1px solid var(--slate-200);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

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

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

.movie-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.card-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-200);
}

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

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

.play-float {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 700;
}

.card-meta span:last-child {
  color: var(--rose-600);
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  padding: 4px 8px;
  color: var(--slate-600);
  background: var(--slate-100);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: start;
}

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

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

.rank-item {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.rank-item a {
  display: grid;
  grid-template-columns: auto 136px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: var(--slate-900);
  font-weight: 900;
}

.rank-item img {
  width: 136px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.rank-item p {
  margin: 0 0 6px;
  color: var(--slate-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-item span:not(.rank-num) {
  color: var(--slate-500);
  font-size: 13px;
}

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

.category-card,
.info-card,
.prose-card {
  display: block;
  border-radius: 18px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

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

.page-hero {
  padding: 76px 0;
}

.compact-hero h1 {
  max-width: 900px;
  font-size: clamp(34px, 5vw, 58px);
}

.compact-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--slate-600);
  font-size: 18px;
}

.rank-hero {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  color: var(--white);
}

.rank-hero p,
.rank-hero .hero-kicker {
  color: rgba(255, 255, 255, 0.84);
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 120px;
  overflow: hidden;
}

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

.category-overview-body {
  padding: 22px;
}

.category-overview-body h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-overview-body p {
  margin: 0 0 12px;
  color: var(--slate-600);
}

.category-overview-body span {
  color: var(--slate-900);
  font-weight: 800;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.filter-title {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 800;
}

.filter-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.filter-controls label {
  display: grid;
  gap: 6px;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 700;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--slate-900);
  background: var(--slate-50);
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--slate-500);
  background: var(--white);
}

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

.detail-hero {
  padding: 56px 0;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  color: var(--white);
}

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

.detail-cover {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--slate-800);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-line {
  margin: 16px 0 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 13px;
}

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

.player-card {
  border-radius: 24px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  text-align: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.player-cover.is-hidden {
  display: none;
}

.big-play {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  box-shadow: var(--shadow-lg);
}

.player-cover strong {
  max-width: min(80%, 720px);
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.2;
}

.detail-text {
  padding-top: 0;
}

.prose-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.prose-card h2:not(:first-child) {
  margin-top: 26px;
}

.prose-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
  text-align: justify;
}

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

.info-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.info-card p {
  margin: 0;
  color: var(--slate-600);
}

.site-footer {
  color: var(--slate-300);
  background: var(--slate-900);
}

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

.footer-logo .brand-icon {
  background: linear-gradient(135deg, var(--slate-600), var(--slate-800));
}

.footer-logo .brand-text strong {
  color: var(--white);
}

.footer-logo .brand-text small {
  color: var(--slate-400);
}

.footer-brand p {
  max-width: 420px;
  margin: 18px 0 0;
  color: var(--slate-400);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: var(--slate-400);
}

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

.footer-bottom {
  border-top: 1px solid var(--slate-800);
  padding: 18px 16px;
  text-align: center;
  color: var(--slate-500);
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: grid;
    place-items: center;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

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

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 66px;
    padding: 10px 0;
    flex-wrap: wrap;
  }

  .brand-text small,
  .header-search {
    display: none;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding: 0 18px 132px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .hero-search {
    bottom: 72px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .section {
    padding: 52px 0;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

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

  .rank-item a {
    grid-template-columns: auto 92px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-item img {
    width: 92px;
    height: 60px;
  }

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

  .page-hero {
    padding: 54px 0;
  }

  .detail-hero {
    padding: 38px 0;
  }
}
