:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-solid: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-deep: #b45309;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  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.13), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(180, 83, 9, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.6;
}

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: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 78px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.25);
}

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

.brand-text strong {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.03em;
  background: linear-gradient(120deg, #fff7ed, var(--amber));
  -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;
  gap: 18px;
  flex: 1;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber);
}

.nav-link.subtle {
  color: var(--muted);
  font-size: 14px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.mobile-search input,
.page-filter input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  width: 210px;
  padding: 8px 4px 8px 10px;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.page-filter input::placeholder {
  color: #64748b;
}

.header-search button,
.mobile-search button,
.page-filter button {
  border: 0;
  border-radius: 10px;
  color: #1f1300;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  cursor: pointer;
}

.header-search button {
  padding: 8px 12px;
}

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

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

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

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
}

.mobile-search input {
  flex: 1;
  padding: 8px;
}

.mobile-search button {
  padding: 8px 14px;
}

.mobile-link {
  display: block;
  padding: 10px 2px;
  color: var(--soft);
  font-weight: 650;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.hero-track,
.hero-slide {
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.75s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 680px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.97) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, #020617 0%, transparent 34%, rgba(2, 6, 23, 0.25) 100%);
}

.hero-content {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 104px;
  width: min(660px, calc(100% - 32px));
  z-index: 2;
}

.hero-kicker,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.hero-content p {
  margin: 0;
  max-width: 620px;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #fcd34d;
  background: var(--amber-soft);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

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

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

.btn-primary {
  color: #1f1300;
  background: linear-gradient(135deg, #fde68a, var(--amber));
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.2);
}

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

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

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: rgba(245, 158, 11, 0.1);
}

.hero-nav {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 48px;
  display: flex;
  gap: 10px;
  z-index: 4;
}

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

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

.section-block {
  padding: 58px 0;
}

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

.section-heading h2,
.page-hero h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--amber);
  font-weight: 800;
}

.slim-heading {
  align-items: center;
  margin-bottom: 18px;
}

.featured-grid,
.movie-grid,
.category-grid,
.overview-grid {
  display: grid;
  gap: 20px;
}

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

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

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

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

.card-zen {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.56));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-zen:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.featured-card .poster-link {
  aspect-ratio: 16 / 11;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card-zen:hover .poster-link img {
  transform: scale(1.07);
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #1f1300;
  font-size: 12px;
  font-weight: 900;
  background: #fbbf24;
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: white;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

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

.card-body h3,
.rank-info h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h3 a:hover {
  color: var(--amber);
}

.card-body p,
.rank-info p,
.page-hero p,
.footer-brand p,
.category-card strong,
.category-overview-card p,
.detail-lead,
.content-panel p {
  color: var(--soft);
}

.card-body p,
.rank-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.compact-card .card-body h3 {
  font-size: 16px;
}

.compact-card .card-body p {
  font-size: 13px;
}

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

.category-card,
.category-overview-card,
.content-panel,
.rank-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.category-card {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.category-card span {
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  font-size: 14px;
  font-weight: 500;
}

.category-card em {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.category-card em a:hover,
.sample-links a:hover,
.site-footer a:hover,
.breadcrumb a:hover {
  color: var(--amber);
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.small-rank .rank-item {
  grid-template-columns: 34px 54px minmax(0, 1fr);
}

.small-rank .rank-item strong {
  display: none;
}

.rank-number {
  color: var(--amber);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-poster {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
}

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

.rank-info {
  min-width: 0;
}

.rank-info h3 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item strong {
  color: #fde68a;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 70px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.page-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  font-size: 17px;
}

.page-filter {
  display: flex;
  width: min(640px, 100%);
  gap: 10px;
  margin-top: 28px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
}

.page-filter input {
  flex: 1;
  padding: 10px 12px;
}

.page-filter button {
  padding: 10px 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 4 / 5;
}

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

.category-cover span {
  position: absolute;
  inset: auto 10px 10px;
  border-radius: 12px;
  padding: 8px 10px;
  color: #1f1300;
  font-weight: 900;
  background: #fbbf24;
}

.category-overview-card h2 {
  margin: 8px 0 8px;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sample-links a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.full-rank .rank-item {
  grid-template-columns: 54px 94px minmax(0, 1fr) 82px;
  padding: 16px;
}

.empty-state {
  display: none;
  margin: 34px 0 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
}

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

.detail-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 78px 0 64px;
}

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

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.55;
}

.detail-mask {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.92)),
    linear-gradient(0deg, #020617 0%, transparent 50%);
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

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

.detail-copy h1 {
  margin: 16px 0 16px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.detail-lead {
  max-width: 760px;
  margin: 0;
  font-size: 18px;
}

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

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

.player-section {
  padding-top: 38px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

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

.player-overlay span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.28);
  font-size: 34px;
  text-indent: 5px;
}

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

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

.content-panel {
  padding: 26px;
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-panel p {
  margin: 0;
  font-size: 16px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding: 46px 0;
}

.footer-brand p {
  max-width: 460px;
  margin: 18px 0 0;
}

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

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 14px;
}

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

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

  .header-search {
    margin-left: auto;
  }

  .menu-button {
    display: block;
  }

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

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

  .rank-panel {
    position: static;
  }
}

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

  .hero-carousel,
  .hero-track,
  .hero-slide,
  .hero-slide img {
    min-height: 600px;
    height: 600px;
  }

  .hero-content {
    bottom: 92px;
  }

  .hero-content p {
    font-size: 16px;
  }

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

  .category-overview-card,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    align-items: start;
  }

  .detail-poster {
    width: min(320px, 100%);
  }

  .full-rank .rank-item,
  .rank-item {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-item strong {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide,
  .hero-slide img {
    min-height: 540px;
    height: 540px;
  }

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

  .hero-actions,
  .detail-actions,
  .page-filter {
    flex-direction: column;
  }

  .hero-dot {
    width: 26px;
  }

  .movie-grid,
  .wide-grid,
  .featured-grid,
  .related-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .section-block {
    padding: 42px 0;
  }

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

  .detail-hero {
    padding-top: 42px;
  }

  .detail-copy h1 {
    font-size: 34px;
  }

  .player-overlay span {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
