:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --dark: #0f172a;
  --radius: 18px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f5f6fa;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

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

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  box-shadow: 0 10px 22px rgba(127, 29, 29, 0.18);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 24px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

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

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 30%, rgba(249, 115, 22, 0.7), transparent 38%), linear-gradient(135deg, #111827, #7f1d1d 48%, #111827);
}

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

.hero-backdrop::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.22) 55%, rgba(0, 0, 0, 0.45));
}

.hero-content {
  position: relative;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 390px;
  align-items: center;
  gap: 48px;
  color: #fff;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow,
.page-hero span,
.section-heading span {
  display: inline-flex;
  margin-bottom: 14px;
  color: #ffedd5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.05em;
}

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

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(90deg, var(--orange), var(--red));
  color: #fff;
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-card {
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
  transform: rotate(1.5deg);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-card span {
  display: block;
  padding: 16px 18px;
  color: #fff;
  font-weight: 800;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 34px;
  transform: translateY(-50%);
  backdrop-filter: blur(14px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 10;
}

.search-panel,
.filter-panel {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-form input,
.filter-panel input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.search-form input:focus,
.filter-panel input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-form button,
.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.quick-links,
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-links a,
.filter-buttons button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 14px;
  font-weight: 800;
}

.section-block {
  padding: 72px 0;
}

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

.section-heading h2,
.category-index h2,
.rank-panel h2,
.detail-main h2,
.related-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

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

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

.all-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 26px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.poster-frame img,
.rank-cover img,
.detail-cover img,
.video-poster 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(180deg, transparent 36%, rgba(0, 0, 0, 0.68));
}

.poster-frame.has-image-error::before,
.rank-cover.has-image-error::before,
.detail-cover.has-image-error::before,
.video-poster.has-image-error::before,
.hero-card.has-image-error::before,
.hero-backdrop.has-image-error::before,
.detail-bg.has-image-error::before {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

.movie-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.movie-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: rgba(220, 38, 38, 0.92);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

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

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

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

.movie-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card p {
  display: -webkit-box;
  margin: 12px 0 0;
  color: #4b5563;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card .tag-row span {
  background: #fff7ed;
  color: #9a3412;
}

.category-section,
.feature-band,
.site-footer {
  color: #fff;
  background: linear-gradient(135deg, #111827, #1f2937 48%, #020617);
}

.light h2,
.light p,
.light span {
  color: #fff;
}

.category-tiles,
.category-link-grid,
.feature-band-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.category-tile,
.category-link-card {
  min-height: 170px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(249, 115, 22, 0.92));
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.22);
  transition: transform 0.2s ease;
}

.category-tile:hover,
.category-link-card:hover {
  transform: translateY(-4px);
}

.category-tile strong,
.category-link-card strong {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.category-tile span,
.category-link-card span {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 92px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

.rank-cover {
  position: relative;
  overflow: hidden;
  width: 92px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

.rank-text strong,
.rank-text small {
  display: block;
}

.rank-text strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.rank-text small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.rank-heat {
  color: #ea580c;
  font-weight: 900;
}

.feature-band {
  padding: 42px 0;
}

.feature-band-grid div {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.feature-band-grid strong,
.feature-band-grid span {
  display: block;
}

.feature-band-grid strong {
  font-size: 22px;
}

.feature-band-grid span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.page-hero {
  padding: 96px 0;
  color: #fff;
  background: radial-gradient(circle at 15% 15%, rgba(249, 115, 22, 0.72), transparent 35%), linear-gradient(135deg, #991b1b, #111827);
}

.small-hero {
  padding: 82px 0;
}

.category-hero,
.ranking-hero,
.search-hero {
  background: radial-gradient(circle at 75% 15%, rgba(250, 204, 21, 0.45), transparent 34%), linear-gradient(135deg, #b91c1c, #f97316 45%, #111827);
}

.filter-panel {
  display: grid;
  gap: 14px;
}

.category-index h2 {
  margin: 34px 0 18px;
}

.category-index h2:first-child {
  margin-top: 0;
}

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

.category-chip-cloud a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-weight: 800;
}

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

.rank-panel {
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-panel h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.detail-hero-inner {
  position: relative;
  min-height: 540px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: center;
  gap: 46px;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #991b1b, #f97316);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.detail-meta {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

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

.detail-main,
.related-panel {
  min-width: 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.video-element,
.video-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-element {
  z-index: 1;
  background: #000;
}

.video-cover {
  z-index: 3;
  border: 0;
  padding: 0;
  color: #fff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
}

.video-shell.is-playing .video-cover {
  display: none;
}

.video-poster {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.video-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.15));
}

.play-circle {
  position: relative;
  z-index: 4;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 34px;
  box-shadow: 0 20px 42px rgba(220, 38, 38, 0.45);
}

.detail-text {
  margin-top: 34px;
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-text h2 {
  margin-top: 28px;
  font-size: 28px;
}

.detail-text h2:first-child {
  margin-top: 0;
}

.detail-text p {
  color: #374151;
  font-size: 17px;
  line-height: 1.95;
}

.genre-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-weight: 800;
}

.related-panel {
  position: sticky;
  top: 104px;
  align-self: start;
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.related-panel h2 {
  margin-bottom: 18px;
  font-size: 26px;
}

.related-grid {
  display: grid;
  gap: 16px;
}

.related-grid .movie-card {
  box-shadow: none;
  border: 1px solid var(--line);
}

.site-footer {
  padding: 56px 0 0;
}

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

.footer-grid p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.footer-grid h3 {
  margin: 0 0 16px;
  color: #fff;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 9px 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid a:hover {
  color: #fed7aa;
}

.footer-bottom {
  margin-top: 42px;
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.searchable-card.is-hidden {
  display: none;
}

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

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

  .hero-card,
  .detail-cover {
    display: none;
  }

  .ranking-page-grid,
  .category-tiles,
  .category-link-grid,
  .feature-band-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-panel {
    position: static;
  }
}

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

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

  .header-inner {
    min-height: 66px;
  }

  .site-logo {
    font-size: 18px;
  }

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

  .hero-control {
    display: none;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .search-form button {
    min-height: 48px;
  }

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

  .movie-grid,
  .all-grid,
  .compact-grid,
  .ranking-page-grid,
  .category-tiles,
  .category-link-grid,
  .feature-band-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 38px 74px 1fr;
  }

  .rank-heat {
    display: none;
  }

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

  .detail-text {
    padding: 22px;
  }

  .play-circle {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
