:root {
  --color-ink: #1f2937;
  --color-muted: #6b7280;
  --color-soft: #f8fafc;
  --color-warm: #fff7ed;
  --color-amber: #d97706;
  --color-orange: #ea580c;
  --color-red: #dc2626;
  --color-line: #e5e7eb;
  --shadow-soft: 0 22px 60px rgba(31, 41, 55, 0.12);
  --shadow-card: 0 14px 36px rgba(31, 41, 55, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 36px rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.28);
}

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

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  color: #4b5563;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--color-amber);
  background: #fff7ed;
}

.nav-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-dropdown {
  position: relative;
}

.nav-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  padding: 12px;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #4b5563;
}

.nav-panel a:hover {
  color: var(--color-amber);
  background: #fff7ed;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--color-amber);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--color-line);
  background: #ffffff;
}

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

.home-hero {
  position: relative;
  min-height: 720px;
  padding-top: 96px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 45%, #fee2e2 100%);
}

.hero-bg,
.hero-bg span {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glow {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.16;
  mix-blend-mode: multiply;
  animation: floatGlow 7s ease-in-out infinite;
}

.glow-one {
  left: 6%;
  top: 18%;
  background: #f59e0b;
}

.glow-two {
  left: auto;
  right: 8%;
  top: 28%;
  background: #fb923c;
  animation-delay: 1.2s;
}

.glow-three {
  top: auto;
  left: 42%;
  bottom: 8%;
  background: #ef4444;
  animation-delay: 2s;
}

@keyframes floatGlow {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(10px, -14px, 0) scale(1.05);
  }
}

.hero-shell {
  position: relative;
  z-index: 2;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 52px;
}

.hero-slide.is-active {
  display: grid;
  animation: heroFade 0.55s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--color-amber);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.category-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #4b5563;
  font-size: 20px;
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.tag-cloud span,
.pill,
.pill-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff7ed;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.24);
}

.ghost-button {
  color: var(--color-amber);
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(217, 119, 6, 0.30);
}

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

.hero-poster,
.category-hero-poster {
  position: relative;
  min-height: 500px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #ffffff;
}

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

.hero-poster::after,
.category-hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.72));
}

.hero-poster span,
.category-hero-poster span {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  color: #ffffff;
  font-weight: 800;
}

.hero-controls {
  display: flex;
  gap: 10px;
  margin-top: 36px;
}

.hero-controls button {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(217, 119, 6, 0.22);
  cursor: pointer;
}

.hero-controls button.is-active {
  width: 64px;
  background: var(--color-amber);
}

.section-block {
  padding: 76px 0;
}

.surface-white {
  background: #ffffff;
}

.surface-soft {
  background: linear-gradient(135deg, #f9fafb, #fff7ed);
}

.surface-warm {
  background: linear-gradient(135deg, #fffbeb, #fee2e2);
}

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

.section-head h2,
.content-card h2,
.player-side h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.text-link {
  color: var(--color-amber);
  min-height: 42px;
  padding-inline: 16px;
  background: #fff7ed;
}

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

.stat-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--color-line);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.06);
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--color-amber);
  font-size: 30px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--color-muted);
}

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

.category-tile {
  position: relative;
  min-height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

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

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

.category-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.78));
  z-index: 1;
}

.category-tile-content {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
  color: #ffffff;
}

.category-tile-content strong,
.category-tile-content em,
.category-tile-content span {
  display: block;
}

.category-tile-content strong {
  font-size: 22px;
  margin-bottom: 8px;
}

.category-tile-content em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.category-tile-content span {
  margin-top: 10px;
  font-size: 12px;
  color: #fde68a;
}

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

.featured-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.78);
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background: #f3f4f6;
}

.featured-grid .poster-link {
  height: 320px;
}

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

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

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

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

.play-chip,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.play-chip {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%);
  padding: 10px 16px;
  background: rgba(217, 119, 6, 0.92);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.year-badge {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.66);
}

.rank-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-card-body {
  padding: 18px;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rating {
  color: var(--color-amber);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.28;
}

.movie-card h3 a:hover,
.rank-content h2 a:hover,
.breadcrumb a:hover,
.player-side a:hover {
  color: var(--color-amber);
}

.movie-card p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
}

.movie-info-line,
.tag-line {
  color: var(--color-muted);
  font-size: 13px;
}

.tag-line {
  margin-top: 6px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 190px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--color-line);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.06);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--color-ink);
  background: #f9fafb;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--color-amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.page-main {
  padding-top: 76px;
}

.page-hero,
.category-hero,
.detail-hero {
  position: relative;
  padding: 70px 0;
  overflow: hidden;
}

.gradient-hero,
.category-hero,
.detail-hero {
  background: linear-gradient(135deg, #fffbeb, #fff7ed 48%, #fee2e2);
}

.page-hero p,
.category-hero p,
.detail-copy .lead-text {
  max-width: 720px;
  color: #4b5563;
  font-size: 18px;
}

.categories-page-grid {
  grid-template-columns: repeat(5, 1fr);
}

.category-hero-grid,
.detail-grid,
.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 44px;
}

.category-hero-poster {
  min-height: 430px;
}

.related-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.pill-link:hover,
.pill:hover {
  color: #ffffff;
  background: var(--color-amber);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 86px 52px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--color-line);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.06);
}

.rank-cover {
  width: 86px;
  height: 116px;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
}

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

.rank-number {
  color: var(--color-red);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-content h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-content p {
  margin: 0 0 10px;
  color: #4b5563;
}

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

.rank-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.rank-hot {
  color: var(--color-amber);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  margin-bottom: 28px;
}

.detail-grid {
  grid-template-columns: 360px minmax(0, 1fr);
}

.detail-poster {
  border-radius: 30px;
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: var(--shadow-soft);
}

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

.player-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 320px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #111827;
  object-fit: contain;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.74));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 4px;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  font-size: 30px;
}

.player-overlay strong {
  padding: 0 18px;
  font-size: 20px;
  text-align: center;
}

.player-side,
.content-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--color-line);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.06);
}

.player-side dl {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px 16px;
  margin: 20px 0 0;
}

.player-side dt {
  color: var(--color-muted);
}

.player-side dd {
  margin: 0;
  font-weight: 700;
}

.content-card + .content-card {
  margin-top: 18px;
}

.content-card p {
  margin: 16px 0 0;
  color: #374151;
  font-size: 17px;
}

.site-footer {
  padding: 56px 0;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid p {
  max-width: 460px;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.is-filtered-out {
  display: none !important;
}

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

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

  .hero-slide,
  .category-hero-grid,
  .detail-grid,
  .player-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .category-hero-poster {
    min-height: 420px;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .header-inner {
    height: 66px;
  }

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

  .home-hero {
    min-height: auto;
    padding: 104px 0 54px;
  }

  .hero-copy h1,
  .page-hero h1,
  .category-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-copy p,
  .page-hero p,
  .category-hero p,
  .detail-copy .lead-text {
    font-size: 16px;
  }

  .hero-poster,
  .category-hero-poster {
    min-height: 360px;
  }

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

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 74px minmax(0, 1fr) 54px;
  }

  .rank-number {
    display: none;
  }

  .rank-cover {
    width: 74px;
    height: 102px;
  }

  .rank-hot {
    font-size: 18px;
  }

  .detail-poster img {
    height: 420px;
  }

  .player-side dl {
    grid-template-columns: 58px 1fr;
  }
}
