:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --dark: #071326;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.28);
}

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

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

.main-nav a {
  color: #334155;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--blue);
}

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

.nav-search input,
.home-search input,
.filter-bar input,
.filter-bar select {
  height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 180px;
}

.nav-search input:focus,
.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nav-search button,
.home-search button,
.btn,
.section-link {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 750;
}

.nav-search button {
  height: 42px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--blue-soft);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--blue);
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 112px max(32px, calc((100vw - 1180px) / 2)) 72px;
  background-size: cover;
  background-position: center;
  transition: opacity 0.75s ease, transform 0.75s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
  transform: scale(1);
}

.hero-content {
  width: min(720px, 100%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 7px 12px;
}

.tag-row span {
  color: #1d4ed8;
  background: #dbeafe;
  padding: 5px 10px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.btn.subtle {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.35);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  aspect-ratio: 2 / 3;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 28px;
  background: #fff;
}

.quick-search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: -42px auto 0;
  position: relative;
  z-index: 8;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.home-search {
  display: flex;
  gap: 12px;
}

.home-search input {
  width: 100%;
  height: 52px;
  font-size: 16px;
}

.home-search button {
  min-width: 128px;
  color: #fff;
  background: var(--blue);
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-cats a {
  padding: 8px 14px;
  border-radius: 999px;
  color: #1e40af;
  background: var(--blue-soft);
  font-weight: 700;
}

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

.content-section.soft-bg {
  width: 100%;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  color: var(--blue);
  background: var(--blue-soft);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
}

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

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(37, 99, 235, 0.92);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.3;
}

.card-title:hover {
  color: var(--blue);
}

.card-meta {
  margin: 6px 0 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
}

.card-body p {
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.compact .card-title {
  font-size: 16px;
}

.movie-card.compact .card-body p {
  -webkit-line-clamp: 2;
}

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

.category-tile,
.category-overview-card {
  display: block;
  min-height: 170px;
  padding: 24px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.16);
}

.category-tile span,
.category-title-link {
  display: block;
  color: #1e40af;
  font-size: 22px;
  font-weight: 850;
}

.category-tile p,
.category-overview-card p {
  color: #64748b;
}

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.category-samples a {
  color: #334155;
  font-weight: 700;
}

.category-samples a:hover {
  color: var(--blue);
}

.page-main,
.detail-main {
  padding-top: 72px;
}

.page-hero {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 72px 20px;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.42), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a);
}

.page-hero.small {
  min-height: 300px;
}

.page-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-bar input {
  flex: 1 1 320px;
}

.filter-bar select {
  min-width: 150px;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: #64748b;
  border-radius: 20px;
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 82px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-index {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  border-radius: 16px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
}

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

.rank-info a {
  font-size: 19px;
  font-weight: 850;
}

.rank-info a:hover {
  color: var(--blue);
}

.rank-info p {
  margin: 6px 0;
  color: #475569;
}

.rank-meta {
  color: #64748b;
  font-size: 13px;
}

.rank-score {
  color: #1d4ed8;
  font-size: 22px;
  font-weight: 900;
  text-align: right;
}

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

.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.detail-cover {
  width: 100%;
  border-radius: 28px;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.45);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bfdbfe;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-intro h1 {
  color: #fff;
}

.detail-one-line {
  max-width: 800px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 750;
}

.tag-row.wide span {
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: -64px auto 0;
  position: relative;
  z-index: 5;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 16px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.68));
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.35);
  font-size: 30px;
}

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

.detail-content {
  padding-top: 48px;
}

.detail-article {
  display: grid;
  gap: 16px;
  padding: 30px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.detail-article p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-brand p {
  max-width: 480px;
  color: #94a3b8;
}

.footer-logo .brand-text {
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links strong {
  color: #fff;
}

.footer-links a:hover {
  color: #93c5fd;
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

@media (max-width: 860px) {
  .header-inner {
    height: 64px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav,
  .nav-search {
    position: absolute;
    left: 16px;
    right: 16px;
    display: none;
    background: #fff;
  }

  .site-header.menu-open .main-nav,
  .site-header.menu-open .nav-search {
    display: flex;
  }

  .main-nav {
    top: 72px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
  }

  .main-nav a {
    padding: 12px;
  }

  .nav-search {
    top: 248px;
    padding: 12px;
    margin-left: 0;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
  }

  .nav-search input {
    width: 100%;
  }

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

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

  .hero-poster {
    width: min(220px, 62vw);
  }

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

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

  .detail-cover {
    width: min(260px, 78vw);
  }

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

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

  .hero-content h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: 36px;
  }

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

  .home-search,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .home-search button {
    min-height: 48px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-score {
    display: none;
  }

  .detail-hero-inner {
    min-height: auto;
    padding: 54px 0 96px;
  }

  .player-section {
    margin-top: -46px;
  }
}
