:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-2: #1e293b;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 30%), var(--bg);
  color: var(--text);
  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%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #fb7185);
  color: white;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 19px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent-2);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  background: #cbd5e1;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 34%, rgba(2, 6, 23, 0.28) 70%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 40%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  min-height: 72vh;
  padding: 96px 22px 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fed7aa;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 840px;
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  font-size: 13px;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.28);
}

.secondary-button {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-button {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
}

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

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

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 64px;
  background: var(--accent-2);
}

.section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 72px 22px;
}

.section-dark {
  background: transparent;
}

.section-gradient {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1320px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1320px) / 2 + 22px));
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0));
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.section-heading.between {
  justify-content: space-between;
  align-items: flex-end;
}

.section-heading.compact {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

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

.section-icon {
  color: var(--accent-2);
  font-size: 20px;
}

.text-link {
  color: var(--accent-2);
  font-weight: 800;
}

.search-panel {
  margin-top: 20px;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-box input,
.filter-select {
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  outline: none;
}

.search-box input {
  flex: 1;
  padding: 0 16px;
}

.filter-select {
  min-width: 180px;
  padding: 0 14px;
}

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

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

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  overflow: hidden;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.small .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

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

.poster-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-category {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.9);
  color: #111827;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  background: rgba(239, 68, 68, 0.92);
  color: white;
}

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

.movie-card-body h3 {
  margin: 0;
  min-height: 48px;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-row span,
.tag-row span,
.detail-tags a {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  font-size: 12px;
}

.meta-row span {
  padding: 5px 8px;
}

.tag-row span,
.detail-tags a {
  padding: 6px 10px;
}

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

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #0f172a;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.category-tile img,
.category-overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.08);
}

.category-tile-shade,
.overview-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.9));
}

.category-tile-text,
.overview-content {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-tile-text strong,
.overview-content strong {
  font-size: 22px;
}

.category-tile-text small,
.overview-content em {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.6;
}

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

.category-overview-card {
  min-height: 300px;
}

.overview-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.overview-samples span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 12px;
}

.two-column {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 38px;
  align-items: start;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 74px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.78);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.4);
}

.compact-card img {
  width: 74px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.compact-rank {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.compact-card strong {
  display: block;
  margin-bottom: 5px;
}

.compact-card small {
  color: var(--muted);
}

.page-hero {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 86px 22px 30px;
}

.page-hero > div {
  overflow: hidden;
  min-height: 260px;
  padding: 46px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 30%), linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.category-hero > div {
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 30%), linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
}

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

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(7px);
  transform: scale(1.08);
  opacity: 0.36;
}

.detail-backdrop span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617, rgba(2, 6, 23, 0.76)), linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.1));
}

.detail-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 72px 22px 44px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin-top: 18px;
  margin-bottom: 16px;
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.detail-tags a:hover {
  background: rgba(245, 158, 11, 0.16);
  color: #fed7aa;
}

.detail-main {
  padding-top: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), rgba(2, 6, 23, 0.64));
  cursor: pointer;
}

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

.play-circle {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #111827;
  font-size: 28px;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.34);
}

.play-cover strong {
  font-size: 22px;
}

.content-panel {
  margin-top: 28px;
  padding: 30px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.82);
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-panel h2:not(:first-child) {
  margin-top: 28px;
}

.content-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.95;
  font-size: 16px;
}

.related-section {
  margin-top: 48px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.95);
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 52px 22px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 38px;
}

.footer-brand p,
.footer-column a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-column h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column li + li {
  margin-top: 8px;
}

.footer-column a:hover {
  color: var(--accent-2);
}

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

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

  .two-column {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: flex;
  }

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

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

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(34px, 12vw, 56px);
  }

  .section-heading,
  .section-heading.between,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .detail-poster {
    max-width: 260px;
  }

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

@media (max-width: 560px) {
  .header-inner {
    padding: 12px 16px;
  }

  .brand-text small {
    display: none;
  }

  .section,
  .page-hero,
  .detail-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cards-5,
  .cards-4,
  .cards-3,
  .cards-2,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .page-hero > div {
    padding: 28px;
    min-height: 230px;
  }

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

  .compact-card {
    grid-template-columns: auto 64px 1fr;
  }
}
