:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(217, 119, 6, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 0%, rgba(146, 64, 14, 0.16), transparent 28rem),
    linear-gradient(180deg, #111827 0%, #020617 42%, #09090b 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon,
.footer-brand span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #92400e);
  box-shadow: 0 12px 34px rgba(217, 119, 6, 0.32);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(90deg, #fbbf24, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex: 1;
}

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.site-footer a:hover {
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #e5e7eb;
  background: rgba(31, 41, 55, 0.75);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid var(--line);
}

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

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

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 900ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  background: linear-gradient(135deg, #111827, #451a03);
}

.hero-slide img.image-hidden,
.detail-bg img.image-hidden,
.detail-poster img.image-hidden,
.poster-shell img.image-hidden,
.list-cover img.image-hidden {
  opacity: 0;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.25)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.06) 42%, rgba(2, 6, 23, 0.58) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 82px;
  max-width: 1180px;
}

.hero-kicker {
  margin: 0 0 14px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 680px;
  margin: 20px 0 0;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
  color: #cbd5e1;
}

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

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

.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.58);
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 12px;
  font-style: normal;
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.32);
}

.ghost-btn {
  color: #f8fafc;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.72);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.search-wrap {
  margin-top: -34px;
  position: relative;
  z-index: 10;
}

.search-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  min-height: 54px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.search-box span {
  color: var(--amber);
  font-size: 22px;
}

.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-chips button,
.category-switcher a,
.detail-cats a,
.quick-links a {
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.24);
  padding: 8px 14px;
  cursor: pointer;
}

.search-chips button.is-active {
  color: #fff;
  background: var(--amber-strong);
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.full-grid {
  align-items: stretch;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.54);
  box-shadow: 0 24px 58px rgba(120, 53, 15, 0.24);
}

.card-link,
.card-body,
.poster-shell {
  display: block;
}

.poster-shell {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(245, 158, 11, 0.2), transparent 14rem),
    linear-gradient(135deg, #111827, #0f172a 42%, #451a03);
}

.movie-card-large .poster-shell {
  aspect-ratio: 16 / 9;
}

.poster-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-shell img {
  transform: scale(1.08);
}

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

.play-circle,
.list-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(217, 119, 6, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.year-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  color: #fde68a;
}

.card-body {
  padding: 16px;
}

.card-body strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body em {
  display: -webkit-box;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-style: normal;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta b {
  color: #fbbf24;
  font-weight: 800;
}

.card-meta i {
  font-style: normal;
}

.band-section {
  margin-top: 64px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.48), rgba(2, 6, 23, 0.88));
  border-block: 1px solid var(--line);
  padding-bottom: 64px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.movie-list-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.78);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.5);
}

.list-link {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
}

.list-cover {
  position: relative;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #451a03);
}

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

.list-content {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
}

.list-content strong {
  color: #fff;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-content em {
  color: var(--muted);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-content span {
  color: var(--muted-2);
  font-size: 13px;
}

.side-panel,
.prose-card,
.story-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 26px;
  position: sticky;
  top: 90px;
}

.side-panel h2,
.prose-card h2,
.story-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
}

.side-panel p,
.prose-card p,
.story-card p {
  color: #cbd5e1;
  line-height: 1.9;
}

.quick-links,
.category-switcher,
.detail-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

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

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

.category-tile,
.category-card {
  display: grid;
  gap: 10px;
  min-height: 160px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.18), transparent 12rem),
    rgba(17, 24, 39, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
  border-color: rgba(245, 158, 11, 0.48);
}

.category-tile span,
.category-card span {
  color: #fbbf24;
  font-weight: 800;
}

.category-tile strong,
.category-card strong {
  color: #fff;
  font-size: 22px;
}

.category-tile em,
.category-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.18), transparent 28rem),
    linear-gradient(135deg, #111827, #020617 70%);
  border-bottom: 1px solid var(--line);
}

.page-hero .container {
  padding: 72px 0 52px;
}

.slim-hero .container {
  padding-top: 82px;
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  line-height: 1.8;
}

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

.breadcrumb a {
  color: #fbbf24;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  filter: blur(16px);
  transform: scale(1.08);
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #451a03);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.detail-info {
  padding-bottom: 14px;
}

.detail-one-line {
  max-width: 780px;
  margin: 20px 0 0;
  color: #d1d5db;
  font-size: 20px;
  line-height: 1.75;
}

.player-section {
  margin-top: -80px;
  position: relative;
  z-index: 5;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(217, 119, 6, 0.2), rgba(0, 0, 0, 0.56));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
  box-shadow: 0 18px 50px rgba(217, 119, 6, 0.36);
  font-size: 30px;
}

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

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

.detail-content {
  padding-top: 34px;
}

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

.story-card {
  padding: 30px;
}

.story-card h2 + p {
  margin-top: 0;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted-2);
}

.detail-side dd {
  margin: 0;
  color: #e5e7eb;
}

.prose-card {
  margin-top: 40px;
  padding: 34px;
}

.site-footer {
  margin-top: 86px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.68), #020617);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

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

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom div {
  display: flex;
  gap: 18px;
}

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

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 620px;
  }

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

  .hero-dots {
    left: 16px;
    right: auto;
  }

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

  .large-grid,
  .category-grid,
  .category-grid-wide,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    padding-top: 42px;
    gap: 28px;
  }

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

  .list-link {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .list-cover {
    height: 82px;
  }

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

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

  .brand-text em {
    display: none;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .poster-grid,
  .ranking-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body strong {
    font-size: 15px;
  }

  .card-body em,
  .card-tags {
    display: none;
  }

  .hero-actions,
  .detail-meta,
  .hero-meta {
    gap: 8px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }
}
