:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --red-soft: #fee2e2;
  --gold: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --warm: #f9fafb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  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: linear-gradient(180deg, #fff 0%, #fff7f7 38%, #ffffff 100%);
}

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

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

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

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.32);
}

.brand-name,
.footer-logo {
  font-size: 22px;
  background: linear-gradient(90deg, #dc2626, #7f1d1d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

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

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

.header-search,
.mobile-search,
.inline-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.inline-search input,
.filter-bar select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: #ffffff;
  min-width: 0;
}

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

.header-search button,
.mobile-search button,
.inline-search button,
.btn,
.player-cover span {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.inline-search button:hover,
.btn:hover,
.player-cover:hover span {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.32);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: #fff1f2;
  color: var(--red);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px 16px;
}

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

.mobile-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
}

.mobile-links a,
.category-pill,
.tag-row span,
.hero-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #374151;
  border: 1px solid rgba(229, 231, 235, 0.9);
  font-size: 13px;
  font-weight: 700;
}

main {
  min-height: 70vh;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(127, 29, 29, 0.78) 48%, rgba(15, 23, 42, 0.58) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(250, 204, 21, 0.26), transparent 28%), radial-gradient(circle at 78% 58%, rgba(220, 38, 38, 0.34), transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  min-height: 640px;
  margin: 0 auto;
  padding: 88px 18px 78px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  align-items: center;
  gap: 52px;
}

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

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 900;
  margin-bottom: 22px;
}

.eyebrow span {
  color: var(--gold);
}

.hero h1 {
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  margin: 0 0 22px;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
  max-width: 680px;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.hero-tags span {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
  min-height: 500px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  font-weight: 900;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--red);
}

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

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

.section-head p,
.page-head p,
.detail-head p {
  color: var(--muted);
  line-height: 1.75;
  margin: 8px 0 0;
}

.view-more {
  color: var(--red);
  font-weight: 900;
}

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

.movie-card {
  background: var(--paper);
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(220, 38, 38, 0.25);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #fff7ed);
}

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

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

.score,
.rank-no {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 13px;
  color: #ffffff;
}

.score {
  right: 10px;
  background: rgba(220, 38, 38, 0.94);
}

.rank-no {
  left: 10px;
  background: rgba(17, 24, 39, 0.82);
  font-style: normal;
  font-weight: 900;
}

.card-body {
  padding: 15px 15px 17px;
}

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

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

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

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

.tag-row span,
.detail-tags span {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff1f2, #ffffff);
  border: 1px solid rgba(254, 202, 202, 0.9);
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.08);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -35px;
  bottom: -38px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.22), transparent 68%);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 23px;
}

.category-card p {
  margin: 0 0 18px;
  color: #6b7280;
  line-height: 1.7;
}

.category-card strong {
  color: var(--red);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  background: #111827;
  color: #ffffff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rank-panel h2 {
  margin: 0;
  padding: 24px 24px 8px;
}

.rank-list {
  padding: 10px 14px 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

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

.rank-main small {
  color: #cbd5e1;
}

.rank-heat {
  color: #fecaca;
  font-weight: 900;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
  margin-bottom: 24px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar input {
  flex: 1 1 280px;
}

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

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

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

.player-card,
.detail-card,
.side-card {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.video-shell {
  position: relative;
  background: #050505;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62));
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-cover span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  padding: 0;
  font-size: 26px;
}

.detail-content {
  padding: 26px;
}

.detail-content h2,
.side-card h2,
.related-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-content p {
  color: #374151;
  line-height: 1.9;
  margin: 0 0 18px;
}

.detail-meta {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.detail-meta span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e5e7eb;
  color: var(--muted);
}

.detail-meta strong {
  color: #111827;
  text-align: right;
}

.side-card {
  padding: 18px;
}

.side-card .rank-row {
  grid-template-columns: 32px 54px minmax(0, 1fr);
  color: #111827;
}

.side-card .rank-row:hover {
  background: #fff1f2;
}

.side-card .rank-main small {
  color: #6b7280;
}

.related-section {
  margin-top: 34px;
}

.search-empty {
  display: none;
  padding: 40px;
  text-align: center;
  border: 1px dashed #fecaca;
  border-radius: 24px;
  color: var(--muted);
  background: #fff7f7;
}

.search-empty.is-visible {
  display: block;
}


.site-footer {
  margin-top: 48px;
  padding: 42px 18px;
  background: #111827;
  color: #e5e7eb;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 28px;
  align-items: start;
}

.footer-inner p {
  max-width: 420px;
  color: #cbd5e1;
  line-height: 1.8;
}

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

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

.footer-links a:hover {
  background: rgba(220, 38, 38, 0.8);
}

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

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

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

  .hero-poster {
    display: none;
  }

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

  .footer-links {
    justify-content: flex-start;
  }

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

@media (max-width: 720px) {
  .container {
    padding: 26px 14px;
  }

  .header-inner {
    padding: 12px 14px;
  }

  .brand-name,
  .footer-logo {
    font-size: 19px;
  }

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

  .hero-content {
    padding-top: 72px;
  }

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

  .hero p {
    font-size: 16px;
  }

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

  .section-head,
  .page-head,
  .detail-head {
    display: block;
  }

  .rank-row {
    grid-template-columns: 32px 52px minmax(0, 1fr);
  }

  .rank-heat {
    display: none;
  }

  .card-desc {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .inline-search {
    display: grid;
  }

  .inline-search input,
  .inline-search button {
    width: 100%;
  }
}
