* {
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #ea580c;
  --brand-strong: #c2410c;
  --brand-soft: #fed7aa;
  --red: #dc2626;
  --dark: #111827;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.image-missing {
  display: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 24px rgba(17, 24, 39, 0.08);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--red));
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(234, 88, 12, 0.26);
}

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

.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 11px 14px;
  border-radius: 12px 0 0 12px;
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 12px 16px;
  color: #ffffff;
  background: var(--brand);
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  font-weight: 700;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--surface-soft);
  color: var(--brand);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
  cursor: pointer;
}

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

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

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px 0 0 12px;
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #ea580c 0%, #dc2626 58%, #111827 100%);
  padding: 76px 0 96px;
}

.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to top, var(--bg), rgba(249, 250, 251, 0));
}

.hero-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.28;
  background: #ffffff;
}

.hero-glow-left {
  top: -160px;
  left: -120px;
}

.hero-glow-right {
  right: -120px;
  bottom: -180px;
  background: #f59e0b;
}

.hero-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: stretch;
}

.hero-slider {
  position: relative;
  min-height: 468px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 34px;
  align-items: center;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-copy h1 {
  margin: 14px 0 20px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -1px;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 24px;
  color: #ffedd5;
  font-size: clamp(17px, 2vw, 22px);
}

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

.eyebrow.dark {
  color: var(--brand);
}

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

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

.hero-tags span {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 13px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--red));
  box-shadow: 0 16px 34px rgba(234, 88, 12, 0.25);
}

.hero-section .primary-btn {
  color: var(--brand);
  background: #ffffff;
}

.ghost-btn {
  padding: 12px 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.rank-action:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  box-shadow: var(--shadow);
}

.hero-poster::after,
.poster-wrap::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.04));
  pointer-events: none;
}

.hero-poster span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  font-size: 24px;
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 18px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.hero-rank,
.side-panel,
.content-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-rank {
  padding: 24px;
}

.hero-rank h2,
.side-panel h2,
.content-card h2 {
  margin: 0 0 18px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

.compact-card img {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: var(--brand-soft);
}

.compact-info {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #ffffff;
}

.compact-info strong {
  color: #fed7aa;
  font-size: 13px;
}

.compact-title {
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-info span:last-child {
  color: #ffedd5;
  font-size: 13px;
}

.intro-strip,
.section-block {
  margin-top: 52px;
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 8px;
}

.intro-strip p,
.page-hero p,
.detail-lead,
.content-card p,
.movie-card p,
.category-card p,
.rank-main p {
  color: var(--muted);
}

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

.section-heading a {
  color: var(--brand);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 45px rgba(17, 24, 39, 0.14);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
}

.poster-wrap img,
.hero-poster img,
.detail-poster img,
.rank-poster img {
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img,
.hero-poster:hover img,
.rank-item:hover .rank-poster img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.76);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-meta {
  gap: 8px;
  margin-bottom: 10px;
}

.card-meta span {
  color: var(--brand-strong);
  background: var(--surface-soft);
  padding: 5px 9px;
}

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

.movie-card h2 a:hover {
  color: var(--brand);
}

.movie-card p {
  margin: 0 0 14px;
  font-size: 14px;
}

.tag-row span,
.tag-links a {
  padding: 5px 9px;
  color: #4b5563;
  background: #f3f4f6;
}

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

.side-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--dark), #7c2d12);
}

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

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

.category-card {
  min-height: 150px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--red));
  box-shadow: 0 16px 34px rgba(234, 88, 12, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 46px rgba(234, 88, 12, 0.26);
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: #ffedd5;
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--red));
  padding: 62px 0;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.page-hero p {
  max-width: 760px;
  color: #ffedd5;
  font-size: 18px;
}

.filter-section {
  margin-bottom: 64px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

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

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 96px minmax(0, 1fr) 90px;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--red));
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface-soft);
}

.rank-main h2 {
  margin: 0 0 8px;
}

.rank-main p {
  margin: 0 0 12px;
}

.rank-action {
  padding: 11px 16px;
  color: #ffffff;
  background: var(--brand);
}

.detail-hero {
  padding: 48px 0 66px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: var(--brand-soft);
  box-shadow: var(--shadow);
}

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

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.detail-lead {
  max-width: 820px;
  color: #ffedd5;
  font-size: 19px;
}

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

.detail-meta span {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-info .tag-links {
  margin-bottom: 28px;
}

.detail-info .tag-links a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.7));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.play-mask.is-hidden {
  display: none;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  border-radius: 999px;
  color: var(--brand);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

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

.content-card {
  padding: 26px;
  border-color: var(--line);
  color: var(--text);
  background: #ffffff;
}

.content-card p {
  margin: 0;
  font-size: 17px;
}

.related-grid .movie-card.small .poster-wrap {
  aspect-ratio: 3 / 4;
}

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
}

.site-footer p {
  color: #9ca3af;
}

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

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

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
}

.is-filter-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .desktop-nav {
    gap: 12px;
  }

  .hero-shell,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .hero-rank,
  .side-panel {
    position: relative;
    top: auto;
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .hero-section {
    padding-top: 48px;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 300px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid.large,
  .detail-content,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-action {
    grid-column: 2 / -1;
  }

  .intro-strip,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .hero-slider {
    min-height: 820px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-dots {
    bottom: 0;
  }

  .page-hero,
  .detail-hero {
    padding: 44px 0;
  }

  .mobile-nav {
    grid-template-columns: 1fr;
  }
}
