:root {
  --dark-950: #080b14;
  --dark-900: #111827;
  --dark-850: #151b2a;
  --dark-800: #1a1f2e;
  --mirror-900: #182536;
  --mirror-800: #243b53;
  --mirror-700: #334e68;
  --realm-300: #eec078;
  --realm-400: #e8a84d;
  --realm-500: #d4941f;
  --text-main: #f3f4f6;
  --text-muted: #aab3c2;
  --line-soft: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.055);
  --shadow-gold: 0 18px 40px rgba(212, 148, 31, 0.18);
  --shadow-card: 0 16px 48px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(212, 148, 31, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(50, 76, 112, 0.32), transparent 30rem),
    linear-gradient(180deg, var(--dark-800), var(--dark-950));
  color: var(--text-main);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container-custom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-padding {
  padding: 72px 0 20px;
}

.backdrop-glass {
  border: 1px solid var(--line-soft);
  background: var(--glass-bg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.text-gradient,
.brand-name {
  background: linear-gradient(90deg, var(--realm-300), var(--realm-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 11, 20, 0.72);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(212, 148, 31, 0.16);
  color: var(--realm-400);
  box-shadow: 0 0 24px rgba(232, 168, 77, 0.22);
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.nav-link,
.mobile-link {
  color: #d1d5db;
  font-weight: 600;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: #e5e7eb;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: rgba(8, 11, 20, 0.96);
  padding: 12px 16px 18px;
}

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

.mobile-link {
  display: block;
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
}

.hero-slider {
  position: relative;
  height: 80vh;
  min-height: 620px;
  overflow: hidden;
  background: var(--dark-950);
}

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--dark-950) 0%, rgba(8, 11, 20, 0.65) 42%, rgba(8, 11, 20, 0.06) 100%),
    linear-gradient(90deg, rgba(8, 11, 20, 0.9), rgba(8, 11, 20, 0.16), rgba(8, 11, 20, 0.78));
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 104px;
}

.hero-copy {
  width: min(760px, 100%);
  animation: fadeRise 0.7s ease both;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--realm-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 690px;
  margin: 0;
  color: #d1d5db;
  font-size: clamp(16px, 2.2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #cbd5e1;
}

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

.rating {
  color: var(--realm-400);
  font-weight: 900;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--realm-400), var(--realm-500));
  color: #160f04;
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  border-color: rgba(232, 168, 77, 0.35);
  background: rgba(212, 148, 31, 0.12);
  color: var(--realm-300);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-controls button,
.rail-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  min-height: 8px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  transition: width 0.25s ease, background-color 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--realm-400);
}

.search-strip {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: 24px;
  align-items: center;
  margin-top: -42px;
  position: relative;
  z-index: 5;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.86);
  box-shadow: var(--shadow-card);
  padding: 24px;
  backdrop-filter: blur(18px);
}

.search-strip h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-panel h2,
.info-card h2,
.footer-links h2,
.category-overview-top h2 {
  margin: 0;
}

.search-strip p,
.section-heading p,
.page-hero p,
.category-card p,
.category-overview-card p,
.footer-main p,
.movie-card p,
.detail-panel p {
  color: var(--text-muted);
}

.home-search,
.filter-panel {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-input,
.filter-select {
  min-height: 46px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  outline: 0;
}

.home-search input,
.filter-input {
  width: 100%;
  padding: 0 18px;
}

.filter-select {
  padding: 0 16px;
}

.filter-select option {
  color: #111827;
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(212, 148, 31, 0.14);
  color: var(--realm-400);
  font-size: 22px;
}

.rail-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 280px);
  gap: 22px;
  overflow-x: auto;
  padding: 6px 4px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(232, 168, 77, 0.3);
  box-shadow: var(--shadow-gold), 0 18px 46px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--mirror-900);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 11, 20, 0.72), transparent 58%);
}

