* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --gold: #facc15;
  --gold-deep: #eab308;
  --purple: #581c87;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(250, 204, 21, 0.14), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(168, 85, 247, 0.24), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #1e103e 46%, #0f172a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(250, 204, 21, 0.12);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 0 34px rgba(250, 204, 21, 0.42);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: rotate(10deg) scale(1.04);
}

.brand-text strong {
  display: block;
  font-size: 1.22rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fde047, #fff7ad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: #d1d5db;
  font-size: 0.74rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

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

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--gold);
  transform: translateY(-1px);
}

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

.header-search input,
.filter-panel input,
.filter-panel select {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.17);
  outline: none;
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 190px;
  padding: 11px 15px;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(250, 204, 21, 0.82);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.16);
  background: rgba(255, 255, 255, 0.12);
}

.header-search button,
.cta,
.ghost-cta,
.play-overlay button,
.filter-panel button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.cta,
.play-overlay button {
  color: #111827;
  background: linear-gradient(135deg, #fde047, #eab308);
  box-shadow: 0 14px 34px rgba(250, 204, 21, 0.23);
}

.header-search button {
  padding: 11px 16px;
}

.header-search button:hover,
.cta:hover,
.play-overlay button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.34);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  flex-direction: column;
  gap: 14px;
}

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.85s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.16) 100%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.48) 48%, rgba(15, 23, 42, 0.78) 100%);
}

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

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  color: #e5e7eb;
  font-size: clamp(1.02rem, 2vw, 1.32rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-tags,
.movie-meta-line,
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin: 24px 0 34px;
}

.hero-meta span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-meta .highlight {
  color: #111827;
  background: var(--gold);
  border-color: transparent;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.cta,
.ghost-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
}

.ghost-cta {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.ghost-cta:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
  padding: 74px 0 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  letter-spacing: -0.03em;
}

.section-kicker {
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 8px;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 340px);
  gap: 22px;
  overflow-x: auto;
  padding: 6px 4px 22px;
  scrollbar-color: rgba(250, 204, 21, 0.5) transparent;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(250, 204, 21, 0.28);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(88, 28, 135, 0.7), rgba(15, 23, 42, 0.95));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
}

.play-badge,
.score-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  color: #111827;
  background: rgba(250, 204, 21, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.score-badge {
  right: 12px;
  top: 12px;
  min-width: 46px;
  height: 30px;
  padding: 0 10px;
  color: #111827;
  background: var(--gold);
  font-weight: 900;
}

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

.movie-meta-line {
  color: var(--soft);
  font-size: 0.84rem;
  justify-content: space-between;
  margin-bottom: 8px;
}

.movie-meta-line a {
  color: var(--gold);
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 3.1em;
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
  font-size: 0.94rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.card-tags span {
  color: #fef9c3;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.18);
}

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

.category-tile {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.28), transparent 12rem),
    linear-gradient(135deg, rgba(126, 34, 206, 0.88), rgba(219, 39, 119, 0.7));
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, filter 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  filter: saturate(1.12);
}

.category-tile h3 {
  margin: 0 0 12px;
  font-size: 1.42rem;
}

.category-tile p {
  margin: 0;
  color: #f8fafc;
  line-height: 1.68;
}

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

.rank-line {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-number {
  width: 48px;
  min-width: 48px;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 2rem;
  font-weight: 900;
}

.rank-item {
  display: flex;
  gap: 15px;
  padding: 12px;
  width: 100%;
}

.rank-cover {
  position: relative;
  width: 138px;
  min-width: 138px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
}

.rank-copy {
  min-width: 0;
}

.rank-copy h3 {
  margin: 4px 0 8px;
  font-size: 1.05rem;
}

.rank-copy p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.rank-copy div {
  color: var(--soft);
  font-size: 0.85rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 58px;
  background:
    radial-gradient(circle at 15% 0%, rgba(250, 204, 21, 0.17), transparent 18rem),
    radial-gradient(circle at 88% 12%, rgba(168, 85, 247, 0.24), transparent 24rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero h1 {
  max-width: 980px;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.08rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 26px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  padding: 0 16px;
}

.library-empty {
  display: none;
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(250, 204, 21, 0.18);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.15));
  z-index: 3;
}

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

.play-overlay button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 168px;
  min-height: 62px;
  padding: 0 28px;
  font-size: 1.05rem;
}

.detail-card,
.side-card {
  border-radius: 26px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-card h1 {
  margin: 20px 0 14px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-card h2,
.side-card h2 {
  margin: 30px 0 12px;
  font-size: 1.4rem;
}

.detail-card p {
  color: #dbeafe;
  line-height: 1.88;
  font-size: 1.02rem;
}

.detail-meta {
  margin: 14px 0;
}

.breadcrumbs {
  color: var(--soft);
  margin-bottom: 16px;
}

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

.side-card {
  position: sticky;
  top: 100px;
}

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

.side-list .rank-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.side-list .rank-cover {
  width: 118px;
  min-width: 118px;
}

.site-footer {
  margin-top: 90px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(2, 6, 23, 0.98) 25%, #020617 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 56px 0 34px;
  color: var(--muted);
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 9px 0;
  color: var(--muted);
}

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

.footer-bottom {
  padding: 22px 16px 30px;
  text-align: center;
  color: var(--soft);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 48px;
  height: 48px;
  color: #111827;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.scroll-top.is-visible {
  display: grid;
  place-items: center;
}

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

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

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

  .side-card {
    position: static;
  }

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

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .main-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero,
  .hero-content {
    min-height: 74vh;
  }

  .hero-content {
    padding-top: 44px;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-line {
    padding: 12px;
  }

  .rank-item {
    flex-direction: column;
  }

  .rank-cover,
  .side-list .rank-cover {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 560px) {
  .site-container {
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.45rem;
  }

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

  .cta,
  .ghost-cta {
    width: 100%;
  }

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

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

  .movie-card p {
    min-height: auto;
  }

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