:root {
  --brand-a: #ea580c;
  --brand-b: #dc2626;
  --brand-c: #f97316;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --panel: #ffffff;
  --dark: #0f172a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f3f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.24);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text {
  font-size: 22px;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fef3c7;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 10px 22px rgba(127, 29, 29, 0.18);
}

.header-search input,
.mobile-search input,
.large-search input,
.local-search {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.header-search input {
  width: 210px;
  padding: 9px 12px 9px 16px;
  border-radius: 999px;
  background: transparent;
}

.header-search button,
.mobile-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--brand-c), var(--brand-b));
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

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

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

.mobile-link {
  padding: 11px 12px;
  color: #fff;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-link.active {
  background: rgba(255, 255, 255, 0.2);
}

.hero {
  position: relative;
  height: clamp(430px, 62vw, 640px);
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 1.4s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.45), transparent 32%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.28) 48%, rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 64px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  color: #fff;
}

.hero-content h1,
.hero-content h2 {
  max-width: 840px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-kicker {
  margin-bottom: 14px;
}

.hero-kicker span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-kicker span {
  padding: 6px 12px;
  color: #fff;
  background: rgba(249, 115, 22, 0.85);
  backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.text-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.primary-btn,
.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--brand-c), var(--brand-b));
  box-shadow: 0 16px 36px rgba(220, 38, 38, 0.38);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 30px;
  background: #fff;
}

.home-search-panel {
  width: min(1000px, calc(100% - 32px));
  margin: -34px auto 30px;
  position: relative;
  z-index: 8;
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
}

.home-search-panel label {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
}

.home-search-panel form div {
  display: flex;
  gap: 12px;
}

.home-search-panel input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
}

.home-search-panel button {
  border: 0;
  border-radius: 18px;
  padding: 0 26px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
}

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

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 22px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.12;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--brand-a);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fb923c, #dc2626);
  overflow: hidden;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(220, 38, 38, 0.9);
}

.card-body {
  padding: 16px;
}

.tag-row {
  margin-bottom: 10px;
}

.tag-row span {
  padding: 4px 8px;
  color: var(--brand-a);
  background: #fff7ed;
}

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

.movie-card h3 a:hover,
.rank-info h2 a:hover,
.category-overview-card h2 a:hover {
  color: var(--brand-a);
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row {
  justify-content: space-between;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 700;
}

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

.category-tile {
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, #fb923c, #ef4444);
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 24px 54px rgba(220, 38, 38, 0.28);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.page-hero {
  padding: 74px 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(251, 146, 60, 0.42), transparent 35%),
    linear-gradient(90deg, #ea580c, #dc2626);
}

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

.page-hero p {
  margin: 0 0 12px;
  color: #ffedd5;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero span {
  max-width: 760px;
  display: block;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.filter-bar-wrap {
  padding-bottom: 0;
}

.filter-bar,
.large-search {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.local-search,
.large-search input {
  min-width: 260px;
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: #374151;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
}

.filter-pill.active,
.filter-pill:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
}

.empty-state {
  margin: 24px 0;
  border-radius: 22px;
  padding: 42px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.category-overview-grid {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 26px;
  align-items: center;
  border-radius: 26px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 94px 64px 1fr;
  gap: 18px;
  align-items: center;
  border-radius: 24px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.rank-cover img {
  width: 94px;
  height: 126px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-c), var(--brand-b));
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.rank-meta {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 800;
}

.detail-hero {
  min-height: 520px;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.48), transparent 32%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.34));
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

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

.detail-hero h1 {
  max-width: 880px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
}

.detail-hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.detail-tags span {
  padding: 6px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: -80px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.player-card,
.detail-text-card,
.info-card {
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
}

.player-card {
  padding: 14px;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.46));
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 36px;
  background: linear-gradient(135deg, var(--brand-c), var(--brand-b));
  box-shadow: 0 18px 50px rgba(220, 38, 38, 0.42);
}

.play-overlay.hidden {
  display: none;
}

.detail-text-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-text-card h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-text-card p {
  margin: 0 0 22px;
  color: #374151;
  font-size: 16px;
}

.info-card {
  padding: 24px;
  position: sticky;
  top: 92px;
}

.info-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 10px;
}

.info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  font-weight: 800;
}

.info-card a {
  color: var(--brand-a);
}

.related-section {
  padding-top: 46px;
}

.site-footer {
  margin-top: 50px;
  color: #cbd5e1;
  background: #111827;
}

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

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-inner p {
  margin: 0;
  max-width: 520px;
}

.footer-inner a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

  .info-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-arrow {
    display: none;
  }

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

  .section-title,
  .filter-bar,
  .large-search,
  .home-search-panel form div {
    align-items: stretch;
    flex-direction: column;
  }

  .category-overview-card,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

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

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

@media (max-width: 560px) {
  .header-inner {
    width: calc(100% - 22px);
  }

  .brand-text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-content {
    bottom: 54px;
  }

  .hero-actions {
    gap: 8px;
  }

  .primary-btn,
  .ghost-btn {
    min-height: 42px;
    padding: 0 16px;
    font-size: 14px;
  }

  .home-search-panel {
    margin-top: -22px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .page-hero {
    padding: 54px 0;
  }

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

  .detail-layout {
    width: calc(100% - 22px);
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