.poster-play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.25s ease, background-color 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--realm-400), var(--realm-500));
  color: #160f04;
  display: grid;
  place-items: center;
  padding: 0 8px;
  font-weight: 900;
}

.card-info {
  padding: 16px;
}

.card-meta-line {
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.26;
}

.movie-card h2 a:hover,
.text-link:hover {
  color: var(--realm-400);
}

.movie-card p {
  margin: 0 0 14px;
  font-size: 14px;
}

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

.tag-row span {
  border-radius: 999px;
  background: rgba(36, 59, 83, 0.55);
  color: #d1d5db;
  padding: 4px 10px;
  font-size: 12px;
}

.card-horizontal {
  display: grid;
  grid-template-columns: 220px 1fr;
}

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

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

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

.category-card,
.category-overview-card {
  border-radius: 24px;
  padding: 24px;
}

.category-title,
.category-overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.category-title span,
.category-overview-top h2 {
  font-size: 24px;
  font-weight: 900;
}

.category-title strong {
  color: var(--realm-400);
  font-size: 32px;
}

.compact-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

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

.compact-link {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7eb;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.compact-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--realm-300);
}

.compact-link img {
  width: 58px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
}

.section-more {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

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

.page-hero {
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  position: relative;
}

.page-hero::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  top: -160px;
  border-radius: 999px;
  background: rgba(212, 148, 31, 0.12);
  filter: blur(5px);
}

.page-hero h1 {
  position: relative;
  margin-top: 10px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  position: relative;
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.filter-panel {
  align-items: center;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.category-overview-top span {
  border-radius: 999px;
  background: rgba(212, 148, 31, 0.14);
  color: var(--realm-300);
  padding: 6px 14px;
  font-weight: 900;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--realm-300);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #94a3b8;
}

.breadcrumb a:hover {
  color: var(--realm-400);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 32px;
  align-items: start;
}

.detail-primary {
  display: grid;
  gap: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.video-node {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: #000;
  padding: 0;
  color: #fff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

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

.player-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--realm-300);
  font-size: 30px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.08);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: none;
  border-radius: 14px;
  background: rgba(8, 11, 20, 0.78);
  color: #fecaca;
  padding: 12px 14px;
}

.player-message.is-visible {
  display: block;
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.detail-meta {
  margin: 14px 0 18px;
}

.detail-tags {
  margin-bottom: 22px;
}

.detail-panel,
.info-card {
  border-radius: 24px;
  padding: 24px;
}

.detail-panel + .detail-panel {
  margin-top: 18px;
}

.detail-panel h2,
.info-card h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.info-card {
  position: sticky;
  top: 100px;
}

.info-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-card dt {
  color: #94a3b8;
  font-size: 13px;
}

.info-card dd {
  margin: 2px 0 0;
  color: #e5e7eb;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line-soft);
  background: rgba(8, 11, 20, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 54px 0 34px;
}

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

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

.footer-links h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

.footer-links a {
  color: #aab3c2;
}

.footer-links a:hover {
  color: var(--realm-400);
}

.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding: 18px 0 24px;
  color: #64748b;
  font-size: 14px;
}

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

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .detail-layout,
  .search-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    order: -1;
  }

  .info-card {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero-slider {
    min-height: 560px;
    height: 76vh;
  }

  .hero-content {
    padding-bottom: 92px;
  }

  .hero-actions,
  .page-actions,
  .home-search,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rail-button {
    display: none;
  }

  .rail-wrap {
    display: block;
  }

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

  .card-horizontal .poster-wrap {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 520px) {
  .container-custom {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 20px;
  }

  .section-padding {
    padding-top: 48px;
  }

  .movie-grid,
  .grid-three,
  .category-grid,
  .category-overview-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .movie-rail {
    grid-auto-columns: 82%;
  }

  .search-strip,
  .page-hero,
  .category-card,
  .category-overview-card,
  .detail-panel,
  .info-card {
    border-radius: 20px;
  }
}
