* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --surface: #0f172a;
  --surface-soft: rgba(15, 23, 42, 0.76);
  --surface-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  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.12), transparent 32rem),
    var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

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

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

.logo {
  font-size: 20px;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #111827;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.42);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--soft);
  font-size: 15px;
  font-weight: 650;
}

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-menu a {
  padding: 10px 12px;
  color: var(--soft);
  border-radius: 12px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-position: center;
  background-size: cover;
  filter: brightness(0.42) blur(2px);
  transform: scale(1.05);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, transparent 28%, transparent 75%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 120px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.simple-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero h2 {
  max-width: 780px;
  margin: 20px 0 0;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.05;
}

.hero-summary,
.simple-hero p {
  max-width: 760px;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.detail-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.24);
}

.btn-soft {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.08);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  font-size: 26px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.content-section,
.page-shell,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 78px 0;
}

.no-top-pad {
  padding-top: 0;
}

.surface-section,
.category-preview:nth-of-type(even) {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100% - 1240px) / 2));
  padding-left: max(16px, calc((100% - 1240px) / 2));
  background: rgba(15, 23, 42, 0.32);
}

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

.section-head h2,
.hot-panel h2,
.side-panel h2,
.text-block h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.03em;
}

.section-head p,
.hot-panel p {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: #fde68a;
  font-weight: 800;
}

.hot-entry {
  padding-top: 44px;
  padding-bottom: 0;
}

.hot-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(15, 23, 42, 0.74)),
    var(--surface);
  box-shadow: var(--shadow);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.poster-link img,
.category-tile img,
.rank-poster img,
.detail-cover,
.small-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.category-tile img {
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img {
  transform: scale(1.08);
}

.poster-gradient,
.tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 52%);
}

.year-badge,
.tile-count {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #111827;
  border-radius: 999px;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #111827;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-title:hover {
  color: var(--accent);
}

.movie-card-meta,
.movie-card-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
}

.movie-card-meta {
  min-height: 22px;
  margin: 7px 0;
  -webkit-line-clamp: 1;
}

.movie-card-desc {
  min-height: 42px;
  margin: 0;
  -webkit-line-clamp: 2;
}

.page-shell,
.detail-shell {
  padding: 42px 0 84px;
}

.simple-hero {
  position: relative;
  overflow: hidden;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

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

.category-tile a {
  position: relative;
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile em {
  margin-top: 8px;
  color: var(--soft);
  font-style: normal;
  line-height: 1.5;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto;
  gap: 16px;
  align-items: end;
  margin: 28px 0 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.wide-filter {
  grid-template-columns: minmax(240px, 1.5fr) 160px 180px 180px auto;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.68);
  padding: 0 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.58);
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.result-count strong {
  color: var(--accent);
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.rank-row {
  display: grid;
  grid-template-columns: 60px 82px minmax(0, 1fr) 110px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
}

.rank-num {
  color: var(--accent);
  font-size: 25px;
  font-weight: 950;
  text-align: center;
}

.rank-poster {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: var(--surface);
}

.rank-info a {
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.rank-info p,
.rank-info em {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
  -webkit-box-orient: vertical;
}

.rank-info em {
  -webkit-line-clamp: 2;
}

.rank-info p {
  -webkit-line-clamp: 1;
}

.rank-score {
  color: #111827;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--accent);
  text-align: center;
}

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

.breadcrumb a:hover {
  color: var(--accent);
}

.player-card {
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: #111827;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 16px 50px rgba(245, 158, 11, 0.28);
  font-size: 34px;
}

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

.player-message {
  min-height: 22px;
  margin: 0;
  padding: 10px 16px 16px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-main,
.detail-side .side-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-soft);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.detail-main {
  padding: 30px;
}

.detail-title-row {
  justify-content: space-between;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.meta-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.35);
}

.meta-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta-list dd {
  margin: 6px 0 0;
  color: var(--text);
  font-weight: 800;
}

.text-block {
  margin-top: 26px;
}

.text-block h2 {
  font-size: 24px;
}

.text-block p {
  color: var(--soft);
  font-size: 16px;
  line-height: 1.9;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 18px;
}

.side-panel h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.small-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.small-card:first-of-type {
  border-top: 0;
}

.small-card img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--surface);
}

.small-card strong,
.small-card em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.small-card strong {
  -webkit-line-clamp: 2;
}

.small-card em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  -webkit-line-clamp: 1;
}

.related-section {
  width: 100%;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 38px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.site-footer p,
.site-footer li {
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

.is-filtered-out {
  display: none;
}

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

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

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

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

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

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

  .detail-side {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 82vh;
  }

  .hero-content {
    padding-top: 78px;
  }

  .hero-actions,
  .hot-panel,
  .section-head,
  .detail-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .content-section {
    padding: 48px 0;
  }

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

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

  .movie-card-title {
    min-height: 44px;
    font-size: 15px;
  }

  .simple-hero {
    padding: 30px 22px;
  }

  .wide-filter,
  .filter-panel,
  .meta-list,
  .rank-row,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .rank-row {
    align-items: start;
  }

  .rank-poster {
    width: 88px;
  }

  .detail-main {
    padding: 22px;
  }
}

@media (max-width: 460px) {
  .poster-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
