:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.66);
  --panel-deep: #111827;
  --line: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.16);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.12), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  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: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(51, 65, 85, 0.78);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #0f172a;
  box-shadow: 0 12px 36px rgba(251, 191, 36, 0.28);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted-strong);
  font-weight: 600;
}

.nav-links a,
.mobile-menu a,
.footer-links a {
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.nav-search {
  display: flex;
  width: min(280px, 28vw);
  border: 1px solid rgba(51, 65, 85, 0.96);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
  overflow: hidden;
}

.nav-search input,
.mobile-menu input,
.toolbar input,
.toolbar select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  flex: 1;
  padding: 10px 14px;
}

.nav-search button,
.mobile-menu button,
.toolbar button {
  border: 0;
  color: #0f172a;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.7);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
}

.mobile-menu.is-open {
  display: grid;
  gap: 14px;
}

.mobile-menu form {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.78);
}

.mobile-menu input {
  flex: 1;
  padding: 12px 14px;
}

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

main {
  padding-top: 68px;
}

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

.hero-slider {
  position: relative;
  height: clamp(560px, 78vh, 760px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 4s ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1.07);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0f172a 4%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.18));
}

.hero-copy {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: clamp(54px, 10vh, 100px);
  max-width: 760px;
}

.kicker,
.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  max-width: 900px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.8vw, 1.24rem);
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #0f172a;
  background: var(--accent);
  box-shadow: 0 14px 40px rgba(251, 191, 36, 0.28);
}

.btn-secondary,
.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.64);
}

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

.hero-dots {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 26px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 30px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

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

.section {
  padding: 58px 0 0;
}

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

.page-head {
  display: block;
  padding: 60px 0 22px;
}

.section-title,
.page-title {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-desc,
.page-desc {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.movie-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.64);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.poster-wrap img,
.rail-poster img,
.wide-poster img,
.rank-item img,
.detail-poster img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.04) 58%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.year-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.year-badge {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.play-chip {
  left: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  color: #0f172a;
  background: var(--accent);
}

.card-body,
.rail-title,
.rail-meta,
.wide-info,
.rank-copy {
  min-width: 0;
}

.card-title,
.rail-title,
.wide-title,
.rank-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-weight: 800;
  line-height: 1.35;
}

.movie-card:hover .card-title,
.rail-card:hover .rail-title,
.wide-card:hover .wide-title,
.rank-item:hover .rank-title {
  color: var(--accent);
}

.card-meta,
.rail-meta,
.rank-meta,
.wide-kicker {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-desc,
.wide-desc,
.rank-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.tag-row span,
.info-pill,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.72);
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.78rem;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(235px, 280px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scrollbar-width: thin;
}

.rail-card {
  display: grid;
  gap: 11px;
}

.rail-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.66);
}

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

.wide-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.68);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.5);
  transition: background 0.24s ease, transform 0.24s ease;
}

.wide-card:hover,
.rank-item:hover,
.category-card:hover {
  background: rgba(30, 41, 59, 0.82);
  transform: translateY(-3px);
}

.wide-poster {
  position: relative;
  min-height: 210px;
  overflow: hidden;
}

.wide-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

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

.category-card {
  position: relative;
  display: grid;
  min-height: 188px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.74);
  border-radius: 22px;
  background: var(--panel-soft);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.46));
}

.category-card-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.category-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.46);
  transition: background 0.24s ease, transform 0.24s ease;
}

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

.rank-item img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.46);
}

.toolbar input,
.toolbar select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(51, 65, 85, 0.96);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.toolbar input {
  flex: 1 1 260px;
}

.toolbar select {
  flex: 0 1 220px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.breadcrumb a,
.breadcrumb span,
.info-pill {
  padding: 6px 10px;
  font-size: 0.86rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  margin-bottom: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.6);
  box-shadow: var(--shadow);
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border: 1px solid rgba(51, 65, 85, 0.74);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.44);
}

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

.detail-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.08rem;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: linear-gradient(to top, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 900;
}

.player-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: var(--accent);
  box-shadow: 0 20px 60px rgba(251, 191, 36, 0.28);
  font-size: 2rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-top: 30px;
}

.article-panel,
.side-panel {
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.42);
}

.article-panel {
  padding: 28px;
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
}

.article-panel p {
  margin: 0 0 20px;
  color: var(--muted-strong);
}

.side-panel {
  height: fit-content;
  padding: 20px;
}

.side-link {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.58);
}

.side-link:last-child {
  border-bottom: 0;
}

.side-link img {
  width: 62px;
  height: 82px;
  object-fit: cover;
  border-radius: 10px;
}

.side-link span {
  display: block;
}

.side-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-weight: 800;
}

.side-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.related-grid {
  margin-top: 28px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(15, 23, 42, 0.84);
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.footer-grid p {
  max-width: 520px;
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  border-top: 1px solid rgba(51, 65, 85, 0.64);
  color: var(--muted);
  text-align: center;
}

.empty-state {
  display: none;
  padding: 34px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 20px;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.44);
}

.empty-state.is-visible {
  display: block;
}

@media (max-width: 980px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

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

@media (max-width: 680px) {
  .nav-shell {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-slider {
    height: 620px;
  }

  .hero-copy {
    bottom: 70px;
  }

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

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

  .wide-poster {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .rank-item {
    grid-template-columns: 44px 74px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-num {
    width: 36px;
    height: 36px;
  }

  .article-panel,
  .detail-copy,
  .side-panel {
    padding: 20px;
  }
}
