:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #ef4444;
  --brand-2: #2563eb;
  --brand-3: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.top-rainbow,
.footer-rainbow {
  height: 4px;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #06b6d4, #2563eb, #a855f7);
}

.nav-wrap {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316, #7c3aed);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
}

.brand-text {
  font-size: 25px;
  background: linear-gradient(90deg, #ef4444, #f97316, #22c55e, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--brand-2);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: #111827;
  border-radius: 999px;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.16), transparent 34%), #111827;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-content {
  max-width: 760px;
  margin-left: calc((100vw - min(1240px, calc(100vw - 44px))) / 2 + 22px);
  padding: 92px 22px 132px 0;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fde68a;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.lead-text {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.32);
}

.secondary-btn {
  color: #111827;
  background: #ffffff;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: min(1240px, calc(100% - 44px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 30px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 106px;
  width: min(740px, calc(100% - 44px));
  display: flex;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-panel input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #111827;
  background: #ffffff;
}

.hero-search input {
  border-radius: 999px 0 0 999px;
  padding: 0 22px;
}

.hero-search button,
.search-panel button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  cursor: pointer;
  font-weight: 900;
}

.hero-search button {
  padding: 14px 26px;
  border-radius: 999px;
}

.content-section {
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
  padding: 58px 0;
}

.soft-section {
  padding-top: 36px;
}

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

.section-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #2563eb);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.section-head h2 {
  margin: 0;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-link {
  color: var(--brand-2);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.score-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-meta a {
  color: var(--brand-2);
}

.card-body h3 {
  margin: 9px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.mini-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-tags span,
.detail-tags a,
.detail-meta span,
.ranking-meta span,
.ranking-meta strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 800;
}

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

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

.list-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
}

.list-card .poster-link {
  aspect-ratio: 1 / 1.32;
}

.rank-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 24px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(160deg, #111827, #1d4ed8, #7c2d12);
  box-shadow: var(--shadow);
}

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

.rank-panel h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.rank-panel a {
  color: #fde68a;
  font-weight: 800;
}

.rank-panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rank-panel li a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.rank-index {
  color: #fde68a;
  font-weight: 900;
}

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

.rank-panel em {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-style: normal;
}

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

.category-tile,
.category-feature {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 22px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-feature span {
  display: block;
  color: var(--brand-2);
  font-weight: 900;
}

.category-tile strong,
.category-feature strong {
  display: block;
  margin: 8px 0;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.category-tile p,
.category-feature p {
  margin: 0;
  color: var(--muted);
}

.category-feature {
  min-height: 238px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.category-feature span,
.category-feature p {
  color: rgba(255, 255, 255, 0.86);
}

.page-hero {
  padding: 96px 22px 72px;
  color: #ffffff;
  background: radial-gradient(circle at 15% 10%, rgba(239, 68, 68, 0.36), transparent 26%), linear-gradient(135deg, #111827, #1e3a8a, #7c2d12);
}

.compact-hero {
  text-align: center;
}

.compact-hero p {
  margin-left: auto;
  margin-right: auto;
}

.search-panel {
  width: min(720px, 100%);
  margin: 30px auto 0;
  display: flex;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.search-panel input {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px 0 0 999px;
}

.search-panel button {
  padding: 0 26px;
  border-radius: 999px;
}

.search-summary {
  margin-bottom: 24px;
  color: #475569;
  font-weight: 900;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 28px;
}

.pagination:last-child {
  margin: 32px 0 0;
}

.pagination a {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #334155;
  background: #ffffff;
  font-weight: 900;
}

.pagination a.active,
.pagination a:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: #e5e7eb;
}

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

.ranking-poster span {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  font-weight: 900;
}

.ranking-card h2 {
  margin: 4px 0 8px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.ranking-card p {
  color: var(--muted);
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-hero {
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  color: #ffffff;
}

.detail-info .lead-text {
  max-width: 760px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-tags a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.player-section {
  padding-bottom: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  min-height: min(68vw, 700px);
  max-height: 760px;
  display: block;
  background: #020617;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.45), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 24px 50px rgba(239, 68, 68, 0.35);
  font-size: 34px;
}

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

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

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

.detail-content article {
  padding: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.detail-content p {
  margin: 0;
  color: #475569;
}

.site-footer {
  margin-top: 42px;
  color: #cbd5e1;
  background: #111827;
}

.footer-inner {
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 28px;
}

.footer-brand {
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

.footer-inner p {
  margin: 10px 0 0;
  color: #94a3b8;
}

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

.footer-links a,
.footer-tags a {
  color: #e2e8f0;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-grid,
  .category-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 12px;
  }

  .hero-carousel {
    min-height: 610px;
  }

  .hero-content {
    margin-left: 0;
    padding: 72px 22px 150px;
  }

  .hero-search {
    bottom: 92px;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .detail-poster {
    width: min(280px, 100%);
  }

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

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

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

  .list-card,
  .ranking-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .card-body h3,
  .ranking-card h2 {
    font-size: 19px;
  }

  .hero-search,
  .search-panel {
    border-radius: 22px;
    flex-direction: column;
    gap: 8px;
  }

  .hero-search input,
  .search-panel input,
  .hero-search button,
  .search-panel button {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
  }

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

  .movie-player {
    min-height: 58vw;
  }
}
