:root {
  color-scheme: light;
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #f97316;
  --yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f3f4f6;
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  max-width: 100%;
  height: auto;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow));
  box-shadow: 0 14px 35px rgba(220, 38, 38, 0.24);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.brand-text em {
  font-size: 12px;
  font-style: normal;
  opacity: 0.9;
  margin-top: 4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

.main-nav a,
.mobile-nav a {
  transition: color 180ms ease, background 180ms ease;
}

.main-nav a:hover {
  color: #fff7b2;
}

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

.header-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(255, 255, 255, 0.34);
  outline: none;
  border-radius: 999px;
  padding: 11px 15px;
  font: inherit;
}

.header-search input {
  width: 170px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

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

.header-search button,
.large-search button,
.primary-btn,
.ghost-btn,
.section-more {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-search button {
  padding: 10px 14px;
  background: #fff;
  color: var(--red);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-carousel {
  position: relative;
  height: 610px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 550ms ease, transform 700ms ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2), transparent 24%),
    linear-gradient(135deg, #7f1d1d, #f97316 52%, #facc15);
}

.hero-bg img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-bg::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 40%);
}

.cover-fallback::before,
.poster-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #991b1b, #f97316 54%, #fde68a);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  max-width: 1180px;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: #fed7aa;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 20px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p:not(.hero-kicker) {
  max-width: 720px;
  margin: 0 0 34px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions,
.detail-copy .primary-btn {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.header-search button:hover,
.large-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 180ms ease, background 180ms ease;
}

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

.home-search-panel {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.search-panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 22px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.search-panel-inner h2,
.section-heading h2,
.page-hero h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.large-search {
  display: flex;
  gap: 10px;
}

.large-search input {
  min-width: 0;
  flex: 1;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.large-search button {
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.page-main,
.page-section {
  padding-top: 54px;
  padding-bottom: 54px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.section-more {
  color: var(--red);
  background: #fee2e2;
}

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

.category-tile,
.category-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-tile {
  min-height: 164px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  right: -42px;
  top: -42px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.32), rgba(220, 38, 38, 0.2));
}

.category-tile strong,
.category-panel-head span {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em,
.category-panel p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.category-tile > span:last-child,
.category-panel-head em {
  position: relative;
  z-index: 1;
  color: var(--red);
  font-weight: 900;
}

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

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

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.16);
}

.poster,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

.poster {
  aspect-ratio: 3 / 4;
}

.poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.68));
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: #fff;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.poster-year {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  color: #fff;
  font-weight: 900;
}

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

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

.movie-card h3 a:hover,
.category-panel-links a:hover {
  color: var(--red);
}

.meta,
.summary {
  color: var(--muted);
  line-height: 1.6;
}

.meta {
  margin: 0 0 8px;
  font-size: 13px;
}

.summary {
  margin: 0 0 14px;
  font-size: 14px;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

.rank-section {
  padding-top: 0;
}

.rank-list {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: #fff7ed;
}

.rank-medal {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #9ca3af;
  font-weight: 900;
}

.rank-medal.top {
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.rank-title {
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  text-align: right;
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a::after {
  content: "/";
  margin-left: 10px;
  color: #cbd5e1;
}

.breadcrumb.light {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb.light a::after {
  color: rgba(255, 255, 255, 0.44);
}

.page-hero {
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.25), transparent 26%),
    linear-gradient(135deg, #991b1b, #f97316 58%, #facc15);
  box-shadow: var(--shadow);
}

.page-hero.small {
  padding: 38px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
}

.category-panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.category-panel {
  padding: 24px;
}

.category-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.category-panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-panel-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  background: #f3f4f6;
  font-size: 14px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 14px;
  margin: 26px 0;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  color: var(--ink);
  background: #f9fafb;
  border: 1px solid var(--line);
}

.empty-state {
  padding: 34px;
  border-radius: var(--radius);
  text-align: center;
  background: #fff;
  color: var(--muted);
}

.detail-main {
  background: #f3f4f6;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 36px;
  padding-bottom: 56px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 500px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.35);
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 800px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.7;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.detail-copy .tag-row {
  margin-bottom: 26px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.26), rgba(0, 0, 0, 0.64));
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red);
  background: #fff;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

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

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  text-align: center;
}

.player-shell.is-loading .player-status,
.player-shell.is-error .player-status {
  color: #fff;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: 54px;
}

.content-card {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
}

.content-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.tag-row.big span {
  min-height: 32px;
  padding: 0 13px;
  font-size: 13px;
}

.movie-card.compact .movie-card-body {
  padding: 14px;
}

.search-results {
  margin-top: 28px;
}

.search-count {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 800;
}

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

.search-result-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.search-result-item img {
  width: 86px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.search-result-item h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.search-result-item p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.2fr;
  gap: 28px;
}

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

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

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer a {
  display: inline-block;
  margin: 0 12px 10px 0;
  color: #d1d5db;
}

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

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

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

@media (max-width: 920px) {
  .header-search {
    display: none;
  }

  .hero-carousel {
    height: 520px;
  }

  .search-panel-inner,
  .detail-layout,
  .filter-bar,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .category-panel-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    gap: 26px;
  }

  .detail-poster {
    width: min(310px, 72vw);
  }
}

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

  .brand-text strong {
    font-size: 18px;
  }

  .hero-carousel {
    height: 500px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-content p:not(.hero-kicker),
  .detail-one-line {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .home-search-panel {
    margin-top: 18px;
  }

  .search-panel-inner,
  .page-hero.small,
  .content-card {
    padding: 22px;
  }

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

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

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

  .rank-meta {
    grid-column: 2;
    text-align: left;
  }

  .detail-hero {
    min-height: auto;
  }
}
