:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --brand: #f97316;
  --brand-dark: #c2410c;
  --brand-soft: #fed7aa;
  --red: #dc2626;
  --pink: #db2777;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(14px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--red), var(--pink));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 16px;
  color: #374151;
  font-weight: 650;
  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(--brand-dark);
  background: var(--soft);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: var(--brand-dark);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

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

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: white;
  background: #111827;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(251, 146, 60, 0.42), transparent 32%),
    linear-gradient(100deg, rgba(15, 23, 42, 0.94), rgba(127, 29, 29, 0.76) 52%, rgba(219, 39, 119, 0.54)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.9));
}

.hero-content {
  position: relative;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 84px 0 72px;
}

.hero-copy {
  max-width: 760px;
}

.hero-badges,
.detail-meta,
.card-meta,
.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-badges span,
.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-badges span,
.hero-tags span {
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #f3f4f6;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-action,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  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: white;
  background: linear-gradient(135deg, var(--brand), var(--red));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 10px 12px;
  color: white;
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.68);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 28px;
  background: white;
}

.site-section {
  padding: 72px 0;
}

.soft-bg {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.section-head,
.category-overview-head,
.rank-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.rank-panel-head h2,
.category-overview-head h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.category-overview-head p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-action {
  color: var(--brand-dark);
  background: #ffedd5;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -56px;
  top: -56px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

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

.category-count {
  position: relative;
  display: inline-flex;
  margin-bottom: 22px;
  padding: 5px 10px;
  color: var(--brand-dark);
  border-radius: 999px;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.category-card h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 21px;
}

.category-card p,
.category-card small {
  position: relative;
  color: var(--muted);
}

.category-card small {
  display: block;
  margin-top: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.75));
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  color: white;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--red));
  font-size: 12px;
  font-weight: 900;
}

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

.card-meta {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 50px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  min-height: 28px;
}

.tag-row span,
.detail-tags span {
  color: var(--brand-dark);
  background: #ffedd5;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.category-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 800;
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--brand-dark);
}

.is-compact .movie-card-body {
  padding: 14px;
}

.is-compact h3 {
  font-size: 16px;
}

.is-compact p {
  min-height: 44px;
  font-size: 13px;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.rank-panel-head {
  margin-bottom: 16px;
}

.rank-panel-head h2 {
  font-size: 28px;
}

.rank-panel-head a {
  color: var(--brand-dark);
  font-weight: 800;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.rank-index {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 900;
}

.rank-row img {
  width: 56px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

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

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

.rank-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-heat {
  color: var(--red);
  font-weight: 900;
}

.page-hero,
.movie-detail-hero {
  color: white;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.42), transparent 30%),
    linear-gradient(135deg, #111827, #7f1d1d 52%, #9d174d);
}

.page-hero .site-shell {
  padding: 76px 0 64px;
}

.slim-hero .site-shell {
  padding: 62px 0 52px;
}

.page-hero h1,
.movie-detail-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.page-hero p,
.movie-detail-hero p {
  max-width: 760px;
  color: #f3f4f6;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #ffedd5;
  font-size: 14px;
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.empty-state {
  display: none;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #fdba74;
  border-radius: 18px;
  background: #fff7ed;
}

.category-stack {
  display: grid;
  gap: 36px;
}

.category-overview-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.inline-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 24px;
}

.inline-link-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
}

.inline-link-row span {
  color: var(--brand-dark);
}

.rank-grid .movie-card:nth-child(-n + 3) {
  border-color: #fdba74;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.detail-one-line {
  margin: 18px 0;
}

.detail-meta span {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffedd5;
  font-size: 13px;
  font-weight: 800;
}

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

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

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

.player-video {
  background: #020617;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.68;
}

.play-circle {
  position: relative;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--red));
  box-shadow: 0 20px 60px rgba(220, 38, 38, 0.36);
  font-size: 34px;
}

.player-card.is-playing .player-cover {
  display: none;
}

.detail-body-section {
  padding-top: 36px;
}

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

.detail-article,
.detail-side {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.detail-article h2,
.detail-side h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 17px;
}

.detail-side dl,
.detail-side div {
  display: grid;
  gap: 10px;
}

.detail-side div {
  grid-template-columns: 76px minmax(0, 1fr);
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.detail-side dt {
  color: var(--muted);
  font-weight: 800;
}

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

.site-footer {
  padding: 48px 0;
  background: #111827;
  color: #d1d5db;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 260px;
  gap: 28px;
}

.footer-logo {
  margin-bottom: 10px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

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

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

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-content,
  .split-layout,
  .detail-hero-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 280px;
  }

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

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

  .section-head,
  .category-overview-head,
  .rank-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .hero-content {
    padding: 56px 0 64px;
  }

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

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

  .site-section {
    padding: 52px 0;
  }

  .detail-side div {
    grid-template-columns: 1fr;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
