:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.38);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--cyan-400), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.desktop-nav a,
.mobile-panel a {
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.18s ease, transform 0.18s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--cyan-400);
}

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

.header-search input,
.mobile-search input,
.large-search input {
  border: 0;
  outline: 0;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.92);
  border-radius: 999px;
  padding: 10px 16px;
}

.header-search input {
  width: 240px;
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.24);
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 22px;
}

.mobile-panel {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #1e293b;
  padding: 16px 20px 22px;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mobile-panel nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.7);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
}

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

.hero-slider,
.hero-slide,
.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.55fr);
  align-items: center;
  gap: 42px;
  padding: 90px max(24px, calc((100vw - 1280px) / 2 + 24px)) 100px;
}

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

.hero-backdrop {
  z-index: -2;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-section::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 190px;
  background: linear-gradient(0deg, rgba(248, 250, 252, 1), rgba(248, 250, 252, 0));
  pointer-events: none;
}

.hero-copy,
.detail-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: var(--cyan-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--cyan-500);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  line-height: 1.08;
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  color: #cffafe;
  background: rgba(8, 145, 178, 0.22);
  border: 1px solid rgba(34, 211, 238, 0.18);
}

.card-tags span {
  color: #0e7490;
  background: #ecfeff;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.78);
}

.hero-meta span,
.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
}

.ghost-button {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  transform: perspective(900px) rotateY(-7deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

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

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-heading a {
  color: var(--cyan-500);
  font-weight: 800;
}

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

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 7px;
  color: #ffffff;
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #6366f1, #9333ea);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.category-tile:nth-child(4n) {
  background: linear-gradient(135deg, #10b981, #0f766e);
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.22);
}

.category-tile span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.category-tile strong {
  font-size: 21px;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.78);
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.88);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.duration-badge,
.category-count {
  position: absolute;
  right: 12px;
  top: 12px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.76);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.movie-meta {
  margin: 0;
  color: var(--slate-600);
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 24px;
  align-items: start;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 80px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 94px;
  padding: 12px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.rank-index {
  color: var(--cyan-500);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 80px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text small {
  color: var(--slate-600);
}

.rank-score {
  color: #ca8a04;
  font-weight: 900;
}

.search-panel,
.content-card {
  border-radius: var(--radius-xl);
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.search-panel h2,
.content-card h2 {
  margin-top: 0;
}

.large-search {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.large-search input {
  flex: 1;
  color: var(--slate-900);
  background: var(--slate-100);
}

.large-search button {
  padding: 0 22px;
}

.page-hero {
  position: relative;
  margin: 0;
  padding: 82px max(24px, calc((100vw - 1280px) / 2 + 24px));
  color: #ffffff;
  background: radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.22), transparent 32%), linear-gradient(135deg, #020617, #1e293b 50%, #0f172a);
}

.page-hero.slim {
  padding-top: 76px;
  padding-bottom: 76px;
}

.category-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.category-overview-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-overview-card a {
  display: block;
}

.category-overview-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #0f172a;
}

.category-overview-card h2,
.category-overview-card p {
  margin-left: 16px;
  margin-right: 16px;
}

.category-overview-card h2 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-overview-card p {
  margin-bottom: 18px;
  color: var(--slate-600);
  font-size: 14px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--slate-700);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.filter-button.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
}

.detail-hero {
  position: relative;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.76);
}

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

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

.detail-poster {
  width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-xl);
  background: #0f172a;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.player-wrap {
  padding-top: 34px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #020617;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  color: #ffffff;
  text-align: center;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.82));
  border: 0;
  cursor: pointer;
  z-index: 3;
}

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

.video-play-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  border-radius: 999px;
  box-shadow: 0 0 36px rgba(34, 211, 238, 0.42);
}

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

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

.search-summary {
  margin: 18px 0 22px;
  color: var(--slate-600);
  font-weight: 700;
}

.site-footer {
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
}

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

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

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

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .header-inner {
    height: 64px;
  }

  .hero-section {
    min-height: 620px;
  }

  .hero-slide {
    padding-top: 88px;
    padding-bottom: 110px;
  }

  .section-heading,
  .category-hero,
  .split-layout {
    display: block;
  }

  .section-heading a,
  .category-hero .ghost-button {
    margin-top: 14px;
  }

  .movie-grid,
  .rank-list.extended,
  .detail-content,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    width: min(260px, 70vw);
  }

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 17px;
  }

  .mobile-panel nav,
  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .rank-list.extended,
  .detail-content,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section-wrap {
    padding: 40px 16px;
  }

  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .rank-row {
    grid-template-columns: 38px 66px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }

  .large-search,
  .mobile-search {
    flex-direction: column;
  }

  .large-search button,
  .mobile-search button {
    min-height: 44px;
  }
}
