:root {
  --brand: #b91c1c;
  --brand-dark: #7f1d1d;
  --brand-light: #ef4444;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #fff7f7 0%, #f8fafc 36%, #eef2f7 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, #7f1d1d, #b91c1c 48%, #dc2626);
  box-shadow: 0 14px 40px rgba(127, 29, 29, 0.28);
}

.nav-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

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

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.86);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  width: 42px;
  height: 42px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  gap: 8px;
  flex-wrap: wrap;
}

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

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.03);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 35%, rgba(248, 113, 113, 0.34), transparent 34%),
    linear-gradient(90deg, rgba(8, 13, 26, 0.94) 0%, rgba(15, 23, 42, 0.74) 45%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 45%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) 360px;
  align-items: center;
  gap: 40px;
  color: #fff;
}

.hero-copy {
  max-width: 730px;
  padding-top: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-light);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 900;
}

.hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 950;
}

.hero-summary {
  color: rgba(255, 255, 255, 0.84);
  max-width: 620px;
  font-size: 17px;
  line-height: 1.85;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tags {
  margin: 22px 0;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(185, 28, 28, 0.10);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-actions,
.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 16px 36px rgba(185, 28, 28, 0.35);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn-soft {
  color: #b91c1c;
  background: #fff1f2;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.12);
}

.hero-panel {
  border-radius: 32px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 26px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.hero-panel img {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: 24px;
  object-fit: cover;
  opacity: 1;
  transform: none;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.hero-panel-title {
  margin: 16px 0 2px;
  font-weight: 900;
  font-size: 22px;
}

.hero-panel-meta {
  color: rgba(255, 255, 255, 0.72);
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(10px);
}

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

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

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

.hero-dots button {
  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-dots button.active {
  width: 28px;
  background: #fff;
}

.main-wrap,
.content-section,
.detail-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.main-wrap {
  padding: 36px 0 72px;
}

.content-section {
  padding: 46px 0 8px;
}

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

.section-heading h2,
.page-heading h1,
.detail-title h1 {
  margin: 6px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.section-heading p,
.page-heading p {
  color: var(--muted);
  max-width: 720px;
  line-height: 1.7;
}

.search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.75);
  padding: 22px;
  backdrop-filter: blur(16px);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-input,
.select-filter {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.select-filter:focus {
  border-color: rgba(185, 28, 28, 0.45);
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.10);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-row button,
.category-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
}

.filter-row button.active,
.category-chip:hover {
  background: #fee2e2;
  color: #b91c1c;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.85);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  border-color: rgba(185, 28, 28, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1f2937, #111827);
  overflow: hidden;
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.05);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.82));
  opacity: 0.8;
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(185, 28, 28, 0.92);
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.34);
}

.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #7f1d1d);
  box-shadow: 0 10px 26px rgba(127, 29, 29, 0.36);
  font-weight: 950;
}

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

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
  color: #0f172a;
}

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

.movie-meta {
  margin: 9px 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-line {
  min-height: 46px;
  color: #475569;
  font-size: 13px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: var(--radius-lg);
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #b91c1c 54%, #ef4444);
  box-shadow: 0 16px 45px rgba(127, 29, 29, 0.22);
}

.category-tile::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -28px;
  top: -34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-tile span {
  position: absolute;
  left: 22px;
  bottom: 20px;
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.rank-index {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #7f1d1d);
  font-weight: 950;
  font-size: 20px;
}

.rank-thumb {
  width: 96px;
  height: 132px;
  border-radius: 18px;
  object-fit: cover;
  background: #111827;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 950;
}

.rank-info p {
  margin: 0 0 8px;
  color: #475569;
  line-height: 1.7;
}

.breadcrumb {
  color: var(--muted);
  font-size: 14px;
  margin: 28px 0 14px;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.detail-wrap {
  padding: 24px 0 70px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #050816;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050816;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(185, 28, 28, 0.38), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.62));
}

.play-overlay span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 20px 48px rgba(127, 29, 29, 0.42);
  font-size: 34px;
  padding-left: 6px;
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.detail-side {
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #111827;
}

.detail-side-body {
  padding: 20px;
}

.detail-title {
  margin: 24px 0 20px;
}

.detail-title p {
  color: var(--muted);
  line-height: 1.7;
}

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

.article-box,
.aside-box {
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
  padding: 26px;
}

.article-box h2,
.aside-box h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.article-box p {
  color: #334155;
  line-height: 2;
  margin: 0 0 18px;
}

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

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

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

.movie-card-compact .movie-line,
.movie-card-compact .tag-row {
  display: none;
}

.empty-state {
  display: none;
  margin-top: 18px;
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  color: #fff;
  font-size: 20px;
}

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

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-content: flex-start;
}

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

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

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

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

  .hero-panel {
    display: none;
  }

  .hero-copy {
    padding-right: 64px;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .hero h1 {
    font-size: 42px;
  }

  .hero-summary {
    font-size: 15px;
  }

  .hero-control {
    display: none;
  }

  .hero-copy {
    padding-right: 0;
  }

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

  .section-heading,
  .page-heading,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .rank-item {
    grid-template-columns: 48px 72px minmax(0, 1fr);
  }

  .rank-thumb {
    width: 72px;
    height: 100px;
    border-radius: 14px;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .rank-index {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 16px;
  }

  .rank-info h2,
  .rank-info h3 {
    font-size: 18px;
  }

  .article-box,
  .aside-box {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .nav-inner,
  .mobile-nav,
  .main-wrap,
  .content-section,
  .detail-wrap,
  .footer-inner {
    width: min(100% - 22px, 1240px);
  }

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

  .logo-mark {
    width: 34px;
    height: 34px;
  }

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

  .hero h1 {
    font-size: 34px;
  }

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

  .btn {
    width: 100%;
  }
}
