:root {
  color-scheme: dark;
  --bg: #08090d;
  --bg-soft: #11131b;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f8fafc;
  --muted: #a8b3c7;
  --line: rgba(255, 255, 255, 0.12);
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --rose: #f43f5e;
  --cyan: #22d3ee;
  --green: #34d399;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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.20), transparent 28rem),
    radial-gradient(circle at top right, rgba(244, 63, 94, 0.16), transparent 24rem),
    linear-gradient(135deg, #07080d 0%, #11121a 50%, #07080d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.scrolled,
.site-header.menu-open {
  background: rgba(8, 9, 13, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b 55%, #f97316);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 20px;
  color: #ffffff;
}

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

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel);
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 120px 0 70px;
}

.hero-track,
.hero-slide,
.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.9s ease, transform 1.3s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.50;
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 7, 12, 0.96) 0%, rgba(5, 7, 12, 0.74) 42%, rgba(5, 7, 12, 0.24) 100%),
    linear-gradient(180deg, rgba(5, 7, 12, 0.18) 0%, #08090d 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 32px));
  margin-left: max(16px, calc((100% - 1240px) / 2));
  padding-top: 70px;
}

.hero-kicker,
.eyebrow {
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-copy .one-line {
  color: rgba(248, 250, 252, 0.80);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.9;
}

.hero-tags,
.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span,
.detail-tags span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.10);
  font-size: 13px;
}

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

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

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b 62%, #f97316);
  box-shadow: 0 16px 35px rgba(245, 158, 11, 0.30);
}

.ghost-button {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-panel {
  position: relative;
  z-index: 4;
  width: min(1240px, calc(100% - 32px));
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 18px;
  align-items: stretch;
}

.search-panel,
.stat-card,
.filter-panel,
.player-card,
.text-card,
.info-card,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  padding: 18px;
}

.search-panel label,
.filter-panel label span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.30);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.70);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.10);
}

.search-box span {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: #fbbf24;
  font-weight: 900;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  padding: 20px;
}

.stat-card strong {
  display: block;
  font-size: clamp(22px, 3vw, 34px);
}

.stat-card span {
  color: var(--muted);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: max(16px, calc((100% - 1240px) / 2));
  bottom: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button,
.hero-dot {
  cursor: pointer;
}

.hero-controls > button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.10);
}

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

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

.hero-dot.active {
  width: 28px;
  background: #fbbf24;
}

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

.dark-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1240px) / 2));
  padding-right: max(16px, calc((100% - 1240px) / 2));
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(245,158,11,0.08), rgba(255,255,255,0.02));
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-action a,
.text-link {
  color: #fbbf24;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 224px;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius);
  isolation: isolate;
  background: #151823;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: -2;
}

.category-tile::after,
.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.82) 100%);
  z-index: -1;
}

.category-tile:hover img,
.movie-card:hover img,
.detail-poster:hover img {
  transform: scale(1.06);
  opacity: 0.54;
}

.category-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  right: -30px;
  top: -30px;
  background: rgba(245, 158, 11, 0.45);
  filter: blur(38px);
}

.category-tile strong,
.category-tile em,
.category-tile small {
  position: relative;
  display: block;
}

.category-tile strong {
  margin-top: 92px;
  font-size: 24px;
}

.category-tile em {
  margin-top: 6px;
  color: #fde68a;
  font-style: normal;
  font-weight: 800;
}

.category-tile small {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.6;
}

.movie-grid,
.rank-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.30);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.40);
  background: rgba(255, 255, 255, 0.105);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(244, 63, 94, 0.16), rgba(34, 211, 238, 0.13));
}

.poster-wrap img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.year-badge,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.year-badge,
.rank-badge {
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  color: #111827;
  background: #fbbf24;
}

.rank-badge {
  min-width: 34px;
  text-align: center;
  background: linear-gradient(135deg, #fb7185, #fbbf24);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.7em;
  margin: 0 0 14px;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.72);
  line-height: 1.58;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.compact-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  min-height: 166px;
}

