:root {
  --brand: #dc2626;
  --brand-dark: #991b1b;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #fff7f7 42%, #ffffff 100%);
  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,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.main-nav {
  display: flex;
  gap: 18px;
}

.nav-link {
  color: #374151;
  font-weight: 700;
  padding: 10px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(330px, 32vw);
  padding: 5px;
  background: #f3f4f6;
  border-radius: 999px;
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
  padding: 8px 12px;
}

.header-search button,
.search-page-form button {
  border: 0;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.search-page-form button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-panel a {
  display: block;
  padding: 14px 24px;
  font-weight: 700;
  border-bottom: 1px solid #f3f4f6;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 430px);
  align-items: center;
  gap: 54px;
  padding: 110px max(32px, calc((100vw - 1180px) / 2)) 90px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: blur(20px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 42%, rgba(239, 68, 68, 0.36), transparent 38%), linear-gradient(90deg, rgba(12, 16, 27, 0.96) 0%, rgba(17, 24, 39, 0.78) 56%, rgba(17, 24, 39, 0.42) 100%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 6.2vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 710px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

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

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 18px 32px rgba(220, 38, 38, 0.32);
}

.secondary-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
}

.hero-poster {
  padding: 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section {
  padding: 64px 0;
}

.page-main {
  padding: 38px 0 70px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

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

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

.category-card {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius);
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(17, 24, 39, 0.15), rgba(17, 24, 39, 0.88)), var(--card-bg);
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

.category-card:hover::before {
  transform: scale(1.08);
}

.category-card span,
.category-card strong {
  position: relative;
  z-index: 1;
  display: block;
}

.category-card span {
  font-size: 21px;
  font-weight: 900;
}

.category-card strong {
  margin-top: 52px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.65;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.78));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-pill {
  position: absolute;
  left: 50%;
  bottom: 16px;
  opacity: 0;
  transform: translate(-50%, 10px);
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-style: normal;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--brand);
}

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

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact .card-body h3 {
  font-size: 15px;
}

.top-panel,
.story-card,
.info-card,
.filter-panel,
.search-page-box,
.category-overview-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.top-panel {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.top-panel h3 {
  margin: 0 0 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #fff1f2;
  transform: translateX(3px);
}

.rank-num {
  color: var(--brand);
  font-weight: 900;
}

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

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  margin-top: 5px;
  color: var(--muted);
}

.rank-score {
  color: #f97316;
  font-weight: 900;
}

.page-hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  padding: 42px;
  border-radius: 28px;
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.42)), var(--page-image);
  background-size: cover;
  background-position: center;
}

.slim-hero {
  min-height: 220px;
}

.slim-hero::before {
  background: radial-gradient(circle at 70% 30%, rgba(220, 38, 38, 0.32), transparent 40%), linear-gradient(135deg, #111827, #7f1d1d);
}

.page-hero > div,
.page-hero > h1,
.page-hero > p {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.page-hero p:not(.section-kicker) {
  max-width: 700px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 999px;
  background: #fff;
  padding: 12px 16px;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-page-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

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

.category-preview img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.category-overview-card h2 {
  margin: 6px 0 10px;
}

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

.rank-top {
  margin-bottom: 28px;
}

.rank-page-list {
  margin-bottom: 60px;
}

.search-page-box {
  padding: 20px;
}

.search-page-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 24px;
}

.search-empty {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.detail-main {
  background: #fff;
}

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

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--detail-image);
  background-position: center;
  background-size: cover;
  filter: blur(22px);
  opacity: 0.45;
  transform: scale(1.08);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.78));
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster img {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-info h1 {
  margin: 20px 0 14px;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 30px;
}

.player-section {
  padding: 44px 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #050505;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.25);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.56));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.96);
  box-shadow: 0 18px 45px rgba(220, 38, 38, 0.34);
  font-size: 38px;
  text-indent: 5px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}

.story-card,
.info-card {
  padding: 24px;
}

.story-card h2,
.info-card h2 {
  margin: 0 0 14px;
}

.story-card p {
  margin: 0;
  color: #374151;
  line-height: 2;
}

.info-card {
  grid-row: span 2;
}

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

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

.info-card dd {
  margin: 0;
}

.related-section {
  padding-top: 38px;
}

.site-footer {
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.78);
  background: #111827;
}

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

.footer-brand {
  display: inline-block;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 620px;
  line-height: 1.8;
}

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

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

@media (max-width: 1080px) {
  .category-grid,
  .five-columns,
  .six-columns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .top-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 84px 24px 74px;
  }

  .hero-poster {
    max-width: 310px;
  }

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

  .category-overview-grid,
  .category-overview-card,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    padding: 44px 0;
  }

  .detail-poster {
    max-width: 240px;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-desc,
  .detail-line {
    font-size: 16px;
  }

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

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

  .page-hero {
    padding: 28px;
  }

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

  .info-card dl {
    grid-template-columns: 1fr;
  }
}
