:root {
  color-scheme: dark;
  --night-950: #05070d;
  --night-900: #0b0f18;
  --night-850: #111827;
  --night-800: #162033;
  --gold-300: #fde68a;
  --gold-400: #facc15;
  --gold-500: #eab308;
  --gold-600: #ca8a04;
  --blue-400: #60a5fa;
  --red-500: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --border: rgba(234, 179, 8, 0.18);
  --panel: rgba(11, 15, 24, 0.88);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(234, 179, 8, 0.12), transparent 32rem), linear-gradient(180deg, var(--night-950), var(--night-900));
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 13, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.12);
  color: var(--gold-400);
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.2);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.94rem;
  color: var(--text-soft);
}

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

.main-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--gold-400);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.big-search input,
.page-search {
  width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text-main);
  padding: 10px 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.big-search input:focus,
.page-search:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}

.search-form button,
.big-search button,
.gold-button,
.dark-button,
.ghost-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-form button,
.big-search button,
.gold-button {
  background: var(--gold-500);
  color: #111827;
  box-shadow: 0 12px 30px rgba(234, 179, 8, 0.22);
}

.search-form button:hover,
.big-search button:hover,
.gold-button:hover {
  transform: translateY(-1px);
  background: var(--gold-400);
}

.dark-button {
  background: rgba(15, 23, 42, 0.82);
  color: var(--text-main);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.dark-button:hover {
  transform: translateY(-1px);
  background: rgba(30, 41, 59, 0.92);
}

.ghost-button {
  color: var(--gold-300);
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(234, 179, 8, 0.14);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--gold-400);
  font-size: 1.7rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  color: var(--text-soft);
}

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
}

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

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img,
.category-hero > img,
.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mask,
.category-hero-mask,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 7, 13, 0.96) 0%, rgba(5, 7, 13, 0.78) 42%, rgba(5, 7, 13, 0.25) 100%), linear-gradient(0deg, var(--night-950), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 72vh;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 780px;
  animation: slideUp 0.7s ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.inner-hero h1,
.category-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 20px 0 12px;
  font-size: clamp(1.45rem, 3vw, 2.6rem);
  color: var(--gold-300);
}

.hero-copy p,
.inner-hero p,
.category-hero p,
.detail-one-line {
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.12);
  color: var(--gold-300);
  border: 1px solid rgba(234, 179, 8, 0.16);
  padding: 6px 11px;
  font-size: 0.82rem;
}

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

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

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

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

.search-strip {
  position: relative;
  z-index: 5;
  margin-top: -52px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  background: rgba(11, 15, 24, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-strip h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.search-strip p {
  margin: 0;
  color: var(--text-muted);
}

.big-search {
  display: flex;
  gap: 10px;
}

.big-search input {
  width: min(420px, 48vw);
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

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

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

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

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

.movie-card,
.rank-item,
.side-panel,
.detail-article,
.detail-side,
.category-overview-block {
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(234, 179, 8, 0.32);
  box-shadow: 0 0 30px rgba(234, 179, 8, 0.16), var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.poster-link img,
.rank-cover img,
.category-card img,
.category-hero-card img,
.detail-poster img,
.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.category-hero-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster-link img,
.category-card img,
.category-hero-card img,
.rank-cover img {
  transition: transform 0.35s ease;
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600));
  color: #111827;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(234, 179, 8, 0.35);
}

.movie-card-body {
  padding: 18px;
}

.movie-meta {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.movie-card h3,
.rank-item h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.4;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover {
  color: var(--gold-400);
}

.movie-card p,
.rank-item p,
.detail-article p,
.detail-side dd,
.footer-grid p {
  color: var(--text-muted);
  line-height: 1.75;
}

.movie-card p {
  min-height: 3.5em;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 26px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(234, 179, 8, 0.28);
}

.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
}

.rank-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.list-rank {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #111827;
  background: var(--gold-500);
  font-weight: 900;
}

.small-dot {
  color: var(--gold-400);
  background: rgba(234, 179, 8, 0.12);
}

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

.side-panel h2 {
  margin: 0 0 16px;
}

.mini-category-list,
.footer-links {
  display: grid;
  gap: 10px;
}

.mini-category-list a {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.mini-category-list span {
  font-weight: 800;
  color: var(--gold-300);
}

.mini-category-list small {
  color: var(--text-muted);
  line-height: 1.5;
}

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

.category-card,
.category-hero-card {
  position: relative;
  display: block;
  min-height: 180px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(234, 179, 8, 0.18);
  background: var(--night-900);
}

.category-card::after,
.category-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 7, 13, 0.95), rgba(5, 7, 13, 0.18));
}

.category-card span,
.category-card strong {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-card span {
  bottom: 58px;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-card strong {
  bottom: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.inner-hero,
.category-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(234, 179, 8, 0.18), transparent 32rem), var(--night-950);
}

.inner-hero .shell {
  padding: 92px 0 76px;
}

.inner-hero p {
  max-width: 760px;
}

.category-overview {
  display: grid;
  gap: 28px;
}

.category-overview-block {
  padding: 22px;
}

.category-hero-card {
  display: grid;
  min-height: 220px;
  margin-bottom: 20px;
}

.category-hero-card div {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 24px;
  max-width: 680px;
}

.category-hero-card p {
  margin: 0 0 8px;
  color: var(--gold-400);
  font-weight: 800;
}

.category-hero-card h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.category-hero-card span {
  color: var(--text-soft);
}

.category-hero {
  height: 420px;
}

.category-hero-content {
  position: relative;
  z-index: 2;
  height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 820px;
}

.tool-bar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(11, 15, 24, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.page-search {
  width: 100%;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-button {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-soft);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: #111827;
  background: var(--gold-500);
}

.detail-hero {
  min-height: 620px;
}

.detail-backdrop,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-grid {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: center;
  gap: 46px;
  padding: 60px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(234, 179, 8, 0.25);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.detail-one-line {
  max-width: 860px;
}

.player-section {
  padding-top: 70px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid rgba(234, 179, 8, 0.22);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.22));
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  color: #111827;
  background: var(--gold-400);
  font-size: 2.2rem;
  box-shadow: 0 0 40px rgba(234, 179, 8, 0.38);
}

.play-overlay.hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 28px;
  padding-top: 46px;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  color: var(--gold-300);
}

.detail-article p {
  margin: 0 0 24px;
  font-size: 1.02rem;
}

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--gold-400);
  font-weight: 800;
}

.detail-side dd {
  margin: -8px 0 8px;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--border);
  background: rgba(5, 7, 13, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 28px;
  padding: 44px 0;
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: var(--text-main);
}

.footer-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  color: var(--text-muted);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

[hidden] {
  display: none !important;
}

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

@media (max-width: 1080px) {
  .main-nav,
  .nav-shell > .search-form {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

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

  .side-panel {
    position: static;
  }

  .detail-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .hero,
  .hero-content {
    min-height: 620px;
  }

  .search-strip,
  .tool-bar,
  .big-search {
    grid-template-columns: 1fr;
  }

  .big-search {
    display: grid;
  }

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

  .movie-grid,
  .featured-grid,
  .hot-grid,
  .category-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .filter-buttons {
    justify-content: flex-start;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .detail-poster {
    width: min(260px, 75vw);
  }

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

@media (max-width: 520px) {
  .shell {
    width: min(100% - 22px, 1180px);
  }

  .hero-actions {
    display: grid;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-cover {
    aspect-ratio: 16 / 9;
  }
}
