:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --amber: #f59e0b;
  --amber-2: #d97706;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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, black, transparent 72%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--amber), #f97316);
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.32);
}

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

.main-nav a {
  color: var(--muted-2);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: white;
  background: rgba(245, 158, 11, 0.16);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: white;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 500px;
  height: 70vh;
  max-height: 800px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, var(--bg), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  padding-top: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  color: var(--muted-2);
  font-size: clamp(17px, 2vw, 22px);
  max-width: 620px;
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin: 28px 0 32px;
}

.hero-meta strong {
  color: #fbbf24;
  font-size: 26px;
}

.hero-meta span,
.detail-meta span,
.meta-line span {
  color: var(--muted-2);
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 16px;
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--amber), #f97316);
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.28);
}

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

.btn-ghost {
  color: white;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 46px;
  background: var(--amber);
}

.search-entrance {
  margin-top: -42px;
  position: relative;
  z-index: 8;
}

.search-panel,
.filter-bar,
.search-large {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: 26px;
}

.search-panel h2,
.ranking-panel h2,
.detail-side h2,
.detail-article h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.search-panel p,
.page-hero p,
.category-card p,
.detail-one-line,
.detail-article p,
.detail-side dd,
.footer-grid p {
  color: var(--muted-2);
}

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

.home-search input,
.search-large input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  color: white;
  background: rgba(2, 6, 23, 0.7);
  border-radius: 16px;
  padding: 13px 16px;
  outline: none;
}

.home-search button,
.search-large button {
  border: 0;
  color: white;
  background: var(--amber);
  border-radius: 16px;
  padding: 0 22px;
  font-weight: 800;
}

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

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

.section-heading h2,
.page-hero h1 {
  margin: 0;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
}

.section-heading a {
  color: #fbbf24;
  font-weight: 700;
}

.poster-grid,
.wide-grid,
.category-grid,
.category-card-grid {
  display: grid;
  gap: 18px;
}

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

.five-col {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

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

.offset-grid {
  margin-top: 22px;
}

.movie-card {
  display: block;
  color: white;
  min-width: 0;
}

.poster-wrap,
.movie-card-wide,
.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.poster-wrap {
  border-radius: 18px;
  aspect-ratio: 2 / 3;
}

.poster-wrap img,
.movie-card-wide img,
.category-tile img,
.category-card img,
.detail-poster img,
.compact-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card:hover .poster-wrap,
.movie-card-wide:hover,
.category-tile:hover,
.category-card:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.poster-shade,
.card-shade,
.category-shade,
.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent 55%);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  opacity: 0;
  transform: scale(0.78);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.movie-card:hover .play-hover,
.movie-card-wide:hover .play-hover {
  opacity: 1;
  transform: scale(1);
  background: rgba(0, 0, 0, 0.22);
}

.year-pill,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  background: rgba(0, 0, 0, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  right: auto;
  background: rgba(245, 158, 11, 0.9);
}

.card-copy {
  padding: 12px 2px 0;
}

.card-copy h3,
.wide-copy h3 {
  margin: 0;
  color: white;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.movie-card:hover h3,
.movie-card-wide:hover h3,
.compact-card:hover strong {
  color: #fbbf24;
}

.card-copy p,
.wide-copy p {
  margin: 7px 0 9px;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: #64748b;
}

.movie-card-wide {
  min-height: 240px;
  border-radius: var(--radius);
}

.movie-card-wide img {
  position: absolute;
  inset: 0;
}

.wide-copy {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 22px;
}

.wide-copy h3 {
  font-size: 22px;
}

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

.category-tile {
  min-height: 210px;
  border-radius: 20px;
}

.category-tile strong {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  font-size: 22px;
}

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

.ranking-panel,
.detail-side,
.detail-article {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.compact-card {
  display: grid;
  grid-template-columns: auto 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.compact-card:last-child {
  border-bottom: 0;
}

.compact-card img {
  width: 54px;
  height: 76px;
  border-radius: 10px;
}

.compact-card strong {
  display: block;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.compact-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  margin-top: 4px;
}

.compact-rank {
  display: inline-flex;
  justify-content: center;
  width: 28px;
  color: #fbbf24;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.25), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.small-hero {
  padding: 84px 0 70px;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

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

.category-card {
  min-height: 260px;
  border-radius: 24px;
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-card div {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.category-card strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.category-card p {
  margin: 0;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 200px 180px;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  margin-bottom: 28px;
}

.search-large {
  padding: 16px;
  border-radius: 22px;
  margin-bottom: 30px;
}

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

.detail-hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) scale(1.02);
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.94)),
    linear-gradient(to top, var(--bg), transparent 36%);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 56px 0 70px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

.detail-copy h1 {
  font-size: clamp(42px, 6vw, 76px);
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 24px;
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 18px;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.tag-row span {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.watch-section {
  padding-top: 34px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.5));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), #f97316);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.32);
  font-size: 38px;
  padding-left: 6px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.detail-article h2:not(:first-child) {
  margin-top: 30px;
}

.detail-article p {
  font-size: 17px;
  margin: 0;
}

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
  font-size: 13px;
  margin-top: 16px;
}

.detail-side dt:first-child {
  margin-top: 0;
}

.detail-side dd {
  margin: 5px 0 0;
}

.ranking-list {
  columns: 2;
  column-gap: 28px;
  margin-top: 28px;
}

.ranking-list .compact-card {
  break-inside: avoid;
}

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

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

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid a:not(.brand) {
  display: block;
  color: var(--muted-2);
  margin: 8px 0;
  transition: color 0.25s ease;
}

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

.footer-brand {
  margin-bottom: 16px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  color: var(--muted);
  font-size: 14px;
}

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

@media (max-width: 1120px) {
  .six-col,
  .five-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-carousel {
    height: 72vh;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .filter-bar,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .home-search button,
  .search-large button {
    min-height: 46px;
  }

  .six-col,
  .five-col,
  .four-col,
  .wide-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    gap: 26px;
  }

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

  .ranking-list {
    columns: 1;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

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

  .section-block {
    padding-top: 52px;
  }

  .six-col,
  .five-col,
  .four-col,
  .wide-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-card-wide {
    grid-column: 1 / -1;
  }

  .card-copy p,
  .meta-line {
    display: none;
  }

  .player-shell {
    border-radius: 18px;
  }
}
