:root {
  --page-bg: #05070d;
  --panel-bg: rgba(19, 24, 36, 0.78);
  --panel-solid: #111827;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(245, 158, 11, 0.38);
  --text-main: #f9fafb;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --gold: #f59e0b;
  --gold-deep: #b45309;
  --red: #ef4444;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --shadow-glow: 0 24px 80px rgba(245, 158, 11, 0.18);
  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 36rem),
    radial-gradient(circle at 85% 8%, rgba(220, 38, 38, 0.11), transparent 30rem),
    linear-gradient(180deg, #05070d 0%, #090d16 52%, #05070d 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 80%);
  z-index: -1;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #111827;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #facc15, #f59e0b 52%, #b45309);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.35);
}

.brand-name {
  font-size: 22px;
  color: #fbbf24;
}

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

.nav-link,
.mobile-link,
.footer-links a,
.footer-category-links a {
  color: var(--text-soft);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active,
.footer-links a:hover,
.footer-category-links a:hover {
  color: #fbbf24;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(330px, 26vw);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.65);
}

.header-search input,
.mobile-search input,
.large-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text-main);
  background: transparent;
}

.header-search input {
  padding: 11px 12px;
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-btn,
.ghost-btn,
.section-link {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-btn {
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, #facc15, #f59e0b);
}

.header-search button {
  padding: 11px 14px;
  border-radius: 0;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.8);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fbbf24;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  padding: 16px 22px 20px;
  background: rgba(5, 7, 13, 0.96);
}

.mobile-link {
  display: block;
  padding: 12px 0;
}

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

.mobile-search input {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.72);
}

.mobile-search button {
  padding: 0 16px;
}

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-cats a {
  padding: 7px 11px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transform: scale(1.04);
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 13, 0.98) 0%, rgba(5, 7, 13, 0.82) 38%, rgba(5, 7, 13, 0.25) 100%),
    linear-gradient(0deg, #05070d 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1380px;
  margin: 0 auto;
  min-height: 720px;
  padding: 130px 22px 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-kicker,
.section-kicker,
.category-overview-card span {
  display: inline-block;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  max-width: 850px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: var(--text-soft);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-tags,
.detail-meta,
.ranking-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-tags span,
.detail-meta span,
.ranking-meta span,
.tag-row span {
  padding: 7px 11px;
  color: #fde68a;
  font-size: 13px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.26);
}

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

.primary-btn,
.ghost-btn {
  padding: 14px 22px;
  font-weight: 800;
}

.ghost-btn,
.section-link {
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.34);
  background: rgba(17, 24, 39, 0.64);
}

.primary-btn:hover,
.ghost-btn:hover,
.large-search button:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.hero-control-panel {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 32px;
  width: min(1336px, calc(100% - 44px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.hero-dots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.hero-dot,
.hero-arrow {
  color: var(--text-main);
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(14px);
}

.hero-dot {
  min-height: 74px;
  padding: 12px;
  text-align: left;
  border-radius: 16px;
}

.hero-dot span {
  color: var(--gold);
  font-weight: 900;
}

.hero-dot strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-dot.is-active {
  border-color: var(--line-strong);
  background: rgba(120, 53, 15, 0.55);
}

.hero-arrow {
  width: 46px;
  height: 74px;
  border-radius: 16px;
  font-size: 32px;
  cursor: pointer;
}

.search-hero-panel,
.content-section,
.page-hero,
.detail-inner,
.site-footer .footer-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.search-hero-panel {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.78), rgba(120, 53, 15, 0.26));
  box-shadow: var(--shadow-card);
}

.search-panel-copy span {
  color: #fbbf24;
  font-weight: 900;
}

.search-panel-copy h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 38px);
}

.large-search {
  display: flex;
  gap: 12px;
}

.large-search input {
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 16px;
  background: rgba(5, 7, 13, 0.56);
}

.large-search button {
  padding: 0 26px;
}

.content-section {
  padding-top: 52px;
  padding-bottom: 20px;
}

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

.section-heading h2 {
  margin: 7px 0 8px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
}

.section-link {
  padding: 11px 15px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(17, 24, 39, 0.62);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow-card);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.22), rgba(17, 24, 39, 0.9));
}

.poster-wrap img,
.ranking-poster img,
.category-cover-wall img,
.category-images img,
.rank-item img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform 0.45s ease;
}

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 7, 13, 0.78) 100%);
}

.year-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  color: #111827;
  background: #fbbf24;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(5, 7, 13, 0.72);
}

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

