:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.62);
  --panel-strong: rgba(15, 23, 42, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --rose: #f43f5e;
  --green: #10b981;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.12), transparent 28rem),
    radial-gradient(circle at 82% 5%, rgba(244, 63, 94, 0.14), transparent 25rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1240px, 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(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.26);
}

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

.brand-text strong {
  font-size: 20px;
  line-height: 1;
}

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

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.8);
}

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

.hero {
  position: relative;
  height: min(680px, calc(100vh - 68px));
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 40%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.15) 48%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1240px) / 2));
  bottom: 86px;
  width: min(720px, calc(100% - 64px));
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.page-stats,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.page-stats span,
.movie-meta span {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.25);
}

.ghost-button {
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.56);
}

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

.hero-dots {
  position: absolute;
  right: max(32px, calc((100% - 1240px) / 2));
  bottom: 104px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

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

.section {
  padding: 74px 0 0;
}

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

.section-heading h2,
.related-panel h2,
.detail-article h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
}

.section-heading a {
  color: #fbbf24;
  font-weight: 700;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 18px;
  overflow-x: auto;
  padding: 0 0 18px;
  scroll-snap-type: x mandatory;
}

.rail-card {
  position: relative;
  height: 180px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.rail-card img,
.feature-card img,
.poster-frame img,
.detail-cover img,
.ranking-card img,
.ranking-item img,
.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-card img,
.feature-card img,
.poster-frame img {
  transition: transform 0.34s ease;
}

.rail-card:hover img,
.feature-card:hover img,
.movie-card:hover .poster-frame img {
  transform: scale(1.08);
}

.rail-shade,
.feature-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 68%);
}

.rail-title,
.rail-meta {
  position: absolute;
  left: 16px;
  right: 16px;
}

.rail-title {
  bottom: 38px;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-meta {
  bottom: 16px;
  color: #cbd5e1;
  font-size: 13px;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 55%);
  transition: opacity 0.24s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffffff;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  opacity: 0;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-body {
  padding: 14px 2px 0;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  gap: 6px;
  font-size: 12px;
}

.movie-meta span {
  padding: 3px 8px;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  color: #cbd5e1;
  font-size: 12px;
  background: rgba(148, 163, 184, 0.12);
}

.movie-card .tag-row {
  margin-top: 10px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: 34px;
  align-items: start;
}

.ranking-list,
.related-panel,
.detail-article,
.toolbar-panel,
.search-panel,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.ranking-list {
  padding: 14px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 46px 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.ranking-item:hover {
  background: rgba(30, 41, 59, 0.75);
}

.rank-number {
  color: #fbbf24;
  font-size: 20px;
  font-weight: 900;
}

.ranking-item img {
  width: 62px;
  height: 82px;
  border-radius: 12px;
}

.ranking-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.ranking-copy strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.category-grid {
  display: grid;
  gap: 14px;
}

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

.category-tile {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(244, 63, 94, 0.12));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.45);
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  color: #fbbf24;
}

.category-tile em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

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

.feature-card {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.feature-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
}

.feature-copy strong {
  font-size: 23px;
}

.feature-copy em {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.55;
}

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

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

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

.footer-inner a {
  display: block;
  margin: 7px 0;
}

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

.footer-inner h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

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

.page-main {
  padding-top: 38px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.breadcrumb strong {
  color: #ffffff;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.18), transparent 20rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.5));
  box-shadow: var(--shadow);
}

.compact-page-hero h1,
.category-page-hero h1 {
  font-size: clamp(38px, 5vw, 58px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.page-stats {
  margin-top: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.45);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-thumbs img {
  height: 96px;
  border-radius: 12px;
  background: #0f172a;
}

.category-overview-card h2 {
  margin: 2px 0 10px;
  font-size: 26px;
}

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.category-overview-card strong {
  color: #fbbf24;
}

.toolbar-panel,
.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin: 0 0 30px;
  padding: 18px;
}

.toolbar-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar-panel input,
.toolbar-panel select,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  padding: 0 14px;
}

.toolbar-panel input:focus,
.toolbar-panel select:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(245, 158, 11, 0.62);
}

.search-panel {
  grid-template-columns: minmax(0, 1fr) 180px 180px;
}

.search-result-count {
  margin: 0 0 20px;
  color: var(--muted);
}

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

.ranking-card a {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ranking-card a:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(15, 23, 42, 0.82);
}

.ranking-card-number {
  color: #fbbf24;
  font-size: 26px;
  font-weight: 900;
}

.ranking-card img {
  width: 92px;
  height: 120px;
  border-radius: 14px;
  background: #0f172a;
}

.ranking-card-copy {
  display: grid;
  gap: 8px;
}

.ranking-card-copy strong {
  font-size: 22px;
}

.ranking-card-copy em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.ranking-card-copy span {
  color: #fde68a;
}

.detail-shell {
  max-width: 1240px;
}

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

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

.detail-copy {
  padding: 24px 0;
}

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.detail-one-line {
  max-width: 860px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.7;
}

.detail-meta {
  margin-top: 22px;
}

.detail-tags {
  margin: 22px 0 28px;
}

.player-section {
  margin: 0 0 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.22));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  background: rgba(245, 158, 11, 0.94);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.34);
  transition: transform 0.2s ease;
}

.player-start:hover span {
  transform: scale(1.07);
}

.player-shell.is-playing .player-start {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.detail-article {
  padding: 30px;
}

.detail-article h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 32px;
}

.detail-article p {
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.9;
}

.related-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.related-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.related-grid {
  display: grid;
  gap: 16px;
}

.is-compact .poster-frame {
  aspect-ratio: 16 / 10;
}

.is-compact .movie-card-body p,
.is-compact .tag-row {
  display: none;
}

.is-compact .movie-card h3 {
  font-size: 15px;
}

[data-card].is-hidden {
  display: none;
}

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

  .split-section,
  .detail-layout,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .related-panel {
    position: static;
  }
}

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

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

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

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

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 72px;
    width: auto;
  }

  .hero-dots {
    left: 18px;
    right: auto;
    bottom: 28px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .section {
    padding-top: 54px;
  }

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

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

  .page-hero {
    padding: 28px;
    border-radius: 24px;
  }

  .toolbar-panel,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .ranking-card a {
    grid-template-columns: 48px 78px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-card img {
    width: 78px;
    height: 104px;
  }

  .detail-copy {
    padding: 0;
  }

  .detail-one-line {
    font-size: 17px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .large-grid,
  .feature-grid,
  .category-overview-grid,
  .small-category-grid {
    grid-template-columns: 1fr;
  }

  .rail {
    grid-auto-columns: minmax(240px, 82vw);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ranking-card-copy em {
    display: none;
  }
}
