:root {
  --dark-950: #030303;
  --dark-900: #0a0a0b;
  --dark-850: #101014;
  --mirror-900: #141417;
  --mirror-800: #1e1e24;
  --mirror-700: #2b2b33;
  --realm-500: #d4941f;
  --realm-400: #e8a84d;
  --realm-300: #f4c16a;
  --text-main: #f7f7f8;
  --text-soft: #d4d4d8;
  --text-muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 6%, rgba(212, 148, 31, 0.20), transparent 30rem),
    radial-gradient(circle at 90% 18%, rgba(80, 72, 55, 0.26), transparent 34rem),
    linear-gradient(180deg, #050505 0%, var(--dark-950) 46%, #08080a 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.section-padding {
  padding: 70px 0;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.72);
  backdrop-filter: blur(18px);
}

.nav-bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #111;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  box-shadow: 0 0 32px rgba(212, 148, 31, 0.28);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #fff;
}

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

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(3, 3, 3, 0.92) 0%, rgba(3, 3, 3, 0.62) 42%, rgba(3, 3, 3, 0.38) 100%),
    linear-gradient(0deg, var(--dark-950) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 96px;
}

.hero-copy {
  max-width: 760px;
  animation: riseIn 0.72s ease both;
}

.eyebrow,
.eyebrow-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--realm-400);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.eyebrow span {
  padding: 6px 10px;
  border: 1px solid rgba(232, 168, 77, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1 {
  margin: 18px 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero p,
.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(16px, 2vw, 21px);
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

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

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

.btn-primary {
  color: #17110a;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  box-shadow: 0 14px 34px rgba(212, 148, 31, 0.22);
}

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

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-control button,
.rail-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-control > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search {
  position: relative;
  z-index: 5;
  margin-top: -38px;
}

.search-panel,
.filter-bar {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.search-panel label,
.filter-bar label {
  color: var(--realm-400);
  font-weight: 800;
}

.search-panel div {
  display: flex;
  gap: 12px;
}

.search-panel input,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: #fff;
  outline: none;
  background: rgba(0, 0, 0, 0.28);
}

.search-panel input:focus,
.filter-bar input:focus {
  border-color: rgba(232, 168, 77, 0.55);
  box-shadow: 0 0 0 4px rgba(232, 168, 77, 0.12);
}

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

.category-pills a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.07);
  transition: color 0.2s ease, background 0.2s ease;
}

.category-pills a:hover {
  color: #111;
  background: var(--realm-400);
}

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

.section-head > span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #111;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

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

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

.movie-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
  scrollbar-width: none;
}

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

.movie-rail .movie-card {
  width: 290px;
  flex: 0 0 290px;
  scroll-snap-align: start;
}

.rail-wrap {
  position: relative;
}

.rail-btn {
  position: absolute;
  top: 38%;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}

.rail-btn:first-child {
  left: -12px;
}

.rail-btn:last-child {
  right: -12px;
}

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(232, 168, 77, 0.42);
  background: rgba(255, 255, 255, 0.10);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.poster-wrap img,
.wide-poster img,
.rank-cover img,
.detail-cover,
.category-mini-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img,
.wide-poster img,
.rank-cover img {
  transition: transform 0.42s ease;
}

.movie-card:hover .poster-wrap img,
.wide-card:hover .wide-poster img,
.rank-row:hover .rank-cover img {
  transform: scale(1.08);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.06) 55%);
}

.rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #111;
  background: var(--realm-400);
  font-weight: 800;
  font-size: 12px;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.50);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-card-body {
  display: block;
  padding: 15px;
}

.movie-card strong,
.wide-card strong,
.rank-info strong {
  display: block;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card em,
.wide-card em,
.rank-info em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: var(--text-muted);
  font-style: normal;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.movie-meta b {
  padding: 3px 7px;
  border-radius: 8px;
  color: var(--realm-300);
  background: rgba(212, 148, 31, 0.12);
}

.movie-meta i {
  font-style: normal;
}

.movie-card-compact .movie-card-body {
  padding: 13px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 168, 77, 0.42);
}

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

.rank-cover {
  height: 108px;
  overflow: hidden;
  border-radius: 13px;
}

.rank-info span,
.wide-content span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.rank-score {
  min-width: 58px;
  color: var(--realm-300);
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 184px 1fr;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.wide-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 168, 77, 0.42);
}

.wide-poster {
  position: relative;
  height: 112px;
  overflow: hidden;
  border-radius: 14px;
}

.wide-poster span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.30);
  font-size: 34px;
}

.wide-content {
  align-self: center;
}

.more-line {
  margin-top: 28px;
  text-align: center;
}

.page-hero {
  padding: 142px 0 70px;
  background:
    radial-gradient(circle at 14% 10%, rgba(212, 148, 31, 0.24), transparent 25rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}

.compact-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
}

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

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

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

.category-card {
  display: grid;
  grid-template-columns: 0.92fr 1fr;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.category-card p {
  margin: 0 0 22px;
  color: var(--text-muted);
}

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

.category-mini-grid a {
  position: relative;
  height: 132px;
  overflow: hidden;
  border-radius: 14px;
}

.category-mini-grid span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 9px 8px;
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.filter-bar {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
  padding: 18px;
}

.large-filter {
  position: sticky;
  top: 88px;
  z-index: 12;
}

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

.detail-breadcrumb {
  margin-bottom: 24px;
}

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

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

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.24));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-ring {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.06);
  font-size: 34px;
}

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

.detail-copy h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.lead-text {
  margin: 18px 0 20px;
  color: var(--text-soft);
  font-size: 19px;
}

.detail-copy h2 {
  margin: 32px 0 10px;
  color: var(--realm-300);
}

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

.detail-side {
  position: sticky;
  top: 96px;
  padding: 18px;
  border-radius: 24px;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: var(--mirror-800);
}

.detail-side dl {
  margin: 18px 0 0;
}

.detail-side div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

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

.detail-side a:not(.btn-primary) {
  color: var(--realm-400);
}

.side-btn {
  width: 100%;
  margin-top: 18px;
}

.site-footer {
  margin-top: 60px;
  padding: 48px 0 22px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 30px;
}

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

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

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

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

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

  .detail-grid,
  .category-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(10, 10, 11, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 12px;
  }

  .hero {
    min-height: 610px;
  }

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

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

  .search-panel div,
  .footer-bottom {
    flex-direction: column;
  }

  .movie-grid,
  .full-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
    font-size: 18px;
  }

  .wide-card {
    grid-template-columns: 120px 1fr;
  }

  .wide-poster {
    height: 92px;
  }

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

  .rail-btn {
    display: none;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .full-grid {
    grid-template-columns: 1fr;
  }

  .movie-rail .movie-card {
    width: 245px;
    flex-basis: 245px;
  }

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

  .hero-control {
    width: 100%;
    justify-content: center;
  }

  .page-hero {
    padding-top: 118px;
  }

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

  .wide-poster {
    height: 180px;
  }

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