:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c31;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.78);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --line: #1f2f45;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --orange: #fb923c;
  --green: #4ade80;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.13), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.13);
  box-shadow: 0 0 32px rgba(6, 182, 212, 0.18);
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-dropdown:hover > button {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 176px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted-2);
}

.nav-dropdown-panel a:hover {
  background: rgba(51, 65, 85, 0.9);
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--muted-2);
  border-radius: 999px;
}

.mobile-category-list {
  display: none;
}

.hero-section {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.8s ease;
}

.hero-panel:hover img {
  transform: scale(1.08);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 60%);
}

.hero-panel span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.55);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.92) 34%, rgba(15, 23, 42, 0.25) 72%, rgba(15, 23, 42, 0.15) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.65), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 720px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.hero-content p,
.page-hero p {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted-2);
  font-size: 20px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--cyan-strong);
  color: #fff;
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.82);
  color: #fff;
  backdrop-filter: blur(10px);
}

.btn-ghost {
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.08);
}

.page-stack {
  padding: 70px 0 20px;
}

.home-section {
  margin-bottom: 70px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-link,
.inline-link {
  color: var(--cyan);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #020617;
}

.movie-card-large .card-media {
  aspect-ratio: 16 / 9;
}

.movie-card-small .card-media {
  aspect-ratio: 16 / 9;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-media::after {
  opacity: 1;
}

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  padding: 4px 8px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-badge-left {
  left: 12px;
  background: rgba(249, 115, 22, 0.9);
}

.card-badge-right {
  right: 12px;
  background: rgba(0, 0, 0, 0.58);
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  top: auto;
  background: rgba(6, 182, 212, 0.92);
}

.card-play {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: 0.25s ease;
}

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

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 8px;
  min-height: 2.8em;
  color: #fff;
  font-size: 17px;
  line-height: 1.4;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover .card-body h2 {
  color: var(--cyan);
}

.card-body p {
  margin: 0 0 14px;
  min-height: 3.1em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span:last-child {
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-section {
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.55);
}

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

.category-tile {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.12));
  transition: transform 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(59, 130, 246, 0.18));
}

.category-tile strong {
  font-size: 18px;
}

.category-tile span {
  color: var(--muted-2);
  font-size: 13px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: rgba(51, 65, 85, 0.86);
  transform: translateX(4px);
}

.ranking-number {
  color: var(--orange);
  font-size: 24px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ranking-row img {
  width: 96px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-title {
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.inner-page {
  padding-top: 34px;
  padding-bottom: 40px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 42px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.14), transparent 36%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.9));
}

.compact-hero h1 {
  font-size: clamp(36px, 5vw, 54px);
}

.compact-hero p {
  font-size: 18px;
}

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

.category-overview-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.76);
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  aspect-ratio: 20 / 7;
  overflow: hidden;
}

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

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

.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-overview-body p {
  margin: 0 0 14px;
  color: var(--muted-2);
}

.filter-section {
  display: grid;
  gap: 24px;
}

.filter-bar {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-bar-sticky {
  position: sticky;
  top: 86px;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.filter-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  outline: none;
  background: rgba(30, 41, 59, 0.84);
  color: #fff;
}

.filter-bar input:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
  color: var(--muted-2);
}

.filter-chips button:hover,
.filter-chips button.is-active {
  border-color: rgba(34, 211, 238, 0.5);
  color: #fff;
  background: rgba(6, 182, 212, 0.22);
}

.movie-card[hidden] {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-video,
.player-cover,
.player-cover img,
.player-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-video {
  object-fit: contain;
}

.player-cover {
  z-index: 3;
  border: 0;
  padding: 0;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  filter: saturate(1.08) brightness(0.8);
}

.player-vignette {
  background:
    radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 22rem),
    linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.12));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #fff;
  font-size: 34px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 60px rgba(6, 182, 212, 0.35);
}

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

.detail-card,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.8);
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.82);
  color: var(--muted-2);
  font-size: 14px;
}

.detail-card section {
  margin-top: 26px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--muted-2);
  white-space: pre-line;
}

.lead-text {
  font-style: italic;
  color: #dbeafe !important;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-2);
  font-size: 14px;
}

.detail-side {
  position: sticky;
  top: 96px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: rgba(51, 65, 85, 0.78);
}

.related-item img {
  grid-row: span 2;
  width: 112px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.related-item span {
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-item small {
  color: var(--muted);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  max-width: 420px;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

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

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

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-dropdown {
    display: none;
  }

  .mobile-category-list.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(100% - 24px, 1280px);
    margin: 0 auto 14px;
  }

  .mobile-category-list a {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.9);
    color: var(--muted-2);
  }

  .hero-section {
    height: 620px;
  }

  .hero-bg-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel:nth-child(n+2) {
    display: none;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.42));
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 44px;
  }

  .hero-content p,
  .page-hero p {
    font-size: 17px;
  }

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

  .movie-grid-large,
  .movie-grid-medium,
  .movie-grid-small,
  .category-grid,
  .category-overview-grid,
  .ranking-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 42px 82px minmax(0, 1fr);
  }

  .ranking-meta {
    grid-column: 3;
  }

  .category-section,
  .page-hero,
  .detail-card,
  .side-card {
    padding: 22px;
  }

  .detail-meta span {
    font-size: 13px;
  }
}
