:root {
  --dark-950: #1a1f2e;
  --dark-900: #2d374c;
  --mirror-900: #172536;
  --mirror-800: #243b53;
  --mirror-700: #334e68;
  --realm-300: #eec078;
  --realm-400: #e8a84d;
  --realm-500: #d4941f;
  --realm-600: #b87d15;
  --text-main: #f3f4f6;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.10);
  --shadow-glow: 0 8px 30px rgba(212, 148, 31, 0.20);
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--dark-950);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 10%, rgba(212, 148, 31, 0.14), transparent 30rem),
    radial-gradient(circle at 85% 5%, rgba(36, 59, 83, 0.95), transparent 34rem),
    var(--dark-950);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container-custom {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.backdrop-glass {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.text-gradient {
  background: linear-gradient(90deg, var(--realm-400), var(--realm-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.animate-fade-in {
  animation: fadeIn 0.55s ease both;
}

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

.site-header {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  border-width: 0 0 1px;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.75rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  color: #111827;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  border-radius: 0.75rem;
  box-shadow: var(--shadow-glow);
}

.brand-text {
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link {
  color: var(--text-soft);
  font-size: 0.96rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

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

.mobile-menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.mobile-menu-button span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 0.3rem auto;
  background: var(--text-main);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 1rem 1rem;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.45rem;
}

.mobile-nav-link {
  padding: 0.75rem 1rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.75rem;
}

.hero {
  position: relative;
  min-height: 86vh;
  overflow: hidden;
  background: #000;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 6s ease;
}

.hero-slide.is-active .hero-bg {
  transform: scale(1.0);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(26, 31, 46, 0.92), rgba(26, 31, 46, 0.52), rgba(26, 31, 46, 0.88)),
    linear-gradient(0deg, var(--dark-950), rgba(26, 31, 46, 0.16) 45%, rgba(0, 0, 0, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 86vh;
  padding-top: 8rem;
  padding-bottom: 7rem;
}

.hero-copy {
  max-width: 48rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.8rem;
  color: var(--realm-400);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.spark {
  filter: drop-shadow(0 0 12px rgba(232, 168, 77, 0.65));
}

.hero h1,
.page-hero h1,
.detail-article h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 46rem;
  margin: 1.3rem 0 0;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.hero-meta {
  margin-top: 1.35rem;
}

.hero-meta span,
.detail-meta span {
  padding: 0.28rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.hero-tags,
.detail-tags,
.movie-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-tags span,
.detail-tags span,
.movie-card-tags span {
  color: var(--realm-300);
  background: rgba(212, 148, 31, 0.15);
  border: 1px solid rgba(212, 148, 31, 0.25);
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 0.82rem;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 1.45rem;
  border-radius: 0.75rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  color: white;
  background: var(--realm-500);
  box-shadow: 0 10px 28px rgba(212, 148, 31, 0.22);
}

.btn-primary:hover {
  background: var(--realm-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.10);
}

.btn-secondary:hover {
  color: var(--realm-300);
  background: rgba(255, 255, 255, 0.16);
}

.btn-primary.full {
  width: 100%;
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 2rem;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

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

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

.hero-arrow,
.scroll-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: white;
  background: rgba(255, 255, 255, 0.10);
  border: 0;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover,
.scroll-button:hover {
  background: rgba(255, 255, 255, 0.20);
  transform: translateY(-1px);
}

.search-landing {
  position: relative;
  z-index: 10;
  margin-top: -3rem;
}

.hero-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-card);
}

.hero-search input,
.search-field input,
.filter-select {
  width: 100%;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: 0;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
}

.hero-search input::placeholder,
.search-field input::placeholder {
  color: var(--text-muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.compact-head {
  align-items: center;
}

.section-link,
.rank-title a {
  color: var(--realm-400);
  font-weight: 700;
}

.scroll-tools {
  display: flex;
  gap: 0.55rem;
}

.movie-strip {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.2rem 0 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

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

.movie-strip .movie-card {
  flex: 0 0 18rem;
  scroll-snap-align: start;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: rgba(36, 59, 83, 0.50);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(232, 168, 77, 0.35);
  box-shadow: var(--shadow-glow);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

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

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

.movie-play {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  color: #111827;
  background: var(--realm-400);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.rank-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: grid;
  place-items: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.55rem;
  color: #111827;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  border-radius: 999px;
  font-weight: 900;
}

.movie-card-body {
  padding: 1rem;
}

.movie-meta {
  gap: 0.45rem;
  font-size: 0.78rem;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 0.45rem;
  color: rgba(255, 255, 255, 0.28);
}

.movie-card h2 {
  margin: 0.45rem 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

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

.movie-card-text {
  display: -webkit-box;
  min-height: 3.1rem;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-text.compact {
  min-height: 2.8rem;
}

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

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

.category-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  min-height: 13rem;
  background: linear-gradient(145deg, rgba(36, 59, 83, 0.72), rgba(45, 55, 76, 0.48));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  overflow: hidden;
}

.category-thumbs {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 0.85fr;
  gap: 0.45rem;
  height: 7rem;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.8rem;
}

.category-copy h2 {
  margin: 0;
  font-size: 1.25rem;
}

.category-copy p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 2rem;
  align-items: start;
}

.rank-panel {
  padding: 1rem;
  border-radius: 1.1rem;
}

.sticky-rank {
  position: sticky;
  top: 6rem;
}

.rank-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 0.7rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 2rem 4rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.rank-row:hover {
  color: var(--realm-300);
  background: rgba(255, 255, 255, 0.08);
}

.rank-num {
  color: var(--realm-400);
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 4rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.55rem;
}

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

.rank-info strong,
.rank-info em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: normal;
}

.subpage-main {
  padding-top: 6rem;
}

.page-hero {
  padding: 2rem;
  border-radius: 1.4rem;
  box-shadow: var(--shadow-card);
}

.small-hero {
  margin-top: 1rem;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.page-hero p {
  max-width: 54rem;
  margin: 1rem 0 0;
  color: var(--text-soft);
}

.filter-panel {
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.search-field {
  display: grid;
  gap: 0.4rem;
  flex: 1 1 24rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-chip,
.filter-select {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.68rem 0.95rem;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #111827;
  background: var(--realm-400);
  border-color: var(--realm-400);
}

.filter-select {
  border-radius: 0.9rem;
}

.empty-state {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  color: var(--text-muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 2rem;
  align-items: start;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

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

.player-section {
  padding: 0.85rem;
  border-radius: 1.25rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 1rem;
  aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  z-index: 1;
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #000;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.72;
}

.player-cover.is-hidden {
  display: none;
}

.player-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  color: #111827;
  background: var(--realm-400);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-glow);
  font-size: 2rem;
}

.detail-article {
  padding: 1.5rem 0;
}

.detail-article h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.detail-one-line {
  margin: 1rem 0 1rem;
  color: var(--text-soft);
  font-size: 1.1rem;
}

.detail-article section {
  margin-top: 2rem;
}

.detail-article h2 {
  margin: 0 0 0.75rem;
  color: var(--realm-300);
  font-size: 1.35rem;
}

.detail-article p {
  color: var(--text-soft);
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
}

.info-list div {
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.85rem;
}

.info-list dt {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.info-list dd {
  margin: 0.2rem 0 0;
  color: var(--text-main);
}

.related-section {
  margin-top: 1.5rem;
}

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

.poster-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.1rem;
  margin-bottom: 1rem;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0.9rem;
}

.site-footer {
  margin-top: 5rem;
  background: rgba(45, 55, 76, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}

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

.footer-grid h2 {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

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

.footer-bottom {
  padding: 1rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

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

  .sticky-rank {
    position: static;
  }
}

@media (max-width: 780px) {
  .container-custom {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content {
    padding-top: 6rem;
    padding-bottom: 5.5rem;
  }

  .hero-controls {
    justify-content: center;
  }

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

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

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .compact-grid,
  .related-grid,
  .footer-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .movie-strip .movie-card {
    flex-basis: 82vw;
  }

  .page-hero {
    padding: 1.25rem;
  }

  .rank-row {
    grid-template-columns: 1.8rem 3.8rem minmax(0, 1fr);
  }
}

@media (min-width: 640px) and (max-width: 780px) {
  .movie-grid,
  .compact-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
