:root {
  --site-bg: #fff7f7;
  --panel: #ffffff;
  --panel-soft: #fff1f2;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(127, 29, 29, 0.12);
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --accent: #f97316;
  --shadow: 0 24px 70px rgba(127, 29, 29, 0.16);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(248, 113, 113, 0.24), transparent 34rem),
    linear-gradient(180deg, #fff7f7 0%, #ffffff 38%, #fff7ed 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #7f1d1d;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 28px rgba(127, 29, 29, 0.08);
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 8px 8px 14px;
  background: transparent;
}

.header-search button,
.primary-btn,
.secondary-btn,
.ghost-btn,
.search-page-box button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.25s ease;
}

.header-search button,
.primary-btn,
.search-page-box button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 32px rgba(220, 38, 38, 0.28);
}

.header-search button {
  padding: 8px 14px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
}

.secondary-btn {
  color: #ffffff;
  background: rgba(153, 27, 27, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-btn {
  color: #7f1d1d;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.48);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.header-search button:hover,
.search-page-box button:hover {
  transform: translateY(-2px) scale(1.02);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--primary);
}

.hero {
  position: relative;
  max-width: 1240px;
  margin: 26px auto 0;
  padding: 0 22px 32px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: 36px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 72px;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.1s ease;
  pointer-events: none;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(127, 29, 29, 0.62) 48%, rgba(17, 24, 39, 0.12) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.88), transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: #f97316;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.detail-content h1,
.inner-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-desc,
.detail-one-line,
.inner-hero p {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #991b1b;
  background: #fee2e2;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.tag-list.large span {
  font-size: 13px;
  padding: 8px 13px;
}

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

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

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

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

.hero-dots {
  position: absolute;
  left: 72px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.hero-search-panel {
  position: relative;
  z-index: 6;
  width: min(1040px, calc(100% - 48px));
  margin: -54px auto 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(127, 29, 29, 0.18);
  backdrop-filter: blur(18px);
}

.hero-search-panel p {
  margin: 0 0 12px;
  color: #7f1d1d;
  font-weight: 900;
}

.home-search,
.search-page-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.home-search input,
.search-page-box input {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 18px;
  outline: 0;
  background: #ffffff;
}

.home-search a,
.search-page-box button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 18px;
  color: #ffffff;
  background: var(--primary-dark);
  font-weight: 900;
}

.instant-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.instant-results a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff7f7;
  color: #7f1d1d;
  font-weight: 800;
}

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 22px;
}

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

.section-heading.compact {
  align-items: start;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: #7f1d1d;
}

.section-heading a,
.text-link {
  color: var(--primary);
  font-weight: 900;
}

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

.category-pills a,
.category-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px rgba(127, 29, 29, 0.08);
}

.category-pills a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 98px;
  justify-content: center;
  padding: 20px;
  transition: 0.25s ease;
}

.category-pills a:hover,
.category-card:hover,
.movie-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 54px rgba(127, 29, 29, 0.16);
}

.category-pills span {
  font-size: 20px;
  font-weight: 950;
  color: #7f1d1d;
}

.category-pills small {
  color: var(--muted);
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 24px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(127, 29, 29, 0.08);
  transition: 0.25s ease;
}

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

.poster-frame::after,
.ranking-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.62), transparent 46%);
}

.poster-frame img {
  transition: 0.45s ease;
}

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

.poster-badge,
.heat-badge {
  position: absolute;
  z-index: 2;
  left: 14px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.poster-badge {
  top: 14px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
}

.heat-badge {
  bottom: 14px;
  color: #7f1d1d;
  background: rgba(255, 255, 255, 0.9);
}

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

.meta-line {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h2,
.movie-card h3,
.ranking-card h2,
.category-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
  color: #111827;
  letter-spacing: -0.02em;
}

.movie-card p,
.ranking-card p,
.category-card p,
.detail-copy p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.ranking-panel {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #fff1f2);
  box-shadow: var(--shadow);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px 12px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.rank-row span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 950;
}

.rank-row strong {
  color: #111827;
}

.rank-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.inner-hero {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 86px 22px 48px;
  color: #ffffff;
  border-radius: 0 0 38px 38px;
  background:
    radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.54), transparent 34rem),
    linear-gradient(135deg, #7f1d1d, #111827 72%);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

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

.category-card {
  padding: 26px;
  transition: 0.25s ease;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.category-samples a {
  padding: 8px 10px;
  border-radius: 999px;
  color: #991b1b;
  background: #fee2e2;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar {
  position: sticky;
  top: 75px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  color: #7f1d1d;
  background: #fff1f2;
  cursor: pointer;
  font-weight: 900;
}

.filter-bar button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 90px 22px 54px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}

.detail-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.player-section {
  padding-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #050505;
  box-shadow: 0 28px 72px rgba(17, 24, 39, 0.24);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #050505;
  cursor: pointer;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(5, 5, 5, 0.64), rgba(5, 5, 5, 0.26));
  cursor: pointer;
}

.player-shell.is-ready .play-cover {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: #dc2626;
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.play-cover span:last-child {
  font-size: 20px;
  font-weight: 950;
}

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

.copy-grid article,
.info-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(127, 29, 29, 0.08);
}

.copy-grid h2,
.info-panel h2 {
  margin: 0 0 12px;
  color: #7f1d1d;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.info-panel {
  margin-top: 22px;
}

.info-panel dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-panel div {
  padding: 16px;
  border-radius: 18px;
  background: #fff7f7;
}

.info-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.info-panel dd {
  margin: 4px 0 0;
  color: #7f1d1d;
  font-weight: 950;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
}

.prev-next a {
  flex: 1;
  padding: 16px 18px;
  border-radius: 18px;
  background: #fff1f2;
  color: #7f1d1d;
  font-weight: 900;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 64px 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(127, 29, 29, 0.08);
  transition: 0.25s ease;
}

.ranking-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 19px;
  font-weight: 950;
}

.ranking-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.search-hero .search-page-box {
  max-width: 780px;
  margin-top: 24px;
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: 26px;
  color: #7f1d1d;
  background: #fff1f2;
  font-weight: 900;
  text-align: center;
}

.site-footer {
  margin-top: 30px;
  padding: 54px 22px 24px;
  color: #ffffff;
  background: #111827;
}

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

.footer-logo {
  color: #ffffff;
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.72);
}

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

.footer-links a {
  padding: 8px 11px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  max-width: 1240px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
}

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

@media (max-width: 1080px) {
  .site-header-inner {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    justify-self: end;
  }

  .site-nav,
  .header-search {
    grid-column: 1 / -1;
  }

  .site-nav {
    display: none;
    justify-content: start;
    flex-wrap: wrap;
  }

  .site-nav.open {
    display: flex;
  }

  .header-search {
    display: none;
  }

  .site-header.search-open .header-search {
    display: flex;
  }

  .hero-slide {
    padding: 46px;
  }

  .two-column,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .site-header-inner,
  .hero,
  .section,
  .detail-content,
  .inner-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-slider {
    min-height: 560px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 34px 24px 74px;
  }

  .hero-search-panel {
    width: calc(100% - 32px);
    margin-top: -36px;
  }

  .home-search,
  .search-page-box,
  .section-heading,
  .copy-grid,
  .info-panel dl,
  .prev-next,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

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

  .detail-poster {
    width: min(230px, 70vw);
  }

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

  .detail-content {
    padding-top: 58px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .category-grid,
  .category-pills,
  .search-results-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .detail-content h1,
  .inner-hero h1 {
    font-size: 36px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    left: 24px;
  }
}
