:root {
  --night-950: #020617;
  --night-925: #07101f;
  --night-900: #0f172a;
  --night-850: #172033;
  --night-800: #1e293b;
  --night-750: #27364d;
  --night-700: #334155;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --white: #ffffff;
  --gold-300: #fde047;
  --gold-400: #facc15;
  --gold-500: #eab308;
  --gold-600: #ca8a04;
  --red-500: #ef4444;
  --blue-500: #3b82f6;
  --shadow-night: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(234, 179, 8, 0.3);
  --shadow-glow-lg: 0 0 30px rgba(234, 179, 8, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--night-950), var(--night-900));
  color: var(--gray-300);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.95);
  border-bottom: 1px solid var(--night-800);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gold-400);
}

.brand-name {
  font-size: 21px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--gold-500);
  background: rgba(234, 179, 8, 0.1);
  transition: background 0.2s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  background: rgba(234, 179, 8, 0.2);
}

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

.nav-link,
.mobile-link {
  color: var(--gray-300);
  transition: color 0.2s ease;
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  width: 230px;
  border: 1px solid var(--night-700);
  border-radius: 12px;
  outline: none;
  background: var(--night-900);
  color: var(--gray-300);
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 1px var(--gold-500);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.rank-action,
.player-start,
.filter-chip {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.player-start {
  background: var(--gold-500);
  color: var(--night-950);
  font-weight: 800;
}

.header-search button,
.mobile-search button {
  padding: 10px 14px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
}

.secondary-button {
  background: var(--night-800);
  color: var(--white);
  font-weight: 700;
}

.primary-button:hover,
.header-search button:hover,
.mobile-search button:hover,
.player-start:hover {
  background: var(--gold-600);
  transform: translateY(-1px);
}

.secondary-button:hover,
.rank-action:hover {
  background: var(--night-700);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--gray-300);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 20px;
  border-top: 1px solid var(--night-800);
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--night-950);
}

.hero-stage {
  position: relative;
  min-height: 70vh;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--night-950), rgba(2, 6, 23, 0.83) 38%, rgba(2, 6, 23, 0.38));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 42px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0 96px;
}

.hero-copy {
  animation: slideUp 0.55s ease both;
}

.eyebrow,
.card-tags span,
.detail-tag,
.poster-badge,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow {
  margin-bottom: 18px;
  padding: 7px 12px;
  color: var(--gold-400);
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(113, 63, 18, 0.35);
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 0 0 16px;
  color: var(--white);
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h2 {
  font-size: clamp(34px, 5vw, 66px);
}

.hero-title-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-400);
  font-size: clamp(24px, 3vw, 38px);
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--gray-300);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray-400);
  font-size: 14px;
}

.hero-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.75);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow-night), var(--shadow-glow);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--gold-400);
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--gold-500);
}

.section,
.page-section,
.detail-shell,
.page-hero-inner,
.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section,
.page-section {
  padding: 54px 0 0;
}

.section-head,
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-title h2,
.page-head h1,
.detail-title h1 {
  margin: 0 0 8px;
  color: var(--white);
  font-weight: 900;
  line-height: 1.15;
}

.section-title h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.page-head h1,
.detail-title h1 {
  font-size: clamp(32px, 4vw, 52px);
}

.section-title p,
.page-head p,
.detail-title p {
  margin: 0;
  color: var(--gray-400);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--night-800);
  border-radius: 16px;
  background: var(--night-900);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(234, 179, 8, 0.35);
  background: var(--night-850);
  box-shadow: var(--shadow-glow);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--night-800);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .poster img,
.category-card:hover img,
.compact-card:hover img,
.rank-item:hover img {
  transform: scale(1.08);
}

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--gold-400);
  backdrop-filter: blur(8px);
}

.card-content {
  padding: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
  margin-bottom: 10px;
}

.card-tags span,
.detail-tag,
.category-pill {
  padding: 5px 8px;
  color: var(--gold-400);
  background: rgba(234, 179, 8, 0.11);
}

