:root {
  --ink: #111827;
  --muted: #6b7280;
  --paper: #ffffff;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --accent: #f97316;
  --hot: #ef4444;
  --blue: #2563eb;
  --green: #16a34a;
  --shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.98), rgba(239, 68, 68, 0.98));
  color: #fff;
  box-shadow: 0 12px 34px rgba(180, 55, 15, 0.25);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

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

.nav-link {
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.top-search {
  width: min(290px, 24vw);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0.45rem 0.75rem;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.top-search button,
.btn,
.filter-actions button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button {
  color: var(--accent);
  background: #fff;
  padding: 0.42rem 0.82rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.18);
}

.menu-toggle span {
  display: block;
  width: 1.3rem;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.hero {
  position: relative;
  height: min(680px, 86vh);
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-image,
.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(249, 115, 22, 0.26), transparent 30%), linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.64) 48%, rgba(17, 24, 39, 0.25));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 5rem 1.4rem 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--hot));
}

.eyebrow.dark {
  color: var(--accent);
  background: #fff3e9;
}

.hero h1,
.page-hero h1,
.ranking-hero h1,
.detail-hero h1 {
  max-width: 820px;
  margin: 1.2rem 0 1rem;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero p,
.page-hero p,
.ranking-hero p,
.detail-hero p {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.28rem);
  color: rgba(255, 255, 255, 0.84);
}

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

.hero-tags {
  margin-top: 1.4rem;
}

.hero-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  padding: 0.42rem 0.75rem;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(4px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.35rem;
  font-weight: 800;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--hot));
  box-shadow: 0 16px 38px rgba(249, 115, 22, 0.35);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(5px);
}

.btn:hover,
.top-search button:hover,
.filter-actions button:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

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

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

.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.4rem;
}

.section-head {
  margin-bottom: 1.6rem;
}

.section-head.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-head h2 {
  margin: 0.7rem 0 0.4rem;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

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

.section-head.light h2,
.section-head.light p {
  color: #fff;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.chip-cloud a {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-weight: 800;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 2rem;
  align-items: start;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 1.15rem;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.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);
}

.poster-badge {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 1rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-body h2 {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.card-body h2 a:hover {
  color: var(--accent);
}

.card-body p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.93rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 0.85rem;
}

.tag-row span,
.detail-tags a {
  padding: 0.28rem 0.58rem;
  color: #374151;
  background: #f3f4f6;
}

.movie-card.compact .card-body p {
  display: none;
}

.rank-panel,
.detail-side {
  border-radius: 1.2rem;
  background: #fff;
  padding: 1.15rem;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.rank-panel {
  position: sticky;
  top: 6.5rem;
}

.rank-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-weight: 900;
}

.rank-title a {
  color: var(--accent);
  font-size: 0.9rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 2.2rem 4.3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-number {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--hot));
  font-weight: 900;
}

.rank-item img {
  width: 4.3rem;
  height: 3rem;
  border-radius: 0.65rem;
  object-fit: cover;
}

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

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

.rank-copy em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.rank-score {
  color: #ca8a04;
  font-weight: 900;
}

.gradient-band {
  max-width: min(1280px, calc(100% - 2.8rem));
  margin-bottom: 4rem;
  border-radius: 2rem;
  background: radial-gradient(circle at 15% 20%, rgba(250, 204, 21, 0.28), transparent 30%), linear-gradient(135deg, #f97316, #ef4444 52%, #ec4899);
}

.inner-page {
  min-height: 70vh;
}

.page-hero,
.ranking-hero {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #111827, #4b1d0f 58%, #7f1d1d);
}

.small-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
}

.page-hero > div,
.ranking-hero > div {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 5rem 1.4rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.crumbs a:hover {
  color: #fff;
}

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

.category-card a {
  display: block;
  overflow: hidden;
  min-height: 100%;
  border-radius: 1.3rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

.category-copy {
  padding: 1.2rem;
}

.category-copy h2 {
  margin: 0 0 0.4rem;
}

.category-copy p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.category-copy span {
  color: var(--accent);
  font-weight: 900;
}

.filter-panel {
  max-width: 1280px;
  margin: -2rem auto 0;
  padding: 0 1.4rem;
  position: relative;
  z-index: 3;
}

.filter-search {
  padding: 1rem;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0.9rem 1.1rem;
  background: #f9fafb;
}

.filter-search input:focus {
  border-color: #fdba74;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.85rem 0.4rem 0;
}

.filter-actions button {
  padding: 0.52rem 0.85rem;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

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

.ranking-hero {
  min-height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.rank-page-list {
  max-width: 980px;
}

.rank-page-list .rank-item {
  grid-template-columns: 3rem 7rem minmax(0, 1fr) auto;
  padding: 1rem;
  border: 0;
  margin-bottom: 0.7rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.rank-page-list .rank-item img {
  width: 7rem;
  height: 4.6rem;
}

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

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.52)), linear-gradient(0deg, rgba(17, 24, 39, 0.86), transparent 55%);
}

.detail-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 1.4rem 4rem;
}

.player-section {
  max-width: 1100px;
  margin: -5rem auto 0;
  padding: 0 1.4rem;
  position: relative;
  z-index: 5;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 1.4rem;
  background: #05070d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  aspect-ratio: 16 / 9;
}

.player-box video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-box video {
  object-fit: contain;
  background: #05070d;
}

.player-cover {
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #05070d;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.58);
}

.player-cover.hidden {
  display: none;
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5.2rem;
  height: 5.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--hot));
  box-shadow: 0 18px 46px rgba(249, 115, 22, 0.36);
  font-size: 2rem;
  padding-left: 0.2rem;
}

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

.detail-main,
.detail-side {
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.detail-main {
  padding: 1.6rem;
}

.detail-main p {
  color: #374151;
  margin: 0 0 1.2rem;
}

.detail-main h2,
.detail-side h2 {
  margin: 1.4rem 0 0.7rem;
}

.detail-main .section-head h2 {
  margin-top: 0.7rem;
}

.detail-tags {
  margin-top: 1.4rem;
}

.detail-tags a:hover {
  color: #fff;
  background: var(--accent);
}

.detail-side {
  position: sticky;
  top: 6.5rem;
  padding: 1.3rem;
}

.detail-side h2 {
  margin-top: 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span {
  color: var(--muted);
}

.info-row strong {
  text-align: right;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: #111827;
  margin-top: 3rem;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.4rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  color: #fff;
}

.site-footer p {
  max-width: 520px;
  margin: 0.8rem 0 0;
}

.site-footer h2 {
  margin: 0 0 0.9rem;
  color: #fff;
  font-size: 1rem;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 0.38rem 0;
}

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

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.1rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .split-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .detail-side {
    position: static;
  }

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

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    flex-basis: 100%;
    order: 4;
    margin: 0;
    padding-top: 0.8rem;
  }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .top-search {
    order: 3;
    width: 100%;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 4rem;
  }

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

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

@media (max-width: 560px) {
  .hero h1,
  .page-hero h1,
  .ranking-hero h1,
  .detail-hero h1 {
    font-size: 2.35rem;
  }

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

  .rank-item,
  .rank-page-list .rank-item {
    grid-template-columns: 2.2rem 4.8rem minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .play-circle {
    width: 4.2rem;
    height: 4.2rem;
    font-size: 1.55rem;
  }
}
