:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: rgba(30, 41, 59, 0.68);
  --panel-solid: #1e293b;
  --panel-soft: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #fbbf24;
  --accent-2: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

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

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

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

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

.nav-container {
  width: min(1180px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.32);
}

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

.nav-link {
  color: var(--soft);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
  color: #fff;
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search button,
.primary-btn,
.ghost-btn,
.filter-chip,
.search-panel button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.primary-btn,
.search-panel button {
  color: #111827;
  background: var(--accent);
}

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

.header-search button:hover,
.primary-btn:hover,
.search-panel button:hover {
  background: #fcd34d;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.78);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 3px;
  background: #fff;
}

.mobile-panel {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.97);
}

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  color: var(--soft);
  font-weight: 700;
}

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

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

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

.hero-image-layer {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: transform 5s ease;
}

.hero-slide.active .hero-image-layer {
  transform: scale(1.08);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.62) 42%, rgba(15, 23, 42, 0.12)), linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.18) 46%, rgba(15, 23, 42, 0.48) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 72px;
  padding-bottom: 140px;
}

.hero-badges,
.hero-actions,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-badges span,
.tag-pill,
.year-badge,
.rank-badge,
.eyebrow,
.detail-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.13);
  color: var(--accent);
}

.hero-badges span {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions {
  margin-top: 26px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
}

.ghost-btn {
  color: #fff;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

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

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

.hero-dot.active {
  background: var(--accent);
}

.hero-thumb-row {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  transform: translateX(-50%);
}

.hero-thumb {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.hero-thumb img {
  width: 76px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
}

.page-main {
  padding: 56px 0 76px;
}

.section-block {
  margin-top: 64px;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.page-intro,
.card-meta,
.wide-copy p,
.rank-item p,
.detail-summary p,
.site-footer p,
.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

.section-head a {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  box-shadow: var(--shadow);
}

.poster-link img,
.wide-cover img,
.rank-thumb img,
.detail-poster img,
.related-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poster-link:hover img,
.wide-card:hover img,
.rank-item:hover img,
.related-mini:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 58%);
  opacity: 0.62;
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 8px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  justify-content: center;
  border-radius: 12px;
  font-weight: 900;
}

.hover-summary {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-link:hover .hover-summary {
  transform: translateY(0);
  opacity: 1;
}

.card-body {
  padding: 13px 2px 0;
}

.card-body h3,
.wide-copy h3,
.rank-item h3,
.detail-copy h1,
.category-card h2,
.related-mini h3 {
  margin: 0;
}

.card-body h3 {
  font-size: 16px;
  line-height: 1.4;
}

.card-body h3 a,
.wide-copy h3 a,
.rank-item h3 a,
.related-mini h3 a {
  transition: color 0.2s ease;
}

.card-body h3 a:hover,
.wide-copy h3 a:hover,
.rank-item h3 a:hover,
.related-mini h3 a:hover {
  color: var(--accent);
}

.card-meta {
  margin: 6px 0 10px;
  font-size: 13px;
}

.tag-pill {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

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

.wide-card,
.rank-item,
.category-card,
.search-panel,
.detail-hero,
.detail-player,
.detail-summary,
.filter-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.wide-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  overflow: hidden;
  border-radius: 22px;
}

.wide-cover {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: #111827;
}

.play-dot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 34px;
  background: rgba(2, 6, 23, 0.28);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wide-card:hover .play-dot {
  opacity: 1;
}

.wide-copy {
  padding: 24px;
}

.eyebrow {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 88px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #111827;
  background: var(--accent);
  font-weight: 900;
}

.rank-thumb {
  display: block;
  height: 112px;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-item p {
  margin: 7px 0;
  font-size: 14px;
}

.rank-item span {
  color: var(--soft);
  font-size: 13px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 26px;
  border-radius: 24px;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -30% 38% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  filter: blur(5px);
}

.category-card h2 {
  position: relative;
  font-size: 24px;
}

.category-card p {
  position: relative;
  min-height: 78px;
  margin: 12px 0 24px;
}

.category-card a {
  position: relative;
  color: var(--accent);
  font-weight: 900;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 18px;
}

.filter-panel input,
.search-panel input {
  flex: 1;
  min-width: 220px;
  padding: 13px 14px;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(15, 23, 42, 0.76);
}

.filter-chip {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.78);
}

.filter-chip.active,
.filter-chip:hover {
  color: #111827;
  background: var(--accent);
}

.search-panel {
  display: flex;
  gap: 12px;
  margin: 26px 0 36px;
  padding: 18px;
  border-radius: 22px;
}

.search-panel button {
  padding: 0 22px;
  border-radius: 13px;
}

.search-results:empty::before {
  content: "输入片名、类型、地区或年份，快速找到想看的内容。";
  display: block;
  color: var(--muted);
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  padding: 28px;
  border-radius: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 700;
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-line {
  color: var(--soft);
  font-size: 20px;
  line-height: 1.75;
}

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

.detail-badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

.detail-player {
  margin-top: 34px;
  overflow: hidden;
  border-radius: 28px;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.12), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  z-index: 2;
}

.player-overlay.is-hidden {
  display: none;
}

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 26px;
  border-radius: 999px;
  background: var(--accent);
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(251, 191, 36, 0.32);
}

.player-copy {
  padding: 24px;
}

.player-copy h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.player-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.detail-summary {
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
}

.detail-summary h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

.related-mini {
  min-width: 0;
}

.related-mini a:first-child {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.related-mini h3 {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.4;
}

.site-footer {
  padding: 48px 0 22px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.45);
}

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

.footer-logo {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

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

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

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

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

  .hero-thumb-row {
    display: none;
  }

  .hero-dots {
    bottom: 34px;
  }

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

  .hero-gradient {
    background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.58) 55%, rgba(15, 23, 42, 0.28));
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 86px;
  }

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

  .wide-grid,
  .rank-list,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .wide-cover {
    aspect-ratio: 16 / 9;
    min-height: auto;
  }

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

@media (max-width: 620px) {
  .container,
  .nav-container,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 40px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 38px 74px 1fr;
    gap: 10px;
  }

  .rank-thumb {
    height: 98px;
  }

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

  .search-panel button {
    min-height: 46px;
  }

  .detail-hero,
  .detail-summary,
  .player-copy {
    padding: 18px;
  }
}