.movie-title {
  display: block;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-title:hover,
.ranking-card h2 a:hover,
.category-overview-card h2 a:hover {
  color: #fbbf24;
}

.movie-meta,
.movie-desc,
.category-overview-card p,
.ranking-card p,
.text-panel p,
.site-footer p {
  color: var(--text-muted);
  line-height: 1.72;
}

.movie-meta {
  margin: 8px 0 8px;
  font-size: 13px;
}

.movie-desc {
  min-height: 3.4em;
  margin: 0;
  font-size: 14px;
}

.tag-row {
  margin-top: 12px;
  gap: 7px;
}

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 62px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.rank-number {
  color: #fbbf24;
  font-size: 22px;
  font-weight: 950;
}

.rank-item img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--panel-solid);
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy em {
  margin-top: 5px;
  color: var(--text-muted);
  font-style: normal;
  font-size: 13px;
}

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

.category-tile {
  padding: 18px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.78), rgba(120, 53, 15, 0.22));
  box-shadow: var(--shadow-card);
}

.category-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 86px;
}

.category-images img {
  min-width: 0;
  border-radius: 10px;
  background: var(--panel-solid);
}

.category-tile strong,
.category-overview-card h2 {
  font-size: 23px;
}

.category-tile em,
.category-tile small,
.category-overview-card em {
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.65;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.compact-hero {
  margin-top: 32px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 75% 10%, rgba(245, 158, 11, 0.26), transparent 26rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.88), rgba(5, 7, 13, 0.78));
  box-shadow: var(--shadow-card);
}

.page-search-form {
  width: min(860px, 100%);
  margin-top: 26px;
}

.result-count {
  color: var(--text-muted);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(17, 24, 39, 0.64);
}

.category-cover-wall {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  height: 170px;
}

.category-cover-wall img {
  min-width: 0;
  border-radius: 14px;
  background: var(--panel-solid);
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(17, 24, 39, 0.66);
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: var(--panel-solid);
}

.ranking-poster span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 7px 9px;
  color: #111827;
  font-weight: 950;
  border-radius: 999px;
  background: #fbbf24;
}

.ranking-card h2 {
  margin: 6px 0 8px;
}

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

.detail-inner {
  position: relative;
  z-index: 2;
  padding-top: 34px;
  padding-bottom: 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: end;
  min-height: 560px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-xl);
  background: var(--panel-solid);
  box-shadow: var(--shadow-glow);
}

.detail-copy h1 {
  margin-top: 12px;
  font-size: clamp(42px, 6vw, 74px);
}

.detail-player-section {
  margin-top: -36px;
  position: relative;
  z-index: 3;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow-card);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.big-play {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--text-main);
  border: 0;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.18), rgba(5, 7, 13, 0.76));
  cursor: pointer;
}

.big-play span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #facc15, #f59e0b),
    #f59e0b;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: scale(0.54);
  box-shadow: 0 0 0 18px rgba(245, 158, 11, 0.18);
}

.big-play strong {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.7);
}

.player-shell.is-playing .big-play {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  color: #fecaca;
  text-align: center;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-panel {
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(17, 24, 39, 0.68);
}

.text-panel h2 {
  margin: 10px 0 12px;
}

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

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.78);
}

.footer-inner {
  padding-top: 34px;
  padding-bottom: 34px;
  display: grid;
  grid-template-columns: 1.2fr 0.55fr 1.4fr;
  gap: 28px;
}

.footer-brand {
  color: #fbbf24;
  font-size: 24px;
}

.footer-links,
.footer-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-content: start;
}

.footer-links a,
.footer-category-links a {
  font-size: 14px;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-slider,
  .hero-content {
    min-height: 650px;
  }

  .hero-content {
    padding-top: 92px;
    padding-bottom: 180px;
  }

  .hero-dots {
    display: none;
  }

  .hero-control-panel {
    grid-template-columns: auto auto;
    justify-content: start;
  }

  .search-hero-panel,
  .detail-layout,
  .detail-text-grid,
  .footer-inner,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    min-height: auto;
    padding-top: 42px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

  .large-search {
    flex-direction: column;
  }

  .large-search button {
    min-height: 52px;
  }

  .category-cover-wall {
    height: 130px;
  }
}

@media (max-width: 680px) {
  .header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.03em;
  }

  .content-section,
  .search-hero-panel,
  .page-hero,
  .detail-inner,
  .site-footer .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .movie-title {
    font-size: 15px;
  }

  .movie-desc,
  .tag-row {
    display: none;
  }

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

  .ranking-card {
    grid-template-columns: 96px 1fr;
    gap: 14px;
  }

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

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

  .detail-player-section {
    margin-top: -18px;
  }
}
