:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-bright: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --emerald: #34d399;
  --teal: #14b8a6;
  --rose: #fb7185;
  --amber: #f59e0b;
  --purple: #a78bfa;
  --blue: #60a5fa;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -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;
  background:
    radial-gradient(circle at 10% 0%, rgba(20, 184, 166, 0.18), transparent 32rem),
    radial-gradient(circle at 92% 12%, rgba(167, 139, 250, 0.16), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

body.is-menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: white;
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.32);
  transition: transform 0.28s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text {
  font-size: clamp(1.08rem, 1.3vw, 1.48rem);
  background: linear-gradient(90deg, #a7f3d0, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-nav a {
  color: #dbeafe;
  padding: 10px 13px;
  border-radius: 12px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.mobile-nav a:hover {
  color: white;
  background: rgba(51, 65, 85, 0.72);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 250px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.filter-field input,
.filter-field select,
.feature-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}

.header-search input::placeholder,
.feature-search input::placeholder {
  color: #94a3b8;
}

.header-search button,
.feature-search button,
.primary-button,
.ghost-button,
.player-start,
.filter-panel button {
  border: 0;
  cursor: pointer;
  color: white;
  border-radius: 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.header-search button,
.feature-search button,
.primary-button,
.filter-panel button {
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 34px rgba(20, 184, 166, 0.24);
}

.header-search button {
  padding: 8px 12px;
}

.primary-button,
.ghost-button,
.feature-search button,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.header-search button:hover,
.feature-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.player-start:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.8);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: white;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 14px 0 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-nav a {
  display: block;
}

main {
  min-height: 64vh;
}

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

.spotlight {
  position: relative;
  height: min(76vh, 720px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.spotlight-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.spotlight-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.spotlight-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.spotlight-slide.is-active .spotlight-img {
  transform: scale(1.12);
}

.spotlight-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 50%, rgba(2, 6, 23, 0.36)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 54%);
}

.spotlight-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max));
  height: 100%;
  margin: 0 auto;
  display: grid;
  align-content: center;
  max-width: 1180px;
}

.spotlight-copy {
  max-width: 690px;
  padding: 40px 0 72px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: #c8fff1;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.16);
}

.spotlight h1,
.spotlight h2,
.page-title h1,
.detail-title h1 {
  margin: 18px 0 16px;
  color: white;
  font-size: clamp(2.4rem, 7vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.spotlight p,
.page-title p,
.detail-title p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.65vw, 1.22rem);
  line-height: 1.9;
}

.spotlight-meta,
.detail-meta,
.rank-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
}

.spotlight-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.feature-search {
  display: flex;
  align-items: center;
  width: min(100%, 520px);
  padding: 8px;
  gap: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(18px);
}

.feature-search input {
  min-height: 46px;
  padding: 0 12px;
}

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

.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.24s ease, background 0.24s ease;
}

.slider-dots button.is-active {
  width: 34px;
  background: white;
}

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

.panel-section {
  width: min(100% - 32px, var(--max));
  margin: 36px auto;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.44));
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.section-heading > span {
  width: 6px;
  height: 38px;
  margin-top: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--emerald), var(--blue));
}

.section-heading h2,
.footer-grid h2,
.detail-content h2,
.category-card h2 {
  margin: 0;
  color: white;
  line-height: 1.2;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.poster-card a {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 14px;
  border-radius: 20px;
  background: #111827;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

.poster-frame img,
.compact-cover img,
.list-card img,
.category-card img,
.rank-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

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

.poster-play,
.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: white;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  backdrop-filter: blur(10px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.poster-card:hover .poster-play,
.compact-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-meta,
.poster-genre {
  position: absolute;
  bottom: 14px;
  color: white;
  font-size: 0.8rem;
}

.poster-meta {
  left: 14px;
}

.poster-genre {
  right: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.poster-card strong,
.compact-card strong,
.list-card strong,
.rank-title strong {
  display: block;
  color: white;
  line-height: 1.4;
  transition: color 0.24s ease;
}

.poster-card:hover strong,
.compact-card:hover strong,
.list-card:hover strong,
.rank-item:hover strong {
  color: var(--emerald);
}

.poster-card > a > span:last-child,
.poster-card a > span:not(.poster-frame) {
  color: var(--muted);
}

.poster-card a > span:not(.poster-frame) {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.scroller {
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.scroller-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 320px);
  gap: 22px;
  min-width: min-content;
}

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

.compact-card a {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compact-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.compact-info em,
.list-copy em,
.rank-meta {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.42;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.25));
}

.category-card h2,
.category-card p,
.category-card span {
  position: relative;
  z-index: 2;
}

.category-card p {
  color: #cbd5e1;
  line-height: 1.7;
}

.category-card span {
  color: #a7f3d0;
  font-weight: 700;
}

.page-title,
.detail-intro {
  padding: 70px 0 34px;
}

.page-title h1 {
  margin-bottom: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr auto;
  gap: 12px;
  margin: 0 0 32px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.8);
}

.filter-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-field select {
  color: white;
}

.filter-field option {
  color: #0f172a;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

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

.rank-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 56px 116px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.24s ease, background 0.24s ease, border 0.24s ease;
}

.rank-item a:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.84);
  border-color: rgba(52, 211, 153, 0.28);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--amber));
}

.rank-cover {
  height: 72px;
  overflow: hidden;
  border-radius: 14px;
}

.rank-title span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.player-panel,
.detail-card,
.related-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

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

.player-shell video,
.player-poster,
.player-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video,
.player-poster {
  object-fit: cover;
}

.player-overlay {
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.2));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-shell.is-playing .player-overlay,
.player-shell.is-playing .player-poster {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px);
}

.player-start i {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #052e2b;
  font-style: normal;
  background: linear-gradient(135deg, #ecfeff, #99f6e4);
}

.player-copy {
  padding: 24px;
}

.player-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  line-height: 1.12;
}

.player-copy p,
.detail-content p,
.related-panel p {
  color: #cbd5e1;
  line-height: 1.85;
}

.detail-card,
.related-panel {
  padding: 24px;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 18px;
  border-radius: 22px;
}

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

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

.tag {
  color: #d1fae5;
  font-size: 0.9rem;
}

.detail-content {
  margin-top: 26px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.56);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 1.36rem;
}

.detail-content p + h2 {
  margin-top: 28px;
}

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

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(2, 6, 23, 0.96));
}

.footer-grid {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p,
.footer-links a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.75;
}

.footer-links {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

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

.footer-bottom {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 20px 0 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

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

  .detail-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
  }

  .detail-cover {
    margin: 0;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .spotlight {
    min-height: 640px;
    height: 86vh;
  }

  .spotlight-content {
    align-content: end;
  }

  .spotlight-copy {
    padding-bottom: 92px;
  }

  .spotlight-actions,
  .feature-search {
    width: 100%;
  }

  .spotlight-actions a,
  .feature-search button,
  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .feature-search {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .panel-section {
    border-radius: 24px;
  }

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

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

  .rank-item .primary-button {
    grid-column: 2 / -1;
    width: 100%;
  }

  .detail-card {
    display: block;
  }

  .detail-cover {
    max-width: 230px;
    margin: 0 auto 18px;
  }

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

@media (max-width: 460px) {
  .poster-grid,
  .compact-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .spotlight h1,
  .spotlight h2 {
    font-size: 2.45rem;
  }
}
