:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --amber: #f59e0b;
  --orange: #f97316;
  --blue: #1d4ed8;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.52);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.18), transparent 30rem),
    radial-gradient(circle at 85% 12%, rgba(29, 78, 216, 0.28), transparent 36rem),
    linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.88), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(14px);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.38);
}

.brand-text,
.footer-brand {
  font-size: 1.28rem;
  background: linear-gradient(90deg, #fde68a, #fb923c, #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: var(--muted-2);
  font-weight: 700;
  padding: 22px 0 18px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
  border-bottom-color: #fbbf24;
}

.mobile-toggle {
  display: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
}

.hero {
  position: relative;
  min-height: 670px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) brightness(0.64);
  transform: scale(1.04);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(2, 6, 23, 0.42) 100%),
    radial-gradient(circle at 72% 40%, rgba(245, 158, 11, 0.28), transparent 22rem);
}

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

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(245, 158, 11, 0.34);
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.11);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.inner-hero h1,
.detail-info h1 {
  margin: 18px 0 14px;
  line-height: 1.1;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  font-weight: 950;
  letter-spacing: -0.045em;
}

.hero p {
  margin: 0;
  max-width: 620px;
  color: #dbeafe;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

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

.hero-tags {
  margin: 22px 0 30px;
}

.hero-tags span,
.detail-meta span,
.movie-meta span {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.83rem;
}

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

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

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

.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 15px 38px rgba(245, 158, 11, 0.32);
}

.btn.ghost {
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster {
  position: absolute;
  z-index: 2;
  right: max(32px, calc((100% - 1240px) / 2));
  top: 120px;
  width: min(34vw, 380px);
  aspect-ratio: 2 / 3;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
}

.hero-controls button {
  cursor: pointer;
  color: #fff;
  border: 0;
  background: transparent;
}

.hero-controls > button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.2rem;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

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

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

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
}

.text-link {
  color: #fbbf24;
  font-weight: 900;
}

.search-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
}

.search-panel input {
  width: 100%;
  color: #fff;
  background: rgba(2, 6, 23, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  outline: 0;
  padding: 14px 16px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pills button,
.related-categories a {
  cursor: pointer;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.filter-pills button:hover,
.related-categories a:hover {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.55);
  transform: translateY(-1px);
}

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

.category-tile,
.overview-card,
.movie-card,
.rank-row {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.76));
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.26);
}

.category-tile {
  min-height: 134px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  padding: 20px;
}

.category-tile span {
  font-size: 1.24rem;
  font-weight: 950;
}

.category-tile small {
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

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

.poster img,
.rank-cover img,
.overview-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #111827;
  background: #fbbf24;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 950;
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.7em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.35;
}

.movie-title:hover,
.rank-title:hover {
  color: #fbbf24;
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  color: var(--muted-2);
  padding: 3px 8px;
  font-size: 0.72rem;
}

.movie-info p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.6em;
  margin: 0;
  color: var(--muted);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
}

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

.tag-row span {
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.74rem;
}

.movie-card.compact .movie-info p {
  -webkit-line-clamp: 2;
  min-height: 3.1em;
}

.inner-hero {
  position: relative;
  overflow: hidden;
  width: min(1240px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background:
    radial-gradient(circle at 88% 20%, rgba(245, 158, 11, 0.24), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.38));
  box-shadow: var(--shadow);
}

.inner-hero.slim {
  padding-bottom: 44px;
}

.inner-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-2);
  font-size: 1.08rem;
}

.crumbs {
  margin-top: 22px;
  color: var(--muted-2);
  font-size: 0.9rem;
}

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

.overview-card {
  overflow: hidden;
  border-radius: 24px;
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 210px;
}

.overview-body {
  padding: 18px;
}

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

.overview-body p {
  margin: 0;
  color: var(--muted);
}

.related-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 74px 92px minmax(0, 1fr) 74px;
  gap: 18px;
  align-items: center;
  border-radius: 22px;
  padding: 14px;
}

.rank-num {
  color: #fbbf24;
  font-size: 1.45rem;
  font-weight: 950;
  text-align: center;
}

.rank-cover {
  width: 92px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
}

.rank-title {
  display: inline-flex;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 950;
}

.rank-main p {
  margin: 8px 0 10px;
  color: var(--muted);
}

.rank-score {
  justify-self: end;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  border-radius: 999px;
  font-weight: 950;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 68px;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

.detail-info h1 {
  max-width: 860px;
}

.detail-line {
  max-width: 780px;
  color: #dbeafe;
  font-size: 1.12rem;
}

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

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

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 16px;
  color: #fff;
  cursor: pointer;
  border: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.86)),
    radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 17rem);
}

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

.play-ring {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  border-radius: 999px;
  font-size: 2rem;
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.35);
}

.player-cover strong {
  font-size: clamp(1.2rem, 3vw, 2.2rem);
}

.detail-text {
  display: grid;
  gap: 16px;
  color: var(--muted-2);
  font-size: 1.04rem;
}

.detail-text h2 {
  margin: 12px 0 0;
  color: #fff;
  font-size: 1.55rem;
}

.detail-text p {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 10px 0 0;
  max-width: 520px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  color: var(--muted-2);
}

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

.footer-copy {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

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

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

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

  .hero-poster {
    opacity: 0.52;
    right: 24px;
  }
}

@media (max-width: 760px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
    border-bottom: 0;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    margin: 0 auto;
    padding-top: 92px;
  }

  .hero-poster {
    display: none;
  }

  .hero h1,
  .inner-hero h1,
  .detail-info h1 {
    font-size: 2.35rem;
  }

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

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

  .inner-hero {
    padding: 32px 22px;
    border-radius: 26px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }

  .detail-poster {
    width: min(260px, 82vw);
  }

  .rank-row {
    grid-template-columns: 46px 72px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .rank-cover {
    width: 72px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .rank-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-controls {
    bottom: 18px;
  }

  .section {
    padding: 38px 0;
  }
}