.compact-card .poster-wrap {
  aspect-ratio: auto;
  height: 100%;
}

.compact-card .movie-card p,
.compact-card p {
  -webkit-line-clamp: 2;
  min-height: auto;
}

.subpage {
  padding-top: 76px;
}

.page-hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 44px;
  display: grid;
  grid-template-columns: 1.1fr minmax(300px, 0.7fr);
  gap: 30px;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(245,158,11,0.18), rgba(255,255,255,0.04) 38%, rgba(34,211,238,0.08)),
    rgba(255,255,255,0.055);
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 300px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
}

.filter-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.filter-panel select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.32);
  outline: none;
}

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

.category-overview-card {
  overflow: hidden;
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  height: 190px;
  background: rgba(0, 0, 0, 0.28);
}

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

.category-overview-body {
  padding: 24px;
}

.category-overview-body h2 {
  margin: 4px 0 10px;
  font-size: 30px;
}

.category-overview-body p {
  color: var(--muted);
  line-height: 1.8;
}

.detail-hero {
  position: relative;
  min-height: 740px;
  display: flex;
  align-items: end;
  overflow: hidden;
  padding: 120px 0 58px;
}

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

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: blur(1px) saturate(1.08);
}

.detail-bg-shade {
  background:
    linear-gradient(90deg, #08090d 0%, rgba(8, 9, 13, 0.82) 46%, rgba(8, 9, 13, 0.24) 100%),
    linear-gradient(180deg, rgba(8, 9, 13, 0.10), #08090d 95%);
}

.detail-hero-inner {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 38px;
  align-items: end;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(245,158,11,0.28), rgba(244,63,94,0.20));
  box-shadow: var(--shadow);
}

.detail-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 10px 15px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

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

.detail-content {
  padding-top: 0;
}

.player-card {
  overflow: hidden;
  margin-top: -30px;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.player-header h2 {
  margin: 4px 0 0;
}

.player-header > span {
  padding: 8px 13px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: none;
  color: var(--text);
  background: radial-gradient(circle, rgba(0,0,0,0.20), rgba(0,0,0,0.62));
  cursor: pointer;
}

.video-play-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.40);
}

.video-shell.is-playing .video-play-overlay {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 18px;
  margin-top: 24px;
}

.text-card,
.info-card {
  padding: 26px;
}

.text-card h2,
.info-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.text-card p {
  margin: 0;
  color: rgba(248, 250, 252, 0.78);
  line-height: 2;
}

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

.info-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.info-card li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-card strong {
  color: var(--muted);
}

.info-card span {
  text-align: right;
}

.site-footer {
  margin-top: 42px;
  padding: 48px max(16px, calc((100% - 1240px) / 2));
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

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

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

.footer-grid h3 {
  margin-top: 0;
}

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

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

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

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

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

@media (max-width: 1080px) {
  .category-grid,
  .large-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .hero-panel,
  .page-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: fixed;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(8, 9, 13, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
  }

  .site-header.menu-open .site-nav {
    display: grid;
  }

  .brand-text {
    font-size: 17px;
  }

  .hero {
    min-height: 860px;
    padding-top: 100px;
  }

  .hero-content {
    width: min(100% - 32px, 700px);
    margin: 0 auto;
  }

  .hero-panel,
  .hero-controls {
    position: relative;
    right: auto;
    bottom: auto;
  }

  .hero-controls {
    width: min(100% - 32px, 700px);
    margin: 18px auto 0;
    justify-content: center;
  }

  .section-heading,
  .player-header {
    display: block;
  }

  .category-grid,
  .movie-grid,
  .rank-grid,
  .large-grid,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 104px 1fr;
  }

  .page-hero {
    padding: 26px;
  }

  .detail-hero {
    min-height: auto;
    padding: 102px 0 44px;
  }

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

  .detail-poster {
    width: min(245px, 72vw);
  }

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

  .wide-card {
    grid-column: auto;
  }
}
