* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --cyan: #0891b2;
  --teal: #0d9488;
  --slate-950: #020617;
  --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 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #e0f2fe 45%, #f8fafc 100%);
  color: var(--slate-800);
}

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

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

main {
  min-height: 60vh;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  color: var(--white);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text {
  font-size: 24px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.1) rotate(8deg);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  font-weight: 700;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.nav-link::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  content: "";
  background: rgba(255, 255, 255, 0.92);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.mobile-link {
  padding: 10px 0;
  font-weight: 700;
}

.mobile-link.active {
  color: #dffbff;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 44px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0 92px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -2;
  overflow: hidden;
}

.hero-bg img {
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: blur(4px) saturate(1.05);
  transform: scale(1.04);
}

.hero-bg::after,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 18% 24%, rgba(34, 211, 238, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(8, 145, 178, 0.42));
}

.eyebrow {
  margin: 0 0 14px;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  margin: 22px 0 12px;
  color: #ecfeff;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.12;
}

.hero-summary,
.detail-line,
.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ecfeff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

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

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

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

.btn.primary {
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  color: var(--white);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn.text {
  color: #cffafe;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.5);
  transform: rotate(2deg);
  transition: transform 0.35s ease;
}

.hero-poster:hover {
  transform: rotate(0) translateY(-8px);
}

.hero-poster img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

.hero-poster span,
.detail-poster span,
.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.24);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: max(16px, calc((100vw - 1180px) / 2));
}

.hero-control.next {
  right: max(16px, calc((100vw - 1180px) / 2));
}

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

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

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

.intro-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 44px;
  padding: 30px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.intro-block h2,
.section-heading h2,
.text-card h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.intro-block p,
.section-heading p,
.text-card p,
.overview-card p,
.category-card p {
  color: var(--slate-600);
  line-height: 1.8;
}

section.container {
  padding: 54px 0 0;
}

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

.section-more {
  color: var(--cyan);
  font-weight: 900;
}

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

.category-card,
.overview-card a {
  position: relative;
  display: block;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--slate-900);
  box-shadow: var(--soft-shadow);
}

.category-card img,
.overview-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img,
.overview-card:hover img {
  opacity: 0.48;
  transform: scale(1.06);
}

.category-card span,
.category-card p,
.overview-card div {
  position: relative;
  z-index: 2;
}

.category-card {
  padding: 22px;
  color: var(--white);
}

.category-card span {
  display: inline-block;
  margin-bottom: 12px;
  color: #67e8f9;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  color: #dbeafe;
  font-weight: 600;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card.is-filtered-out {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

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

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

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

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

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

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--slate-500);
  line-height: 1.6;
}

.movie-line {
  display: -webkit-box;
  min-height: 50px;
  margin-top: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-tags {
  margin-top: 12px;
}

.mini-tags span {
  background: #e0f2fe;
  color: #0369a1;
}

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

.compact h3 {
  font-size: 16px;
}

.compact .movie-line {
  display: none;
}

.search-panel {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.search-box span {
  color: var(--cyan);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #f8fafc;
  padding: 0 18px;
  color: var(--slate-800);
  font-size: 16px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.14);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--slate-700);
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  color: var(--white);
}

.search-state {
  margin: 10px 0 0;
  color: var(--slate-500);
  font-weight: 700;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--slate-950);
  color: var(--white);
}

.compact-hero {
  padding: 76px 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.22), transparent 36%),
    linear-gradient(120deg, #0f172a, #164e63 55%, #0f766e);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bae6fd;
  font-weight: 800;
}

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

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

.overview-card a {
  min-height: 260px;
  padding: 30px;
  color: var(--white);
}

.overview-card div {
  max-width: 480px;
}

.overview-card h2 {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 30px;
}

.overview-card p {
  color: #e0f2fe;
}

.overview-card span {
  display: inline-flex;
  margin-top: 14px;
  color: var(--white);
  font-weight: 900;
}

.detail-hero {
  padding: 72px 0 54px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.detail-backdrop img {
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: blur(5px) saturate(1.08);
  transform: scale(1.04);
}

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

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

.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.48);
}

.detail-poster img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #e0f2fe;
  font-weight: 800;
}

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

.content-column,
.side-column {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.7));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.36);
  font-size: 32px;
}

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

.text-card {
  padding: 26px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.text-card p {
  margin-bottom: 0;
  font-size: 17px;
}

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

.info-list div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-200);
}

.info-list dt {
  color: var(--cyan);
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  color: var(--slate-700);
}

.side-column {
  position: sticky;
  top: 92px;
}

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

.detail-pager {
  display: flex;
  gap: 12px;
}

.detail-pager a {
  display: inline-flex;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--slate-900);
  color: var(--white);
  font-weight: 900;
}

.site-footer {
  margin-top: 64px;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
  color: var(--white);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 28px;
}

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

.footer-brand {
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 22px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a:hover {
  color: #67e8f9;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.14);
  text-align: center;
}

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

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

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

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

  .side-column {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 54px;
  }

  .hero-poster {
    max-width: 260px;
    transform: rotate(0);
  }

  .hero-control {
    display: none;
  }

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

  .category-grid,
  .overview-grid,
  .movie-grid,
  .rank-grid,
  .rank-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel {
    min-height: 760px;
  }

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

  .hero-summary,
  .detail-line,
  .page-hero p {
    font-size: 16px;
  }

  .category-grid,
  .overview-grid,
  .movie-grid,
  .rank-grid,
  .rank-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-box,
  .info-list div {
    grid-template-columns: 1fr;
  }

  .text-card {
    padding: 20px;
  }
}
