:root {
  --amber: #f59e0b;
  --rose: #f43f5e;
  --sky: #0ea5e9;
  --ink: #111827;
  --muted: #667085;
  --paper: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  --soft-shadow: 0 16px 46px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 45%, #f0f9ff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(22px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 12px 26px rgba(244, 63, 94, 0.28);
}

.brand-name {
  font-size: 22px;
  background: linear-gradient(135deg, #b45309, #be123c, #0369a1);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.search-trigger,
.menu-toggle {
  border: 0;
  color: #334155;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 15px;
  background: transparent;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.search-trigger:hover,
.menu-toggle:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: none;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: #475569;
}

.mobile-nav a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

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

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

.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-slide > img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(14, 165, 233, 0.55), transparent 32%),
    linear-gradient(90deg, rgba(120, 53, 15, 0.94), rgba(136, 19, 55, 0.86), rgba(7, 89, 133, 0.68));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 92px;
  width: min(760px, calc(100% - 48px));
  color: #fff;
}

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

.hero h1,
.page-hero h1,
.detail-main-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 18px 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.lead-text {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.7;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 18px 42px rgba(244, 63, 94, 0.34);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

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

.hero-dots button {
  width: 44px;
  height: 7px;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

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

.section-title {
  margin-bottom: 28px;
}

.section-title span {
  display: inline-block;
  color: #e11d48;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #b45309, #be123c, #0369a1);
  -webkit-background-clip: text;
  color: transparent;
}

.section-title p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 720px;
}

.centered {
  text-align: center;
}

.centered p {
  margin-left: auto;
  margin-right: auto;
}

.compact-title {
  margin-bottom: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 16px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.list-filter {
  margin-bottom: 26px;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 120px;
  overflow: hidden;
}

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

.category-body {
  padding: 22px;
}

.category-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-body p {
  min-height: 74px;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.category-body span {
  color: #be123c;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card.is-hidden {
  display: none;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fde68a, #fecdd3, #bae6fd);
}

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

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

.rating {
  position: absolute;
  right: 12px;
  top: 12px;
  min-width: 46px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.34);
}

.movie-info {
  padding: 18px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badges span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  color: #9f1239;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(255, 228, 230, 0.92);
}

.movie-info h3 {
  margin: 14px 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.movie-info h3 a:hover {
  color: #be123c;
}

.movie-info p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  color: #64748b;
  font-size: 13px;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 44px 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.ranking-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-title {
  font-weight: 800;
}

.ranking-score {
  color: #be123c;
  font-weight: 900;
}

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

.small-card-grid .movie-info p,
.small-card-grid .card-meta {
  display: none;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 105px max(32px, calc((100vw - 1180px) / 2));
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(14, 165, 233, 0.4), transparent 28%),
    linear-gradient(135deg, rgba(120, 53, 15, 0.95), rgba(136, 19, 55, 0.92), rgba(7, 89, 133, 0.84));
}

.page-hero h1 {
  margin-bottom: 18px;
}

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

.large-category-grid .category-thumbs {
  height: 190px;
}

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

.sticky-ranking {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.sticky-ranking h2 {
  margin: 0 0 18px;
}

.dense-ranking .ranking-item {
  grid-template-columns: 38px 46px 1fr auto;
  padding: 8px;
}

.dense-ranking .ranking-item img {
  width: 46px;
  height: 60px;
}

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

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
}

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

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

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.detail-main-info h1 {
  margin-bottom: 22px;
}

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

.detail-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 20px 0 26px;
}

.detail-stats span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.detail-stats strong {
  color: #fde68a;
}

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

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

.movie-player,
.player-overlay,
.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  background: #030712;
}

.player-overlay {
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: #030712;
}

.player-overlay img {
  object-fit: cover;
  opacity: 0.68;
  filter: blur(1px);
}

.player-overlay.is-hidden {
  display: none;
}

.play-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 92px;
  height: 92px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 22px 70px rgba(244, 63, 94, 0.45);
  transform: translate(-50%, -50%);
}

.detail-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 34px;
}

.copy-card {
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.copy-card h2 {
  margin: 0 0 16px;
}

.copy-card p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

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

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

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

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(8px);
}

.search-dialog {
  position: relative;
  width: min(720px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 56px));
  overflow: auto;
  margin: 36px auto;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-close {
  position: absolute;
  right: 22px;
  top: 20px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  background: #fff1f2;
  color: #be123c;
  font-size: 26px;
}

.search-dialog h2 {
  margin: 0 0 18px;
}

.search-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 20px;
  padding: 0 18px;
  outline: none;
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.search-result {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 20px;
  background: #fff7ed;
}

.search-result img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 14px;
}

.search-result strong {
  display: block;
  margin-bottom: 5px;
}

.search-result span {
  color: #64748b;
  font-size: 14px;
}

.site-footer {
  margin-top: 50px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937, #0f172a);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

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

.site-footer p {
  max-width: 430px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 16px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  color: #cbd5e1;
  margin: 10px 0;
}

.site-footer a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

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

  .split-section,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .sticky-ranking {
    position: static;
  }
}

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

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

  .hero {
    height: 620px;
  }

  .hero-content {
    left: 24px;
    bottom: 76px;
  }

  .filter-bar,
  .detail-grid,
  .detail-copy,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .search-trigger {
    display: none;
  }

  .hero,
  .detail-hero {
    min-height: 620px;
  }

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

  .section-shell {
    padding: 46px 0;
  }

  .movie-grid,
  .category-grid,
  .large-category-grid,
  .small-card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 38px 48px 1fr;
  }

  .ranking-score {
    display: none;
  }

  .player-wrap {
    border-radius: 22px;
  }
}
