:root {
  --page-bg: #f9fafb;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --line: #e5e7eb;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --pink: #db2777;
  --blue: #2563eb;
  --purple: #9333ea;
  --yellow: #eab308;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-icon {
  font-size: 28px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1;
}

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #111827;
  border-radius: 99px;
}

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

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 22px 56px;
}

.hero-carousel {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 44px;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px;
  color: #ffffff;
  max-width: 820px;
}

.hero-kicker,
.sub-hero span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 14px;
}

.hero-content h1,
.sub-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.hero-content p,
.sub-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.75;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  background: var(--red);
  color: #ffffff;
}

.primary-btn:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

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

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

.search-panel {
  margin-bottom: 36px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-weight: 900;
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.empty-state {
  margin: 14px 0 0;
  color: var(--text-muted);
}

.content-section {
  margin-bottom: 46px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-weight: 900;
}

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

.category-tile {
  min-height: 150px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.category-tile span {
  display: block;
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}

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

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

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
}

.category-badge,
.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

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

.duration-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.76);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  background: var(--yellow);
  color: #111827;
}

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

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

.card-body {
  display: block;
  padding: 12px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta,
.card-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.card-meta span:first-child {
  color: #ca8a04;
  font-weight: 900;
}

.card-tags {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-wide,
.movie-card-large {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
}

.movie-card-wide .poster-wrap,
.movie-card-large .poster-wrap {
  aspect-ratio: auto;
  min-height: 190px;
}

.movie-card-small .card-body {
  display: none;
}

.gradient-section {
  padding: 28px;
  border-radius: var(--radius-lg);
  color: #ffffff;
}

.gradient-section .section-more,
.gradient-section .card-body strong,
.gradient-section .card-body p,
.gradient-section .card-tags,
.gradient-section .card-meta {
  color: #ffffff;
}

.gradient-section .movie-card {
  background: rgba(255, 255, 255, 0.17);
  box-shadow: none;
}

.blue-purple {
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.pink-red,
.sub-hero,
.ranking-hero,
.category-hero {
  background: linear-gradient(135deg, var(--pink), var(--red));
}

.sub-hero {
  padding: 42px;
  margin-bottom: 34px;
  border-radius: var(--radius-lg);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.sub-hero p {
  margin-bottom: 0;
}

.compact-actions {
  margin-top: 22px;
}

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

.category-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.12));
}

.category-card-body {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  color: #ffffff;
}

.category-card-body strong {
  display: block;
  font-size: 28px;
  margin-bottom: 10px;
}

.category-card-body em {
  display: block;
  font-style: normal;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 22px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  cursor: pointer;
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.34);
  font-size: 30px;
}

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

.detail-card,
.related-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.detail-card h1 {
  margin: 16px 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.detail-card h2,
.related-panel h2 {
  margin: 24px 0 14px;
  font-size: 24px;
}

.detail-card p {
  color: #374151;
  line-height: 1.88;
}

.one-line {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.detail-meta-line,
.tag-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-meta-line span:not(.category-badge),
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 700;
}

.static-badge {
  position: static;
}

.genre-line {
  color: var(--text-muted);
}

.related-panel {
  position: sticky;
  top: 92px;
  align-self: start;
}

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

.related-list .movie-card-wide {
  grid-template-columns: 112px minmax(0, 1fr);
}

.related-list .poster-wrap {
  min-height: 150px;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 44px 22px 22px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

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

.site-footer p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.site-footer a {
  color: #9ca3af;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 30px auto 0;
  padding-top: 22px;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 18px 14px 42px;
  }

  .header-inner {
    padding: 0 14px;
  }

  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 560px;
    border-radius: 18px;
  }

  .hero-content {
    padding: 26px 20px 54px;
  }

  .hero-content p,
  .sub-hero p {
    font-size: 16px;
  }

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

  .movie-grid,
  .movie-grid-large,
  .movie-grid-wide,
  .movie-grid-small,
  .category-grid,
  .category-card-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-wide,
  .movie-card-large {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .movie-card-wide .poster-wrap,
  .movie-card-large .poster-wrap {
    min-height: 160px;
  }

  .gradient-section,
  .sub-hero,
  .detail-card,
  .related-panel {
    padding: 20px;
  }

  .detail-meta-line span:not(.category-badge),
  .tag-list span {
    font-size: 12px;
  }
}
