:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.9);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #facc15;
  --orange: #f97316;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 30rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.82));
  backdrop-filter: blur(18px);
}

.site-header.scrolled {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.95));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.45);
  transform: rotate(45deg);
}

.brand-icon::first-letter {
  transform: rotate(-45deg);
}

.brand strong {
  display: block;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #facc15, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 16px;
  color: var(--soft);
  border-radius: 14px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.mobile-nav {
  display: none;
}

.page-offset {
  padding-top: 76px;
}

.home-hero {
  min-height: 740px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, rgba(245, 158, 11, 0.16), transparent 32rem);
}

.hero-slide {
  position: absolute;
  inset: 76px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 56px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-image {
  aspect-ratio: 16 / 10;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.hero-image::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-image img,
.detail-backdrop img,
.card-poster img,
.detail-poster img,
.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-shell {
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(249, 115, 22, 0.14)),
    linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #facc15;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.lead-text {
  margin: 0;
  color: var(--soft);
  font-size: 1.12rem;
  line-height: 1.85;
}

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

.hero-tags {
  margin: 26px 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
}

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

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

.primary-btn {
  color: #111827;
  background: linear-gradient(90deg, var(--amber-light), var(--orange));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

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

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 54px;
  z-index: 8;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dots button.active {
  width: 56px;
  background: #facc15;
}

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

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

.feature-strip div,
.ranking-card,
.text-panel,
.side-panel,
.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.feature-strip div {
  padding: 24px;
}

.feature-strip strong,
.feature-strip span {
  display: block;
}

.feature-strip strong {
  font-size: 1.24rem;
}

.feature-strip span {
  margin-top: 8px;
  color: var(--muted);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-title span {
  color: #facc15;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-title-with-search {
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-title-with-search > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box input,
.search-hero-box input {
  width: min(440px, 100%);
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.76);
}

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

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.66);
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.category-cloud a:hover {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-2px);
}

.category-cloud span {
  color: #facc15;
}

.layout-with-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-poster img {
  transition: transform 0.5s ease;
}

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

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(250, 204, 21, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-meta {
  color: #facc15;
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.card-body h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.45;
}

.card-body h3 a:hover {
  color: #facc15;
}

.card-body p {
  min-height: 60px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 0.76rem;
}

.ranking-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.ranking-card h2 {
  margin: 0 0 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-no {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #facc15, #f97316);
}

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

.rank-meta {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.82rem;
}

.page-hero {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 38px;
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 14px;
}

.search-hero-box {
  display: block;
  margin-top: 28px;
}

.search-hero-box input {
  width: min(680px, 100%);
  height: 58px;
  padding: 0 24px;
  font-size: 1.05rem;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-card-head strong {
  font-size: 1.35rem;
}

.category-card-head span {
  color: #facc15;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-samples a {
  color: var(--muted);
  font-size: 0.92rem;
}

.category-samples a:hover {
  color: #facc15;
}

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

.detail-backdrop {
  position: absolute;
  inset: 76px 0 0;
  opacity: 0.34;
  filter: blur(2px);
}

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

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

.detail-info h1 {
  margin-bottom: 16px;
}

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

.large-tags {
  margin-bottom: 30px;
}

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

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: var(--text);
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 19rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-circle {
  display: inline-grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  font-size: 2rem;
  background: linear-gradient(135deg, #fde68a, #f97316);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.38);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.text-panel,
.side-panel {
  padding: 26px;
}

.text-panel h2,
.side-panel h2 {
  margin-top: 0;
}

.text-panel p {
  color: var(--soft);
  line-height: 1.9;
}

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

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

.side-panel dd {
  margin: 0;
  color: var(--text);
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
}

.ranking-num {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f97316);
}

.ranking-poster {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
}

.ranking-row h2 {
  margin: 0 0 8px;
}

.ranking-row p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.detail-meta.compact {
  margin: 0;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.96));
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 40px;
}

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

.footer-grid p,
.footer-grid a {
  color: var(--muted);
}

.footer-grid a {
  display: block;
  margin: 10px 0;
}

.footer-grid a:hover {
  color: #facc15;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f97316);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.32);
  cursor: pointer;
}

.to-top.show {
  display: block;
}

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

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

  .layout-with-side,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }
}

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

  .menu-btn {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.open {
    display: grid;
    gap: 8px;
    padding: 14px 16px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.98);
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0 88px;
    align-content: center;
  }

  .home-hero {
    min-height: 820px;
  }

  .hero-image {
    aspect-ratio: 16 / 9;
    border-radius: 26px;
  }

  .feature-strip,
  .category-grid,
  .footer-grid,
  .detail-wrap,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    padding-top: 38px;
  }

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

  .section-title-with-search {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box input {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .nav-wrap {
    width: min(100% - 24px, 1240px);
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .brand strong {
    font-size: 1.05rem;
  }

  .brand em {
    display: none;
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 780px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(2.1rem, 12vw, 3.4rem);
  }

  .section-wrap,
  .page-hero {
    width: min(100% - 24px, 1240px);
  }

  .ranking-poster {
    width: 100%;
  }
}
