* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --gold: #facc15;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.09);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f8fafc 100%);
}

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: 50;
  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: 24px;
}

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

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.25);
  font-size: 14px;
}

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

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

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

.header-search,
.wide-search,
.mobile-search {
  position: relative;
}

.header-search {
  width: 250px;
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.09);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 80;
  display: none;
  max-height: 430px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 8px;
}

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

.search-result {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: #fff1f2;
}

.search-result img {
  width: 52px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  background: #fee2e2;
}

.search-result strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: #111827;
}

.search-result span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.search-empty {
  padding: 18px 14px;
  color: var(--muted);
  font-size: 14px;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #111827;
  background: #f3f4f6;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 10px;
  flex-direction: column;
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-weight: 700;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: 32px;
  bottom: 78px;
  max-width: 760px;
  color: #ffffff;
}

.section-kicker,
.hero-kicker {
  margin: 0 0 10px;
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-kicker {
  color: var(--gold);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.06;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-line {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
  max-width: 720px;
  margin: 18px 0 0;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-meta span,
.detail-meta span {
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #dc2626;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

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

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

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

.primary-btn:hover,
.rank-action:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-search-section,
.content-section,
.category-panel,
.highlight-layout,
.overview-stack,
.player-section,
.detail-content {
  margin-top: 54px;
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.quick-search-card h2,
.section-head h2,
.text-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.wide-search .search-input {
  min-height: 54px;
  padding-left: 22px;
  padding-right: 22px;
}

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

.section-head a {
  color: var(--red);
  font-weight: 900;
}

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

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

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

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

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
  box-shadow: var(--soft-shadow);
  transform: translateZ(0);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.02));
  transition: opacity 0.25s ease;
}

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

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  color: #ffffff;
  background: var(--red);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.card-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: auto;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding-top: 12px;
}

.card-title {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: #111827;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.card-meta,
.card-desc,
.rank-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-meta {
  margin: 6px 0 0;
}

.card-desc {
  display: -webkit-box;
  min-height: 40px;
  margin: 6px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-panel {
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff1f2 0%, #fffbeb 100%);
  box-shadow: var(--soft-shadow);
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 20px;
  background: #111827;
  box-shadow: var(--soft-shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.category-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  color: #ffffff;
}

.category-tile strong {
  bottom: 58px;
  font-size: 20px;
  font-style: normal;
  font-weight: 950;
}

.category-tile em {
  bottom: 18px;
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.highlight-main,
.ranking-panel,
.text-panel,
.category-overview-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.highlight-main,
.ranking-panel,
.text-panel {
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.rank-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: #fee2e2;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-poster span {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--red);
  border-radius: 8px;
  font-weight: 950;
  font-size: 13px;
}

.rank-title {
  display: inline-block;
  color: #111827;
  font-weight: 950;
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 6px;
}

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

.rank-info p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-action {
  color: #ffffff;
  background: var(--red);
  min-height: 40px;
  padding: 0 18px;
}

.compact-list .rank-item {
  grid-template-columns: 58px 1fr;
}

.compact-list .rank-action,
.compact-list .rank-info p:not(.rank-meta),
.compact-list .tag-row {
  display: none;
}

.compact-list .rank-title {
  font-size: 15px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  padding: 72px 0;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.55), transparent 36%), linear-gradient(135deg, #111827, #7f1d1d 52%, #ea580c);
}

.page-hero h1 {
  max-width: 820px;
}

.page-hero p {
  max-width: 760px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.filter-button {
  border: 1px solid #fecaca;
  color: #991b1b;
  background: #fff1f2;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 800;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-button.active,
.filter-button:hover {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.category-overview-card {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 22px;
  padding: 22px;
  margin-bottom: 24px;
}

.overview-cover {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: 20px;
  background: #111827;
}

.overview-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overview-cover span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  color: #ffffff;
  font-size: 28px;
  font-weight: 950;
}

.overview-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

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

.detail-backdrop,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  background-size: cover;
  background-position: center;
  filter: blur(10px);
  transform: scale(1.06);
  opacity: 0.5;
}

.detail-shade {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.65) 52%, rgba(0, 0, 0, 0.32) 100%);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

.detail-info h1 {
  max-width: 900px;
}

.detail-line {
  color: rgba(255, 255, 255, 0.84);
  max-width: 820px;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.82);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.38), rgba(0, 0, 0, 0.62));
}

.play-overlay[hidden] {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.play-overlay strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 24px;
}

.text-panel p:last-child {
  margin-bottom: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.accent-panel {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1fr);
  gap: 32px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  max-width: 430px;
  line-height: 1.8;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  color: #d1d5db;
  font-weight: 700;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

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

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

  .ranking-panel {
    order: -1;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

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

  .hero {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 70px;
  }

  .quick-search-card,
  .category-overview-card,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    gap: 28px;
  }

  .detail-poster {
    width: min(250px, 72vw);
  }

  .rank-item {
    grid-template-columns: 70px 1fr;
  }

  .rank-action {
    grid-column: 2;
    justify-self: start;
  }

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

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

  .hero {
    height: 520px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-desc,
  .page-hero p,
  .detail-line {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-btn,
  .ghost-btn {
    min-height: 42px;
    padding: 0 18px;
  }

  .quick-search-section,
  .content-section,
  .category-panel,
  .highlight-layout,
  .overview-stack,
  .player-section,
  .detail-content {
    margin-top: 36px;
  }

  .quick-search-card,
  .category-panel,
  .highlight-main,
  .ranking-panel,
  .text-panel,
  .category-overview-card {
    padding: 18px;
    border-radius: 20px;
  }

  .six-col,
  .four-col,
  .mini-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .card-title {
    min-height: 38px;
    font-size: 14px;
  }

  .card-meta {
    font-size: 12px;
  }

  .page-hero {
    padding: 52px 0;
  }

  .detail-hero {
    min-height: auto;
  }

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

  .play-icon {
    width: 62px;
    height: 62px;
  }
}
