:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --dark: #111827;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1200px;
  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;
  white-space: nowrap;
}

.brand-mark,
.footer-logo span {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), #ef4444);
  color: #fff;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.brand-text {
  font-size: 22px;
  letter-spacing: -0.03em;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: #374151;
  font: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: #fef2f2;
  color: var(--red);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 48px;
  left: 0;
  width: 320px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #4b5563;
}

.dropdown-menu a:hover {
  background: #fef2f2;
  color: var(--red);
}

.header-search,
.mobile-search,
.big-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.category-search {
  height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: #fff;
  transition: 0.2s ease;
}

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

.header-search button,
.mobile-search button,
.big-search button,
.primary-button,
.ghost-button,
.filter-button {
  height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-button {
  background: var(--red);
  color: #fff;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.primary-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 16px 20px 20px;
  background: #fff;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
}

.hero-slider {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: #0b0f19;
}

.hero-track {
  position: relative;
  min-height: 610px;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.12);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0b0f19, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  min-height: 610px;
  margin: 0 auto;
  padding: 88px 20px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 54px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.86);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 20px 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3vw, 42px);
}

.hero-copy p {
  max-width: 640px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-poster {
  display: block;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  transition: 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
  width: 28px;
  border-radius: 999px;
  background: #fff;
}

.quick-categories,
.section-block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 20px 0;
}

.quick-categories {
  display: flex;
  align-items: center;
  gap: 18px;
}

.quick-title {
  font-weight: 800;
  white-space: nowrap;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.category-chip:hover,
.filter-button:hover,
.filter-button.active {
  background: var(--red);
  color: #fff;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05) 52%, transparent);
  opacity: 0.68;
}

.movie-year,
.movie-score {
  position: absolute;
  z-index: 2;
  top: 10px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.movie-year {
  left: 10px;
  background: var(--red);
}

.movie-score {
  right: 10px;
  background: rgba(0, 0, 0, 0.64);
}

.play-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 46px;
  opacity: 0;
  transform: scale(0.82);
  transition: 0.25s ease;
}

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

.movie-card h3 {
  margin: 12px 0 4px;
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.rank-item,
.ranking-row {
  display: grid;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transition: 0.2s ease;
}

.rank-item {
  grid-template-columns: 34px 54px minmax(0, 1fr) auto;
  padding: 12px;
}

.rank-item:hover,
.ranking-row:hover,
.category-card:hover,
.overview-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num,
.ranking-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fef2f2;
  color: var(--red);
  font-weight: 900;
}

.rank-num {
  width: 34px;
  height: 34px;
}

.rank-item img {
  width: 54px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-item h3,
.ranking-row h2 {
  margin: 0;
}

.rank-item p,
.ranking-row p,
.ranking-row em {
  color: var(--muted);
}

.rank-item strong,
.ranking-row strong {
  color: var(--red);
  font-size: 20px;
}

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

.category-card,
.overview-card {
  display: block;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #fff, #fff7f7);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: 0.2s ease;
}

.category-card h3,
.overview-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p,
.overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-card span,
.overview-card span {
  color: var(--red);
  font-weight: 800;
}

.page-hero,
.watch-hero {
  position: relative;
  padding: 70px 20px;
  color: #fff;
  overflow: hidden;
}

.page-hero > div,
.watch-hero {
  max-width: 1200px;
  margin: 0 auto;
}

.red-hero,
.category-hero {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

.dark-hero {
  background: linear-gradient(135deg, #111827, #374151);
}

.search-hero {
  background: linear-gradient(135deg, #1f2937, #111827);
}

.page-hero span,
.watch-hero .breadcrumb {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero h1,
.watch-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

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

.overview-card {
  padding: 0;
  overflow: hidden;
}

.overview-card h2,
.overview-card p,
.overview-card span {
  display: block;
  margin-left: 20px;
  margin-right: 20px;
}

.overview-card span {
  margin-bottom: 22px;
}

.overview-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 140px;
  overflow: hidden;
}

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

.filter-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.category-search {
  width: min(460px, 80vw);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.movie-card.hidden {
  display: none;
}

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

.ranking-row {
  grid-template-columns: 56px 74px minmax(0, 1fr) 64px;
  padding: 14px 18px;
}

.ranking-index {
  width: 44px;
  height: 44px;
}

.ranking-row img {
  width: 74px;
  height: 104px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-row p {
  margin: 8px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.big-search {
  max-width: 760px;
  margin-top: 24px;
}

.big-search input {
  flex: 1;
  height: 54px;
  font-size: 16px;
}

.big-search button {
  height: 54px;
  min-width: 104px;
}

.watch-hero {
  padding-top: 42px;
  padding-bottom: 42px;
  color: #fff;
}

.watch-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #7f1d1d);
  z-index: -1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.detail-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 330px;
  gap: 28px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.62));
  color: #fff;
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red);
  font-size: 38px;
  padding-left: 4px;
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.34);
}

.player-overlay strong {
  font-size: 20px;
}

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

.content-card,
.info-card {
  margin-top: 22px;
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.content-card p {
  margin: 0 0 24px;
  color: #4b5563;
  line-height: 1.9;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.info-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 20px;
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  font-weight: 700;
}

.info-card .tag-cloud span {
  background: #f3f4f6;
  color: #374151;
}

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

.site-footer {
  margin-top: 70px;
  padding: 52px 20px 26px;
  background: #111827;
  color: #d1d5db;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-grid p {
  color: #9ca3af;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

.compact-card {
  display: inline-grid;
}

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

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

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

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

  .hero-poster {
    display: none;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .header-inner {
    gap: 12px;
  }

  .hero-slider,
  .hero-track,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 70px;
  }

  .quick-categories,
  .filter-panel,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-grid,
  .category-grid,
  .overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .ranking-row strong {
    grid-column: 3;
  }
}

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

  .hero-copy p,
  .page-hero p,
  .watch-hero p {
    font-size: 16px;
  }

  .hero-actions,
  .big-search,
  .mobile-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rank-item {
    grid-template-columns: 30px 50px minmax(0, 1fr);
  }

  .rank-item strong {
    grid-column: 3;
  }

  .detail-layout {
    padding-left: 14px;
    padding-right: 14px;
  }

  .content-card,
  .info-card {
    padding: 20px;
  }
}
