:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-deep: #7f1d1d;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --white: #ffffff;
  --black: #050505;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 18px;
}

* {
  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: var(--soft);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #f97316);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(220, 38, 38, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #374151;
  font-size: 15px;
}

.nav-link {
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #111827;
  border-radius: 999px;
}

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

.mobile-nav.open {
  display: grid;
  gap: 10px;
}

.mobile-link {
  padding: 10px 0;
  color: #374151;
  border-bottom: 1px solid var(--line);
}

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

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, var(--red-deep), #111827);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
}

.hero-bg {
  opacity: 0.32;
}

.hero-shade,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.95) 0%, rgba(127, 29, 29, 0.72) 48%, rgba(17, 24, 39, 0.84) 100%);
}

.hero-content {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 54px;
  color: #fff;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 12px;
  color: #fee2e2;
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 16px 0 12px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.12;
  font-weight: 800;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn.primary {
  color: #fff;
  background: var(--red);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.32);
}

.btn.primary:hover {
  background: var(--red-dark);
}

.btn.ghost {
  color: #111827;
  background: #fff;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 34px;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  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.42);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: 72px 0;
}

.section.white {
  background: #fff;
}

.section.soft {
  background: #f3f4f6;
}

.section.black {
  background: #050505;
}

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

.section-head h2,
.panel-head h2,
.side-panel h2,
.article-card h2,
.info-card h2,
.content-narrow h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-link,
.panel-head a {
  color: var(--red);
  font-weight: 800;
}

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

.movie-grid.small-gap {
  gap: 18px;
}

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

.movie-card {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: #111827;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

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

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

.poster-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 16px 36px rgba(220, 38, 38, 0.35);
}

.type-badge,
.rating-badge {
  position: absolute;
  z-index: 2;
  padding: 4px 8px;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  top: 9px;
  right: 9px;
  background: var(--red);
}

.rating-badge {
  right: 9px;
  bottom: 9px;
  background: rgba(0, 0, 0, 0.62);
}

.movie-title {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.movie-meta,
.movie-genre {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 3px 8px;
  color: var(--red-dark);
  background: #fee2e2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.rank-panel,
.side-panel,
.article-card,
.info-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.rank-panel,
.side-panel {
  padding: 22px;
}

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

.panel-head h2,
.side-panel h2 {
  margin: 0;
  font-size: 24px;
}

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

.rank-list.full {
  gap: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-list.full .rank-item {
  padding: 14px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.rank-no {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 10px;
  font-weight: 900;
}

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

.rank-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.rank-copy strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-copy small {
  color: var(--red-dark);
  font-weight: 800;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile span {
  position: absolute;
  inset: auto 16px 16px 16px;
  color: #fff;
}

.category-tile strong,
.category-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile em,
.category-info em {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
  font-size: 13px;
}

.category-card {
  display: grid;
  min-height: 260px;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  opacity: 0.72;
}

.category-preview img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.category-info {
  position: absolute;
  inset: auto 18px 18px 18px;
  color: #fff;
}

.page-hero {
  padding: 82px 0;
  color: #fff;
}

.page-hero.red {
  background: linear-gradient(135deg, #991b1b, var(--red), #111827);
}

.page-hero h1 {
  margin-bottom: 18px;
}

.page-hero p {
  color: #fee2e2;
}

.mini-actions {
  margin-top: 24px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.filter-bar.large {
  grid-template-columns: minmax(0, 1fr) 160px 160px 160px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: #111827;
  background: #fff;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.filter-status {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-bg {
  opacity: 0.32;
}

.detail-mask {
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(127, 29, 29, 0.82), rgba(17, 24, 39, 0.92));
}

.detail-grid {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  min-height: 620px;
  padding: 56px 0;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  min-height: 48px;
  place-items: center;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  border-radius: 14px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #fecaca;
  font-size: 14px;
}

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

.meta-line,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.meta-line span {
  padding: 6px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.player-card {
  position: relative;
  overflow: hidden;
  width: min(1040px, 100%);
  margin: 0 auto;
  background: #000;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 12px;
  place-items: center;
  align-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.32), rgba(0, 0, 0, 0.72));
  font-size: 20px;
  font-weight: 900;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  background: var(--red);
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.42);
}

.player-card.playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.article-card,
.info-card {
  padding: 30px;
}

.article-card p,
.content-narrow p {
  margin: 0 0 26px;
  color: #374151;
  font-size: 17px;
}

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

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

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

.rank-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.compact-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.compact-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 9px;
}

.compact-card span {
  min-width: 0;
}

.compact-card strong,
.compact-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.content-narrow {
  max-width: 860px;
}

.site-footer {
  color: #fff;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

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

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #d1d5db;
  font-size: 14px;
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

  .two-column,
  .rank-page-grid {
    grid-template-columns: 1fr;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 70px 0 86px;
  }

  .hero-poster {
    display: none;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .filter-bar,
  .filter-bar.large,
  .detail-content-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    min-height: auto;
    padding: 42px 0;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .hero-carousel,
  .hero-content {
    min-height: 520px;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

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

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

  .rank-item {
    grid-template-columns: 32px 64px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-item img {
    width: 64px;
    height: 88px;
  }

  .article-card,
  .info-card,
  .rank-panel,
  .side-panel {
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
