* {
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --panel-soft: #fff7f7;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red: #dc2626;
  --red-dark: #7f1d1d;
  --red-soft: #fee2e2;
  --orange: #f97316;
  --yellow: #f59e0b;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-text {
  font-size: 22px;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #374151;
  font-size: 15px;
  font-weight: 650;
}

.main-nav a,
.nav-dropdown > a {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown > a.active {
  color: var(--red);
}

.nav-dropdown {
  position: relative;
  padding: 22px 0;
}

.dropdown-panel {
  position: absolute;
  top: 64px;
  left: -18px;
  display: grid;
  width: 220px;
  padding: 10px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.18s ease;
}

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: var(--red-soft);
}

.nav-dropdown:hover .dropdown-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.top-search input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 15px;
  outline: none;
  background: #fff;
}

.top-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.top-search button,
.primary-button,
.secondary-button,
.text-button,
.player-control,
.search-panel button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-button,
.player-control,
.search-panel button {
  background: linear-gradient(135deg, var(--red), #ef4444);
  color: #fff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.2);
}

.top-search button {
  padding: 10px 16px;
}

.primary-button,
.secondary-button,
.text-button,
.player-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.text-button {
  color: var(--red);
  background: var(--red-soft);
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.player-control:hover,
.search-panel button:hover {
  transform: translateY(-2px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--red);
}

.mobile-nav {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 16px;
  background: #fff;
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 650;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 15% 15%, rgba(248, 113, 113, 0.55), transparent 30%),
    radial-gradient(circle at 85% 25%, rgba(249, 115, 22, 0.42), transparent 26%),
    linear-gradient(120deg, #4c0519 0%, #7f1d1d 45%, #b91c1c 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -34% -10%;
  height: 55%;
  background: linear-gradient(to bottom, transparent, rgba(17, 24, 39, 0.28));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 32px;
  align-items: center;
  min-height: 620px;
  padding: 64px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fee2e2;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 16px 0 16px;
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.hero h1 {
  max-width: 620px;
  font-size: clamp(38px, 6vw, 68px);
}

.hero-copy p {
  max-width: 620px;
  color: #fee2e2;
  font-size: 19px;
}

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

.hero-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-categories a {
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stage {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: stretch;
}

.hero-main {
  position: relative;
  min-height: 460px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-slide img,
.hero-mini img,
.poster-frame img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #7f1d1d, #111827);
}

.hero-slide::after,
.hero-mini::after,
.poster-frame::after,
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.0));
  pointer-events: none;
}

.hero-slide-copy {
  position: absolute;
  z-index: 2;
  left: 28px;
  right: 28px;
  bottom: 28px;
}

.hero-slide-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.1;
}

.hero-slide-copy p {
  display: -webkit-box;
  margin: 0 0 18px;
  color: #fef2f2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-mini-grid {
  display: grid;
  gap: 16px;
}

.hero-mini {
  position: relative;
  min-height: 105px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.hero-mini span {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #fff;
  font-weight: 800;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dots button.active {
  background: #fff;
}

.page-hero {
  background: linear-gradient(120deg, #7f1d1d, #dc2626);
  color: #fff;
  padding: 56px 0;
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(34px, 4.4vw, 56px);
}

.page-hero p {
  max-width: 780px;
  color: #fee2e2;
  font-size: 18px;
}

.section {
  padding: 56px 0;
}

.section.white {
  background: #fff;
}

.section.soft {
  background: linear-gradient(180deg, #f9fafb, #fff);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 580px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.card-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 10px;
  top: 10px;
  background: rgba(220, 38, 38, 0.92);
}

.year-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(17, 24, 39, 0.74);
}

.card-body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 1.4em;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-line {
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #991b1b;
  background: var(--red-soft);
  font-size: 12px;
  font-weight: 700;
}

.card-meta {
  color: #6b7280;
  font-size: 13px;
}

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

.category-tile {
  display: grid;
  min-height: 190px;
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #991b1b, #ef4444);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.18);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #9a3412, #f97316);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #7f1d1d, #b91c1c);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  color: #fff7ed;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-number {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 900;
}

.rank-cover {
  display: block;
  width: 92px;
  height: 58px;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

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

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

.rank-copy em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat {
  color: var(--red);
  font-weight: 800;
}

.detail-hero {
  padding: 44px 0 34px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(248, 113, 113, 0.5), transparent 25%),
    linear-gradient(120deg, #4c0519, #991b1b 60%, #dc2626);
}

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

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 6px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-title p {
  max-width: 830px;
  color: #fee2e2;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 700;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.player-section {
  padding: 34px 0 54px;
  background: #111827;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.2), rgba(0, 0, 0, 0.45));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.35);
  font-size: 34px;
  transform: translateX(3px);
}

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

.player-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  color: #f3f4f6;
}

.player-status {
  min-height: 24px;
  color: #fecaca;
}

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

.content-panel,
.side-panel,
.search-panel {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.content-panel h2,
.side-panel h2 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

.content-panel p {
  color: #374151;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fee2e2;
}

.breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.search-panel input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
}

.search-panel button {
  padding: 13px 22px;
}

.search-empty {
  display: none;
  padding: 24px;
  border-radius: 18px;
  color: #991b1b;
  background: #fee2e2;
  font-weight: 800;
}

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

.search-hidden {
  display: none;
}

.site-footer {
  padding: 44px 0;
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 6px 0;
  color: #d1d5db;
}

.footer-links {
  columns: 2;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

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

  .hero-stage {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .brand-text {
    font-size: 19px;
  }

  .hero-inner {
    min-height: auto;
    padding: 42px 0;
  }

  .hero-main {
    min-height: 410px;
  }

  .hero-mini-grid,
  .movie-grid,
  .category-grid,
  .footer-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-cover {
    width: 74px;
    height: 52px;
  }

  .heat {
    grid-column: 3;
  }

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

  .player-shell {
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    letter-spacing: -0.035em;
  }

  .hero-slide-copy {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .section {
    padding: 42px 0;
  }

  .rank-item {
    gap: 10px;
    padding: 10px;
  }
}
