:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #ea580c;
  --accent: #eab308;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --shadow-soft: 0 2px 15px rgba(15, 23, 42, 0.06);
  --shadow-medium: 0 8px 30px rgba(15, 23, 42, 0.12);
  --shadow-hard: 0 18px 55px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  font-size: 14px;
}

.logo-text {
  font-size: 26px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
}

.nav-link {
  color: #334155;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.mobile-nav-toggle {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
}

.mobile-nav-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #334155;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 10px 16px 16px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 650;
  color: #334155;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary);
  background: #eff6ff;
}

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

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42);
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.36), transparent 35%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.1));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--secondary);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-action {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.32);
}

.primary-action:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--primary-dark);
}

.ghost-action {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-action:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-year {
  color: #cbd5e1;
  font-weight: 700;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.46);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.home-search-panel {
  position: relative;
  z-index: 5;
  margin-top: -44px;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-hard);
}

.home-search-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.home-search-panel p {
  margin: 0;
  color: var(--muted);
}

.hero-search,
.category-search-bar,
.search-console {
  display: flex;
  gap: 12px;
}

.hero-search input,
.category-search-bar input,
.search-console input,
.search-console select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search input:focus,
.category-search-bar input:focus,
.search-console input:focus,
.search-console select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hero-search button {
  min-width: 98px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
}

.page-section {
  padding: 70px 0 0;
}

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

.section-heading h2 {
  display: inline;
  margin: 0 0 0 10px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 850;
  letter-spacing: -0.045em;
  color: var(--dark);
}

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

.section-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-weight: 900;
}

.section-more {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 800;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ffedd5);
}

.movie-card.large .poster-frame {
  height: 300px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.08), transparent);
}

.type-badge,
.region-badge {
  position: absolute;
  top: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  right: 12px;
  background: var(--secondary);
}

.region-badge {
  left: 12px;
  background: var(--primary);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.movie-card-body strong {
  min-height: 48px;
  color: var(--dark);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
}

.movie-meta,
.movie-one-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movie-one-line {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 27px;
}

.movie-tags span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.wide-band {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
  padding-bottom: 70px;
}

.horizontal-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scrollbar-width: none;
}

.horizontal-row::-webkit-scrollbar {
  display: none;
}

.horizontal-row .movie-card {
  flex: 0 0 310px;
}

.category-showcase-grid,
.category-tile-grid,
.two-column-section,
.detail-text-section {
  display: grid;
  gap: 24px;
}

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

.category-showcase-card,
.category-tile,
.detail-article,
.detail-side {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-showcase-card {
  padding: 24px;
}

.category-showcase-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-showcase-head h3,
.detail-article h2,
.detail-side h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 850;
  color: var(--dark);
}

.category-showcase-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-showcase-head a {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 800;
}

.mini-card-grid,
.compact-grid {
  display: grid;
  gap: 12px;
}

.simple-movie-link {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.simple-movie-link:hover {
  background: #eff6ff;
  transform: translateX(3px);
}

.simple-cover {
  height: 82px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #ffedd5);
}

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

.simple-movie-link strong,
.rank-info strong {
  display: block;
  color: var(--dark);
  line-height: 1.45;
  font-weight: 800;
}

.simple-movie-link em,
.rank-info em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.two-column-section {
  grid-template-columns: 1fr 0.82fr;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 74px 1fr 34px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-medium);
}

.rank-number {
  color: var(--secondary);
  font-size: 22px;
  font-weight: 900;
}

.rank-thumb {
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #ffedd5);
}

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

.rank-play {
  color: var(--primary);
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  color: #ffffff;
  background: var(--dark);
  overflow: hidden;
}

.page-hero {
  padding: 86px 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(37, 99, 235, 0.42), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.32), transparent 24%),
    linear-gradient(135deg, #0f172a, #1e293b);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

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

.category-search-bar {
  max-width: 720px;
  margin-top: 26px;
}

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

.category-tile {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ffedd5);
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-copy {
  display: grid;
  gap: 8px;
  padding: 20px 20px 8px;
}

.category-copy strong {
  color: var(--dark);
  font-size: 22px;
  font-weight: 850;
}

.category-copy em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

.category-arrow {
  display: block;
  padding: 0 20px 20px;
  color: var(--primary);
  font-weight: 850;
}

.search-console {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  margin-top: 26px;
}

.search-status {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 700;
}

.detail-hero {
  min-height: 600px;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.45)),
    var(--detail-bg) center / cover;
  filter: saturate(1.1);
}

.detail-hero-content {
  position: relative;
  padding: 50px 0 70px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #dbeafe, #ffedd5);
  box-shadow: var(--shadow-hard);
}

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

.detail-copy h1 {
  max-width: 820px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.detail-meta-grid span {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.detail-meta-grid b {
  color: #cbd5e1;
  font-size: 12px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3), rgba(0, 0, 0, 0.45));
  font-size: 18px;
  font-weight: 850;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.36);
}

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
}

.detail-text-section {
  grid-template-columns: 1fr 360px;
  align-items: start;
}

.detail-article,
.detail-side {
  padding: 28px;
}

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

.detail-side dl,
.detail-side dd {
  margin: 0;
}

.detail-side dl {
  display: grid;
  gap: 12px;
}

.detail-side div {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.detail-side dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-side dd {
  margin-top: 5px;
  color: var(--dark);
  line-height: 1.6;
  font-weight: 700;
}

.site-footer {
  margin-top: 90px;
  padding: 46px 0 26px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-logo .logo-text {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #cbd5e1;
  line-height: 1.75;
}

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

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

.is-hidden-by-filter {
  display: none !important;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

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

  .mobile-nav-toggle {
    display: flex;
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-panel,
  .two-column-section,
  .detail-layout,
  .detail-text-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-meta-grid,
  .search-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 580px) {
  .section-container {
    width: min(100% - 22px, 1180px);
  }

  .logo-text {
    font-size: 22px;
  }

  .hero-carousel {
    height: 510px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

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

  .home-search-panel {
    margin-top: -26px;
    padding: 20px;
  }

  .hero-search,
  .category-search-bar {
    flex-direction: column;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-block;
    margin-top: 14px;
  }

  .movie-grid,
  .category-grid,
  .featured-grid,
  .category-showcase-grid,
  .category-tile-grid,
  .search-console {
    grid-template-columns: 1fr;
  }

  .poster-frame,
  .movie-card.large .poster-frame {
    height: 280px;
  }

  .rank-item {
    grid-template-columns: 42px 60px 1fr;
  }

  .rank-play {
    display: none;
  }

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