:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --orange: #f97316;
  --red: #ef4444;
  --slate: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: #f8fafc;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22);
}

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.brand-text {
  font-size: 23px;
  letter-spacing: 0.02em;
}

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

.main-nav a,
.nav-group-button {
  color: #ffffff;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 650;
  opacity: 0.94;
}

.main-nav a:hover,
.nav-group-button:hover {
  opacity: 1;
  color: #dbeafe;
}

.nav-group {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 180px;
  padding: 8px;
  border-radius: 16px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.18s ease;
}

.nav-dropdown a {
  display: block;
  padding: 9px 12px;
  color: #1f2937;
  border-radius: 10px;
}

.nav-dropdown a:hover {
  color: var(--blue);
  background: #eff6ff;
}

.nav-group:hover .nav-dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.header-search {
  position: relative;
  width: min(270px, 24vw);
}

.header-search input,
.local-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: 430px;
  overflow: auto;
  border-radius: 16px;
  color: #1f2937;
  background: #ffffff;
  box-shadow: var(--shadow);
  display: none;
}

.search-results.is-open {
  display: block;
}

.search-results a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}

.search-results a:hover {
  background: #eff6ff;
}

.search-results strong {
  display: block;
  font-size: 15px;
}

.search-results small {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

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

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

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.9s ease;
}

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

.hero-content {
  width: min(720px, calc(100% - 40px));
  margin-left: max(22px, calc((100vw - 1280px) / 2 + 22px));
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  font-size: clamp(17px, 2vw, 22px);
  color: #e5e7eb;
}

.hero-tags,
.detail-meta,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-cloud span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.primary-button {
  padding: 14px 24px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 14px 34px rgba(239, 68, 68, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.45);
}

.primary-button.light {
  color: var(--blue);
  background: #ffffff;
  box-shadow: none;
}

.ghost-button {
  padding: 13px 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 22px;
}

.section-white {
  background: #ffffff;
}

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

.section-head.centered {
  justify-content: center;
  text-align: center;
}

.section-head h2 {
  margin: 10px 0 6px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

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

.text-link {
  color: var(--blue);
  white-space: nowrap;
}

.gradient-soft {
  max-width: none;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.gradient-soft > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.dark-panel {
  max-width: none;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.dark-panel > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.dark-panel h2,
.dark-panel .movie-card h3 {
  color: #ffffff;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.10);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at top left, #60a5fa, #0f172a 70%);
}

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

.poster-frame img.is-missing {
  display: none;
}

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.year-mark,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.year-mark {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  background: var(--red);
}

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

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

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

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.tag-line {
  margin-top: 10px;
  color: var(--blue);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-compact .movie-card-link {
  display: grid;
  grid-template-columns: 158px 1fr;
}

.movie-card-compact .poster-frame {
  aspect-ratio: auto;
  min-height: 150px;
}

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

.category-block,
.overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-icon {
  display: block;
  margin-bottom: 12px;
  font-size: 42px;
}

.category-block strong,
.overview-title strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 20px;
}

.category-block small,
.overview-card p,
.overview-card li,
.overview-count {
  color: var(--muted);
}

.overview-card ul,
.simple-list,
.sitemap-movie-list {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.overview-card li,
.sitemap-movie-list li,
.simple-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
}

.overview-card a:hover,
.simple-list a:hover,
.sitemap-movie-list a:hover {
  color: var(--blue);
}

.page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan), var(--teal));
}

.page-hero > div {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 72px 22px;
}

.page-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e0f2fe;
  font-size: 18px;
}

.compact-hero,
.category-hero,
.ranking-hero {
  min-height: 280px;
}

.local-filter {
  width: min(340px, 100%);
}

.local-filter input {
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid var(--line);
}

.cta-band {
  text-align: center;
  padding: 70px 22px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 56px);
}

.cta-band p {
  margin: 0 0 26px;
  color: #e0f2fe;
  font-size: 19px;
}

.detail-hero {
  min-height: 560px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 36px 22px 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 34px;
  color: #dbeafe;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(circle at top left, #60a5fa, #0f172a 70%);
  box-shadow: var(--shadow);
}

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

.detail-poster img.is-missing {
  display: none;
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 800px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 20px;
}

.tag-cloud {
  margin-top: 18px;
}

.player-section {
  padding-top: 42px;
  padding-bottom: 42px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.68));
}

.player-cover.is-hidden {
  display: none;
}

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: var(--blue);
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.detail-text-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

.detail-article,
.detail-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.detail-article h2,
.detail-side h3,
.sitemap-columns h2 {
  margin: 0 0 14px;
  color: #0f172a;
}

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

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.detail-side dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-weight: 700;
}

.sitemap-columns {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
}

.sitemap-movie-list {
  columns: 2;
  column-gap: 28px;
}

.sitemap-movie-list li {
  break-inside: avoid;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b 56%, #020617);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

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

.footer-brand p {
  max-width: 460px;
  margin: 0;
}

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

.footer-links strong {
  color: #ffffff;
  margin-bottom: 6px;
}

.footer-links a:hover {
  color: #38bdf8;
}

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

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

  .rank-grid,
  .rank-grid.wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .main-nav {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 0;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-dropdown {
    position: static;
    width: 100%;
    margin-top: 8px;
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .hero-content {
    margin-left: 22px;
  }

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

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

  .detail-layout,
  .detail-text-section,
  .sitemap-columns,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .sitemap-movie-list {
    columns: 1;
  }
}

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

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

  .hero-actions {
    flex-direction: column;
  }

  .section {
    padding: 52px 16px;
  }

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

  .movie-card-compact .movie-card-link {
    grid-template-columns: 128px 1fr;
  }

  .movie-card-compact .poster-frame {
    min-height: 136px;
  }

  .detail-hero-inner,
  .page-hero > div {
    padding-left: 16px;
    padding-right: 16px;
  }
}
