:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(245, 158, 11, 0.22);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --gold-dark: #b45309;
  --blue-black: #0f172a;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(180, 83, 9, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.04em;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 1.45rem;
  font-weight: 900;
  background: linear-gradient(90deg, #fef3c7, var(--gold), #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-weight: 600;
}

.nav-links a,
.mobile-menu a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
  color: var(--gold-2);
}

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

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--gold-2);
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.7) 42%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(620px, calc(100% - 48px));
  transform: translateY(-50%);
}

.eyebrow,
.page-title span,
.ranking-hero span,
.category-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-2);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-title h1,
.detail-info h1,
.ranking-hero h1,
.category-hero h1 {
  margin: 14px 0;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-title p,
.ranking-hero p,
.category-hero p,
.lead-text {
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.9;
}

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

.hero-tags span,
.detail-tags a,
.tag-line span,
.detail-meta span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.26);
}

.ghost-button {
  color: #f8fafc;
  border: 1px solid rgba(245, 158, 11, 0.34);
  background: rgba(15, 23, 42, 0.56);
}

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

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

.hero-dots button {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--gold-2);
}

.intro-strip,
.page-main,
.detail-main {
  padding-top: 54px;
  padding-bottom: 54px;
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.intro-strip h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.intro-strip p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  background: linear-gradient(90deg, #fef3c7, var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-heading span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.5), transparent);
}

.section-more {
  color: var(--gold-2);
  font-weight: 800;
}

.movie-grid,
.rank-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card,
.category-tile,
.category-card-large,
.side-panel,
.search-panel,
.story-section article,
.player-section,
.related-section,
.detail-hero,
.ranking-hero,
.category-hero {
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 26px 70px rgba(245, 158, 11, 0.16);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 50%);
}

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  color: #111827;
  border-radius: 12px;
  background: var(--gold-2);
}

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.76rem;
}

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

.movie-card h2 a:hover {
  color: var(--gold-2);
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 104px 1fr;
  min-height: 156px;
}

.movie-card.compact .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

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

.movie-card.compact h2 {
  font-size: 1rem;
}

.movie-card.compact p {
  min-height: 0;
  -webkit-line-clamp: 2;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

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

.side-panel {
  align-self: start;
  position: sticky;
  top: 94px;
  padding: 22px;
}

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

.search-panel {
  margin: 0 0 28px;
  padding: 18px;
}

.search-panel label {
  display: grid;
  gap: 9px;
  color: #fde68a;
  font-weight: 800;
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.66);
}

.search-panel input:focus {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.filter-chips button {
  min-height: 34px;
  padding: 0 12px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  cursor: pointer;
}

.filter-chips button.active {
  color: #111827;
  background: var(--gold-2);
}

.category-tile,
.category-card-large {
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile a,
.category-card-large a {
  display: block;
  height: 100%;
  padding: 22px;
}

.category-tile span,
.category-card-large h2 {
  display: block;
  margin: 0 0 10px;
  color: #fef3c7;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile p,
.category-card-large p {
  color: var(--muted);
  line-height: 1.7;
}

.category-tile div,
.inline-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tile div a,
.inline-links a,
.footer-links a {
  color: var(--gold-2);
  font-size: 0.92rem;
}

.cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.page-title {
  max-width: 820px;
  margin-bottom: 34px;
}

.category-hero,
.ranking-hero,
.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  min-height: 360px;
  padding: 28px;
  overflow: hidden;
}

.category-hero img,
.ranking-hero img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 20px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
}

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

.breadcrumb em {
  font-style: normal;
  color: #e2e8f0;
}

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

.player-section h2 {
  margin-top: 0;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
  cursor: pointer;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #fff;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.26));
  cursor: pointer;
}

.play-cover span {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  color: #111827;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.3);
}

.play-cover strong {
  font-size: 1.15rem;
}

.player-shell.is-playing .play-cover {
  display: none;
}

.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 28px;
}

.story-section article {
  padding: 24px;
}

.story-section h2,
.related-section h2,
.footer-grid h2 {
  margin-top: 0;
  color: #fef3c7;
}

.story-section p {
  color: #cbd5e1;
  line-height: 2;
}

.related-section {
  margin-top: 28px;
  padding: 24px;
}

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

.empty-state {
  display: none;
  padding: 32px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
}

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

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.75);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  margin: 0 auto;
  padding: 42px 0 26px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fef3c7;
  font-size: 1.4rem;
  font-weight: 900;
}

.site-footer p,
.copyright {
  color: var(--muted);
  line-height: 1.8;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

  .menu-button {
    display: block;
  }

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

  .rank-layout,
  .detail-hero,
  .category-hero,
  .ranking-hero {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .container,
  .nav-shell,
  .mobile-menu,
  .footer-grid,
  .copyright {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 1.15rem;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

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

  .intro-strip,
  .story-section,
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .movie-card.compact {
    grid-template-columns: 92px 1fr;
  }

  .category-hero,
  .ranking-hero,
  .detail-hero,
  .player-section,
  .related-section,
  .story-section article {
    padding: 18px;
    border-radius: 18px;
  }
}

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

  .hero-actions {
    display: grid;
  }

  .mobile-menu {
    grid-template-columns: 1fr;
  }
}
