:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --dark: #0f172a;
  --dark-2: #111827;
  --amber: #f59e0b;
  --amber-2: #d97706;
  --orange: #ea580c;
  --cyan: #0891b2;
  --green: #16a34a;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

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

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
}

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

.nav-link {
  color: #e2e8f0;
  padding: 10px 15px;
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.22);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.hero-slider {
  position: relative;
  height: min(80vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: var(--dark);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 45%, rgba(245, 158, 11, 0.28), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.74) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.9), transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 0;
  right: 0;
  padding-top: 72px;
}

.hero-copy {
  width: min(680px, 100%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 13px;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 640px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.tag-list span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.detail-copy .primary-btn {
  margin-top: 6px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 24px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 35px rgba(245, 158, 11, 0.32);
}

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

.ghost-btn {
  margin-left: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

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

.filter-strip {
  position: relative;
  z-index: 5;
  margin-top: -48px;
  padding-bottom: 26px;
}

.filter-strip .container {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  padding: 0 16px;
}

.search-box span {
  color: var(--amber-2);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  height: 48px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
}

.search-box.wide {
  margin-bottom: 16px;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pills a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  border: 1px solid var(--line);
  transition: 0.25s ease;
}

.category-pills a:hover {
  color: #fff;
  background: var(--amber);
  border-color: var(--amber);
  transform: translateY(-2px);
}

.inline-pills {
  margin-bottom: 28px;
}

.section {
  padding: 72px 0;
}

.warm-section {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.cool-section {
  background: linear-gradient(135deg, #ecfeff, #f0f9ff);
}

.library-section {
  background: #fff;
}

.section-heading {
  margin-bottom: 30px;
  text-align: center;
}

.section-heading.left-heading {
  text-align: left;
}

.section-heading h2 {
  margin: 8px 0 6px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--dark);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.85), transparent 45%);
  opacity: 0;
  transition: 0.25s ease;
}

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

.score-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

.score-badge {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: var(--amber);
}

.score-badge.large {
  font-size: 16px;
  padding: 9px 13px;
}

.type-badge {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--orange);
}

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

.movie-card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: var(--amber-2);
}

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

.card-meta {
  color: #475569;
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.card-tags span {
  color: #92400e;
  background: #fef3c7;
  padding: 4px 8px;
  font-size: 11px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: auto 86px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 122px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
}

.ranking-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.ranking-number {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
}

.ranking-item img {
  width: 86px;
  height: 96px;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-info {
  display: grid;
  gap: 8px;
}

.ranking-info strong {
  font-size: 18px;
}

.ranking-info small {
  color: var(--muted);
}

.ranking-score {
  color: var(--amber-2);
  font-weight: 900;
}

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

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

.feature-card {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-radius: 28px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
  transition: 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-5px) scale(1.01);
}

.feature-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.2));
}

.feature-card span {
  width: fit-content;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--cyan);
  padding: 6px 12px;
  font-weight: 800;
}

.feature-card strong {
  font-size: 26px;
  line-height: 1.2;
}

.feature-card p {
  color: #dbeafe;
}

.page-hero {
  padding: 120px 0 78px;
  color: #fff;
  background:
    radial-gradient(circle at 14% 30%, rgba(245, 158, 11, 0.28), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero p {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
}

.page-search {
  max-width: 580px;
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.page-search input {
  color: #fff;
}

.page-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

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

.category-card {
  padding: 18px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.category-card > a {
  position: relative;
  display: block;
  height: 190px;
  overflow: hidden;
  border-radius: 20px;
  color: #fff;
}

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

.category-card > a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), transparent);
}

.category-card > a span {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 16px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  color: var(--muted);
}

.category-card ul {
  margin: 0;
  padding-left: 18px;
  color: #334155;
}

.category-card li + li {
  margin-top: 6px;
}

.category-card a:hover {
  color: var(--amber-2);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 72px;
  background: var(--dark);
  color: #fff;
}

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) saturate(1.1);
  transform: scale(1.06);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 44px;
  align-items: center;
}

.detail-layout .breadcrumb {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.detail-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  font-size: clamp(32px, 5vw, 58px);
}

.lead-text {
  color: #e2e8f0;
  font-size: 19px;
  max-width: 760px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
}

.player-section {
  background: #020617;
  color: #fff;
}

.player-section .section-heading p {
  color: #cbd5e1;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: 0.25s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.38);
  font-size: 28px;
}

.player-overlay strong {
  max-width: 80%;
  font-size: 24px;
  text-align: center;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.text-panel {
  border-radius: 26px;
  background: #fff;
  padding: 30px;
  box-shadow: var(--soft-shadow);
}

.text-panel h2 {
  margin-top: 0;
  font-size: 26px;
}

.text-panel p {
  color: #334155;
  margin-bottom: 16px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: #fff;
}

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

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.25);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

.is-hidden-by-search {
  display: none !important;
}

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

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

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .hero-slider {
    height: 680px;
    min-height: 680px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 92px;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.42)),
      radial-gradient(circle at 50% 40%, rgba(245, 158, 11, 0.28), transparent 38%);
  }

  .ranking-grid,
  .content-grid,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .ranking-item {
    grid-template-columns: auto 72px 1fr;
  }

  .ranking-item img {
    width: 72px;
    height: 86px;
  }

  .ranking-score {
    display: none;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .brand-text small {
    display: none;
  }

  .header-inner {
    height: 64px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero-actions {
    display: grid;
    gap: 12px;
  }

  .ghost-btn {
    margin-left: 0;
  }

  .section {
    padding: 48px 0;
  }

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

  .movie-card-body h3 {
    font-size: 15px;
  }

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

  .play-circle {
    width: 62px;
    height: 62px;
  }

  .player-overlay strong {
    font-size: 18px;
  }
}
