:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --white: #ffffff;
  --amber: #f59e0b;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 20px 40px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 30px 70px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: var(--slate-50);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

img,
video {
  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: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

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

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-900);
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--slate-500);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--slate-600);
  font-size: 15px;
  font-weight: 650;
}

.desktop-nav a {
  padding: 22px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--blue-600);
  border-color: var(--blue-600);
}

.mobile-nav-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
}

.mobile-nav-button span {
  width: 20px;
  height: 2px;
  background: var(--slate-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

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

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

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 20% 15%, rgba(59, 130, 246, 0.28), transparent 28%), linear-gradient(135deg, var(--slate-950), var(--slate-900) 45%, #111827);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}

.hero-shell {
  position: relative;
  padding: 78px 0 52px;
}

.hero-carousel {
  position: relative;
  min-height: 460px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr);
  align-items: center;
  gap: 56px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 12px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  color: var(--white);
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 18px 0 0;
  color: var(--slate-200);
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.15;
  font-weight: 800;
}

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

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

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--slate-600);
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

.section-more {
  min-height: 40px;
  color: var(--blue-600);
  background: var(--blue-100);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.hero-poster::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.62));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

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

.hero-dot.is-active {
  background: var(--blue-500);
}

.hero-search,
.inline-filter,
.search-controls {
  display: flex;
  gap: 10px;
  width: min(720px, 100%);
}

.hero-search {
  margin: 34px auto 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(16px);
}

.hero-search input,
.inline-filter input,
.search-controls input,
.search-controls select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--slate-900);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  outline: none;
}

.hero-search button,
.inline-filter button,
.search-controls button {
  min-width: 96px;
  padding: 0 18px;
  color: var(--white);
  background: var(--blue-600);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
}

.feature-strip {
  padding: 48px 0;
  background: var(--slate-50);
}

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

.feature-card,
.category-block,
.content-card,
.side-panel,
.player-card,
.rank-panel {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature-card {
  padding: 28px;
}

.feature-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--slate-900);
  font-size: 20px;
  font-weight: 900;
}

.feature-card p,
.section-heading p,
.category-block p,
.content-card p,
.site-footer p,
.detail-one-line {
  margin: 0;
  color: var(--slate-600);
}

.page-section {
  padding: 70px 0;
}

.soft-bg {
  background: var(--slate-50);
}

.section-heading,
.category-block-head,
.rank-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2,
.category-block h2,
.rank-panel h2,
.content-card h2,
.side-panel h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin-top: 8px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--blue-700));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.category-tile::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.88));
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 12px;
  color: #dbeafe;
  font-size: 14px;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow-md);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--slate-200), var(--slate-100));
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.movie-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.movie-year {
  right: 10px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), #ef4444);
}

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

.movie-card h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h2 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-meta {
  margin-bottom: 12px;
  color: var(--slate-500);
  font-size: 13px;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 88px;
  padding: 24px;
}

.rank-panel h2 {
  font-size: 24px;
}

.rank-panel-head a {
  color: var(--blue-600);
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-100);
}

.rank-list li span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--white);
  background: var(--slate-900);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 900;
}

.rank-list li a {
  overflow: hidden;
  color: var(--slate-800);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.subpage .page-hero {
  color: var(--white);
  background: radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.28), transparent 26%), linear-gradient(135deg, var(--slate-950), var(--slate-900));
}

.slim-hero .container {
  padding: 72px 0 60px;
}

.page-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.inline-filter,
.search-controls {
  margin-top: 28px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(140px, 170px) 110px;
  width: 100%;
}

.category-stack {
  display: grid;
  gap: 28px;
}

.category-block {
  padding: 26px;
}

.category-block h2 {
  font-size: 28px;
}

.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at 18% 15%, rgba(37, 99, 235, 0.28), transparent 30%), linear-gradient(135deg, var(--slate-950), var(--slate-900));
}

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

.breadcrumb {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-300);
  font-size: 14px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

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

.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  margin-top: 16px;
  color: var(--slate-300);
  font-size: 18px;
}

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

.detail-meta div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.detail-meta dt {
  color: var(--slate-300);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--white);
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 28px;
}

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

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

.player-card {
  overflow: hidden;
  padding: 0;
}

.video-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.video-box video {
  width: 100%;
  height: 100%;
  background: var(--slate-950);
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  padding-left: 5px;
  color: var(--white);
  background: var(--blue-600);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.34);
  font-size: 28px;
}

.player-cover strong {
  max-width: min(720px, 90%);
  text-align: center;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.2;
}

.content-card {
  padding: 28px;
}

.content-card h2,
.side-panel h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.content-card p {
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 88px;
}

.side-panel {
  padding: 18px;
}

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

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

.side-card-list .movie-cover {
  aspect-ratio: 3 / 4;
  border-radius: 14px 0 0 14px;
}

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

.side-card-list .movie-card h2 {
  font-size: 14px;
}

.side-card-list .movie-card p,
.side-card-list .tag-list,
.side-card-list .movie-meta {
  display: none;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: var(--white);
  font-size: 20px;
}

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

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

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

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

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

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

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

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

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

  .mobile-nav-button {
    display: flex;
  }

  .hero {
    min-height: auto;
  }

  .hero-shell {
    padding: 52px 0 40px;
  }

  .hero-carousel {
    min-height: auto;
  }

  .hero-slide,
  .hero-slide.is-active {
    position: relative;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-slide:not(.is-active) {
    display: none;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 320px;
  }

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

  .detail-poster {
    width: min(280px, 80%);
  }

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

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

  .brand-title {
    font-size: 19px;
  }

  .brand-subtitle {
    display: none;
  }

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

  .hero-search,
  .inline-filter {
    flex-direction: column;
  }

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

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

  .movie-card h2 {
    font-size: 15px;
  }

  .movie-card p {
    min-height: 40px;
    font-size: 13px;
  }

  .page-section {
    padding: 48px 0;
  }

  .section-heading,
  .category-block-head,
  .rank-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .side-card-list .movie-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}