.movie-card h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h2 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover,
.detail-related a:hover {
  color: var(--gold-400);
}

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-400);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--night-800);
  border-radius: 16px;
  background: var(--night-900);
  box-shadow: var(--shadow-night);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42));
}

.category-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 210px;
  padding: 20px;
}

.category-card h2 {
  margin: 12px 0 8px;
  color: var(--white);
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--gray-300);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--night-800);
  border-radius: 16px;
  background: var(--night-900);
  padding: 12px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  background: var(--night-850);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--night-950);
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 12px;
}

.rank-poster img {
  width: 82px;
  height: 112px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rank-info h2 {
  margin: 0 0 6px;
  color: var(--white);
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--gray-400);
}

.rank-info div {
  color: var(--gray-500);
  font-size: 13px;
}

.rank-action {
  padding: 10px 14px;
  background: var(--night-800);
  color: var(--white);
  font-weight: 800;
}

.page-hero {
  background: linear-gradient(180deg, var(--night-900), var(--night-950));
  border-bottom: 1px solid var(--night-800);
}

.page-hero-inner {
  padding: 54px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--night-800);
  border-radius: 16px;
  background: var(--night-900);
}

.filter-input {
  flex: 1 1 260px;
}

.filter-select {
  width: auto;
  min-width: 150px;
}

.filter-chip {
  padding: 9px 12px;
  background: var(--night-800);
  color: var(--gray-300);
}

.filter-chip.is-active,
.filter-chip:hover {
  background: var(--gold-500);
  color: var(--night-950);
}

.search-empty {
  display: none;
  padding: 30px;
  border: 1px solid var(--night-800);
  border-radius: 16px;
  background: var(--night-900);
  color: var(--gray-400);
  text-align: center;
}

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

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 34px 0 0;
}

.player-card,
.detail-panel,
.detail-related,
.synopsis-card {
  border: 1px solid var(--night-800);
  border-radius: 18px;
  background: var(--night-900);
  box-shadow: var(--shadow-night);
}

.player-card {
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 18px;
  box-shadow: var(--shadow-glow);
}

.player-start span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.18);
}

.player-info {
  padding: 20px;
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.synopsis-card {
  padding: 24px;
  margin-top: 20px;
}

.synopsis-card h2,
.detail-panel h2,
.detail-related h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 24px;
}

.synopsis-card p {
  margin: 0 0 16px;
  color: var(--gray-300);
}

.synopsis-card p:last-child {
  margin-bottom: 0;
}

.detail-panel {
  overflow: hidden;
}

.detail-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-panel-body {
  padding: 18px;
}

.meta-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--night-800);
}

.meta-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-row dt {
  color: var(--gray-500);
}

.meta-row dd {
  margin: 0;
  color: var(--white);
  text-align: right;
}

.detail-related {
  margin-top: 18px;
  padding: 18px;
}

.detail-related-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.58);
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: var(--night-800);
}

.compact-card img {
  width: 58px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.compact-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--white);
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.compact-card small {
  display: block;
  margin-top: 4px;
  color: var(--gray-500);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--night-800);
  background: var(--night-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0 28px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--gray-400);
  font-size: 14px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a:hover {
  color: var(--gold-400);
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tags a {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--night-900);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--night-800);
  text-align: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 14px;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 68px;
  }

  .hero-poster {
    display: none;
  }

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

  .detail-shell {
    grid-template-columns: 1fr;
  }

  .detail-side {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 18px;
  }

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

@media (max-width: 720px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero,
  .hero-stage,
  .hero-backdrop img {
    min-height: 650px;
  }

  .hero-content {
    width: min(100% - 24px, 1180px);
    padding-bottom: 90px;
  }

  .hero h1,
  .hero h2 {
    font-size: 40px;
  }

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

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

  .card-content {
    padding: 12px;
  }

  .movie-card h2 {
    font-size: 16px;
  }

  .rank-item {
    grid-template-columns: 42px 68px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-action {
    display: none;
  }

  .rank-number {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .rank-poster img {
    width: 68px;
    height: 92px;
  }

  .rank-info h2 {
    font-size: 17px;
  }

  .rank-info p {
    display: none;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .detail-side {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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