:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --rose: #fb7185;
  --blue: #38bdf8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at 85% 0%, rgba(56, 189, 248, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.35);
}

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

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--soft);
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.2);
}

.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 3px 0;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
}

.hero-section {
  width: min(1360px, calc(100% - 32px));
  margin: 26px auto 0;
}

.hero-shell {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(36px, 6vw, 80px);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  filter: blur(10px) saturate(1.15);
  transform: scale(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.55) 52%, rgba(2, 6, 23, 0.9)),
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.28), transparent 34rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  line-height: 1.85;
}

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

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

.hero-tags span,
.detail-meta span,
.tag-cloud span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.62);
  font-size: 0.78rem;
}

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

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

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b 70%);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.ghost-button {
  border: 1px solid rgba(226, 232, 240, 0.18);
  color: var(--text);
  background: rgba(15, 23, 42, 0.66);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  height: clamp(380px, 56vw, 520px);
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 30px;
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.55);
}

.hero-controls {
  position: absolute;
  left: clamp(32px, 6vw, 80px);
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 36px;
  background: var(--amber-2);
}

.section-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 76px auto 0;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 28px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.search-copy h2,
.section-heading h2,
.content-card h2,
.player-title h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  letter-spacing: -0.04em;
}

.search-copy p,
.content-card p,
.player-title p,
.page-hero p,
.category-tile-body p,
.movie-card-body p,
.rank-content p {
  color: var(--muted);
  line-height: 1.75;
}

.search-box,
.filter-bar {
  display: flex;
  gap: 12px;
}

.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.66);
  padding: 0 18px;
}

.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-box button {
  min-width: 84px;
  border: 0;
  border-radius: 18px;
  color: #111827;
  background: var(--amber-2);
  font-weight: 900;
  cursor: pointer;
}

.search-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading.compact {
  align-items: center;
}

.section-heading a {
  color: #fde68a;
  font-weight: 800;
}

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

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

.category-tile {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.35);
}

.category-collage {
  height: 180px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
}

.category-collage img:first-child {
  grid-row: 1 / 3;
}

.category-tile-body {
  padding: 18px;
}

.category-tile-body h2 {
  margin: 0 0 8px;
}

.category-tile-body span {
  color: #fde68a;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  transition: 0.24s ease;
}

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

.poster-link img,
.rank-thumb img,
.hero-poster img,
.detail-poster img {
  transition: transform 0.35s ease;
}

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

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

.movie-card-body h3 {
  margin: 12px 0 8px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.movie-card-body h3 a:hover,
.rank-content h3 a:hover {
  color: #fde68a;
}

.movie-card-body p {
  min-height: 3.4em;
  margin: 0;
  font-size: 0.9rem;
}

.ranking-panel,
.content-card,
.player-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.18);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
  transition: 0.24s ease;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.rank-content h3 {
  margin: 8px 0 6px;
  font-size: 1rem;
}

.rank-content p {
  margin: 0 0 8px;
  font-size: 0.88rem;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 26px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 0.8rem;
  font-weight: 900;
}

.rank-meta {
  color: #cbd5e1;
  font-size: 0.8rem;
}

.page-main {
  padding-top: 28px;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(34px, 7vw, 82px);
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.54)),
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.22), transparent 28rem);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 1.08rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.crumbs a:hover {
  color: #fde68a;
}

.filter-wrap {
  margin-top: 38px;
}

.filter-bar {
  margin-bottom: 22px;
}

.filter-bar select {
  max-width: 240px;
}

.movie-detail {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 64px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(12px) saturate(1.2);
  transform: scale(1.08);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.86), #020617 96%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 62px);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.detail-info .one-line {
  max-width: 760px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 1.16rem;
  line-height: 1.75;
}

.detail-meta,
.tag-cloud {
  margin-top: 20px;
}

.detail-info .primary-button {
  margin-top: 28px;
}

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

.player-card {
  overflow: hidden;
}

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

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.16);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 22rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.72));
}

.player-play {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
  font-size: 2rem;
}

.player-title {
  padding: 24px;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.content-card {
  padding: 24px;
}

.content-card p {
  margin: 14px 0 0;
  font-size: 1rem;
}

.site-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 90px auto 0;
  padding: 36px 0 42px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  max-width: 540px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 16px;
  align-items: start;
}

.footer-links a {
  color: var(--soft);
}

.footer-links a:hover {
  color: #fde68a;
}

.footer-bottom {
  margin-top: 26px;
  color: #64748b;
  font-size: 0.9rem;
}

.no-results {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.65);
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-button {
    display: grid;
  }

  .mobile-nav {
    position: fixed;
    inset: 72px 16px auto;
    z-index: 70;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.menu-open .mobile-nav {
    display: flex;
  }

  .hero-shell {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster {
    max-width: 320px;
    height: 420px;
  }

  .search-panel,
  .detail-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .header-inner,
  .section-wrap,
  .page-hero,
  .detail-shell,
  .site-footer,
  .hero-section {
    width: min(100% - 22px, 1240px);
  }

  .hero-shell {
    min-height: 710px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero-poster {
    width: 100%;
    max-width: none;
    height: 300px;
  }

  .hero-controls {
    left: 28px;
    bottom: 24px;
  }

  .search-box,
  .filter-bar,
  .footer-grid,
  .footer-links {
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.wide,
  .movie-grid.category-list,
  .rank-list.large,
  .category-grid,
  .category-grid.overview {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    padding-top: 34px;
  }

  .detail-info h1 {
    font-size: clamp(2.25rem, 16vw, 4rem);
  }

  .player-title,
  .content-card {
    padding: 18px;
  }
}
