:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --blue: #1d4ed8;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(29, 78, 216, 0.22), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0b1735 46%, #020617 100%);
}

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: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

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

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

.brand-text {
  font-size: 1.42rem;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--muted);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  color: #fbbf24;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 8px 8px 12px;
}

.nav-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.primary-btn {
  background: linear-gradient(90deg, var(--amber), var(--amber-dark));
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(15, 23, 42, 0.44);
}

.nav-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.hero-carousel {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.1) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 48%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 88px;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 14px 44px rgba(0, 0, 0, 0.54);
}

.hero-copy p {
  margin: 0;
  max-width: 680px;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 0.78rem;
  font-weight: 750;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.52);
  cursor: pointer;
  font-size: 2.2rem;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--amber);
}

.intro-panel,
.page-hero,
.filter-panel,
.ranking-panel,
.search-large-panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.52));
  box-shadow: var(--shadow);
}

.intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: -42px;
  padding: 34px;
  position: relative;
  z-index: 6;
}

.intro-panel h1,
.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.intro-panel p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.no-top-gap {
  margin-top: 26px;
}

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

.section-head h2,
.filter-panel h2,
.site-footer h2,
.story-card h2 {
  margin: 8px 0 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.section-head a {
  color: #fbbf24;
  font-weight: 800;
}

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

.media-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.media-card:hover {
  border-color: rgba(245, 158, 11, 0.46);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade,
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.86));
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(2, 6, 23, 0.74);
  font-size: 0.78rem;
  font-weight: 850;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: #fbbf24;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.88rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

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

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

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile strong {
  bottom: 70px;
  font-size: 1.35rem;
}

.category-tile em {
  bottom: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.5;
}

.ranking-panel {
  padding: 30px;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(2, 6, 23, 0.38);
}

.ranking-list a:hover {
  border-color: rgba(245, 158, 11, 0.48);
}

.ranking-list span {
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: 900;
}

.ranking-list strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-list em {
  max-width: 160px;
  overflow: hidden;
  color: var(--soft);
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-main {
  padding: 44px 0 0;
}

.page-hero {
  padding: clamp(26px, 5vw, 54px);
  overflow: hidden;
}

.slim-hero {
  min-height: 250px;
}

.category-hero {
  position: relative;
}

.hero-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-link-row a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.34);
}

.hero-link-row a:hover {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.44);
}

.filter-panel,
.search-large-panel {
  margin-top: 26px;
  padding: 24px;
}

.filter-controls,
.large-search {
  display: grid;
  grid-template-columns: 1fr 170px 170px 150px;
  gap: 12px;
  margin-top: 18px;
}

.large-search {
  grid-template-columns: 1fr auto;
}

.filter-controls input,
.filter-controls select,
.large-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 13px 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.52);
}

.filter-controls select {
  appearance: none;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 26px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(15, 23, 42, 0.78);
}

.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 5;
}

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

.category-cover span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(2, 6, 23, 0.66);
  font-weight: 800;
}

.category-overview-card h2 {
  margin: 2px 0 10px;
}

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

.category-overview-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-overview-card a:hover {
  color: #fbbf24;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) saturate(1.2);
  transform: scale(1.08);
  opacity: 0.36;
}

.detail-bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58)),
    linear-gradient(0deg, #020617, transparent 56%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 34px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--soft);
  font-size: 0.92rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
  margin-top: 34px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  color: #e2e8f0;
  font-size: 1.15rem;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
}

.watch-section {
  margin-top: -48px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: calc(var(--radius) + 8px);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  border: 0;
  color: #fff;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.18);
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.play-pulse {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 0 0 14px rgba(245, 158, 11, 0.16);
  font-size: 2.4rem;
}

.player-overlay strong {
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 30px;
}

.story-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(15, 23, 42, 0.76);
}

.story-card p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.9;
}

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

.search-page .movie-grid:empty::before {
  content: "输入关键词后显示相关影片";
  display: block;
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 44px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.site-footer p {
  color: var(--soft);
  line-height: 1.8;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--muted);
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px;
  color: var(--soft);
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

  .nav-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
  }

  .brand-text {
    font-size: 1.12rem;
  }

  .nav-search {
    display: none;
  }

  .hero-carousel {
    height: 76vh;
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-panel,
  .section-head,
  .footer-grid {
    display: block;
  }

  .intro-panel .primary-btn {
    margin-top: 22px;
  }

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

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

  .category-overview-card {
    grid-template-columns: 130px 1fr;
  }

  .ranking-list {
    grid-template-columns: 1fr;
  }

  .ranking-list a {
    grid-template-columns: 42px 1fr;
  }

  .ranking-list em {
    grid-column: 2;
  }

  .filter-controls,
  .large-search {
    grid-template-columns: 1fr;
  }

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

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

  .watch-section {
    margin-top: -24px;
  }
}

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

  .hero-copy h1 {
    font-size: 2.45rem;
  }

  .movie-grid,
  .ranking-grid,
  .related-grid {
    gap: 12px;
  }

  .card-body {
    padding: 11px;
  }

  .card-body p {
    display: none;
  }

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

  .category-cover {
    max-height: 240px;
  }

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

  .play-pulse {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
}
