* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --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;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 1.25rem;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--blue-dark), var(--cyan));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.brand strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.brand em {
  display: block;
  margin-top: 4px;
  color: rgba(219, 234, 254, 0.92);
  font-size: 13px;
  font-style: normal;
}

.search-wrap {
  position: relative;
  width: min(420px, 100%);
}

.site-search,
.local-filter input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  outline: none;
  padding: 12px 16px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-search::placeholder,
.local-filter input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.site-search:focus,
.local-filter input:focus {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: min(520px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.search-panel.open {
  display: block;
}

.search-empty {
  padding: 18px;
  color: var(--slate-500);
}

.search-panel a {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px 12px;
  color: var(--slate-800);
  border-bottom: 1px solid var(--slate-100);
}

.search-panel a:hover {
  background: var(--slate-50);
}

.search-panel img {
  width: 54px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.search-panel strong {
  display: block;
  margin-bottom: 4px;
  color: var(--slate-900);
}

.search-panel span {
  display: block;
  color: var(--slate-500);
  font-size: 13px;
}

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 18px;
}

.nav-link {
  border-radius: 12px;
  padding: 9px 15px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.hero-slider {
  position: relative;
  overflow: hidden;
  color: white;
  background: linear-gradient(180deg, var(--slate-950), var(--slate-800));
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.5), transparent 26%), radial-gradient(circle at 80% 30%, rgba(6, 182, 212, 0.38), transparent 28%), linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.08) 75%, transparent 75%, transparent);
  background-size: auto, auto, 60px 60px;
  animation: drift 28s linear infinite;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-60px, -30px, 0);
  }
}

.hero-container {
  position: relative;
  min-height: 620px;
  padding: 72px 0 80px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(280px, 0.88fr) minmax(320px, 1fr);
  gap: 56px;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-poster {
  position: relative;
  height: 430px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.detail-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 13px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.hero-kicker span:first-child {
  color: white;
  background: var(--blue);
}

.hero-copy h1 {
  margin: 22px 0 16px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  color: var(--slate-300);
  font-size: 19px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 24px 0;
}

.hero-stats strong {
  color: #fef3c7;
}

.hero-actions,
.detail-actions,
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-primary,
.btn-ghost,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  padding: 13px 24px;
  color: white;
  background: var(--blue);
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover,
.section-action:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  padding: 12px 20px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost.blue {
  color: var(--blue);
  background: #dbeafe;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  width: 54px;
  background: var(--blue);
}

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

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

.section-title h2 {
  display: inline-flex;
  margin: 0 0 0 10px;
  color: var(--slate-900);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
}

.dark-band .section-title h2,
.dark-band .section-title p {
  color: white;
}

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

.section-icon {
  font-size: 28px;
}

.section-action {
  min-width: max-content;
  padding: 10px 16px;
  color: var(--blue);
  background: #dbeafe;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

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

.poster-shell.tall {
  aspect-ratio: 3 / 4.2;
}

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

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

.poster-shell:after {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent);
  pointer-events: none;
}

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.score {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
  padding: 15px;
}

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

.card-body h3 a:hover {
  color: var(--blue);
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--blue-dark);
  background: #dbeafe;
  font-size: 12px;
}

.tag-row.large span {
  padding: 7px 11px;
  font-size: 14px;
}

.meta-line {
  justify-content: space-between;
  color: var(--slate-500);
  font-size: 12px;
}

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

.dark-band {
  color: white;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.dark-band .movie-card {
  border-color: rgba(255, 255, 255, 0.12);
}

.feature-box,
.intro-panel,
.story-card,
.category-overview-block {
  border-radius: 28px;
  padding: 28px;
  background: white;
  box-shadow: var(--shadow);
}

.feature-box {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

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

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  background: white;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.category-card h3,
.intro-panel h2,
.story-card h2,
.category-overview-head h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
}

.category-card p,
.intro-panel p,
.story-card p,
.category-overview-head p {
  margin: 0;
  color: var(--slate-600);
}

.category-card span {
  display: inline-flex;
  margin-top: 14px;
  color: var(--blue);
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 32px;
  align-items: start;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 46px 56px 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 16px;
  padding: 10px 12px;
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ranking-list a:hover {
  background: #eff6ff;
}

.ranking-list img {
  width: 56px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: white;
  background: var(--blue);
  font-weight: 800;
}

.ranking-list em {
  color: var(--slate-500);
  font-style: normal;
}

.page-hero,
.detail-hero {
  color: white;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero .container {
  padding: 64px 0;
}

.compact-hero .container {
  padding: 42px 0;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 7px 13px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.page-hero h1,
.detail-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

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

.local-filter {
  max-width: 560px;
  margin-top: 24px;
}

.stacked {
  display: grid;
  gap: 32px;
}

.category-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

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

.breadcrumb a:hover {
  color: white;
}

.detail-hero .container {
  padding: 46px 0 58px;
}

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

.detail-poster {
  border-radius: 28px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.4);
}

.detail-copy .lead {
  max-width: 820px;
  color: var(--slate-300);
  font-size: 19px;
}

.detail-meta {
  margin: 22px 0 12px;
}

.watch-section {
  padding: 44px 0;
  background: #020617;
}

.watch-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: black;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(15, 23, 42, 0.32));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-pulse {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 18px rgba(37, 99, 235, 0.18);
  font-size: 30px;
}

.play-overlay strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.story-card p {
  font-size: 17px;
}

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

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

.prev-next a {
  border-radius: 18px;
  padding: 16px 18px;
  color: var(--blue-dark);
  background: #dbeafe;
  font-weight: 700;
}

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

.site-footer {
  color: white;
  background: var(--slate-950);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
}

.footer-grid p {
  margin: 6px 0 0;
  color: var(--slate-300);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--slate-300);
}

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

.is-filtered-out {
  display: none !important;
}

img.is-missing {
  opacity: 0;
}

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

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

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

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

  .header-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .brand strong {
    font-size: 20px;
  }

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

  .hero-poster {
    height: 340px;
  }

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

  .content-section {
    padding: 42px 0;
  }

  .section-title,
  .category-overview-head,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-list a {
    grid-template-columns: 38px 48px 1fr;
  }

  .ranking-list em {
    grid-column: 3;
  }

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

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

@media (max-width: 460px) {
  .grid-4,
  .grid-5,
  .grid-6,
  .category-grid,
  .category-grid.big {
    grid-template-columns: 1fr;
  }

  .nav-link {
    padding: 8px 12px;
  }
}
