:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #111827;
  --bg-card: #111827;
  --bg-card-soft: rgba(17, 24, 39, 0.78);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --accent-strong: #f97316;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    linear-gradient(180deg, #030712 0%, #111827 48%, #030712 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 {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 24, 39, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-icon,
.footer-brand span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.35);
}

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

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

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

.category-shortcuts {
  margin-left: auto;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 600;
  transition: 0.25s ease;
}

.nav-link.small {
  padding: 8px 11px;
  color: #9ca3af;
}

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

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

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.86);
  color: white;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav-title {
  display: block;
  padding: 12px 14px 4px;
  color: #6b7280;
  font-size: 12px;
}

.hero-slider {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #030712;
  margin-bottom: 56px;
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.14)),
    linear-gradient(0deg, rgba(3, 7, 18, 1), rgba(3, 7, 18, 0) 46%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  top: 50%;
  transform: translateY(-50%);
  max-width: 680px;
  z-index: 2;
}

.hero-kicker,
.detail-meta,
.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-kicker span,
.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 600px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.24);
}

.ghost-button {
  color: white;
  background: rgba(31, 41, 55, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  color: white;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 30px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--accent);
}

.hero-side-panel {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  top: 50%;
  transform: translateY(-50%);
  width: 330px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.58);
  backdrop-filter: blur(18px);
  z-index: 4;
}

.hero-side-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.narrow-section {
  max-width: 980px;
}

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

.section-heading > div {
  min-width: 0;
}

.section-heading h2 {
  display: inline-block;
  margin: 0 0 0 10px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

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

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: #fbbf24;
}

.section-more {
  color: #fbbf24;
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.4fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(120px, 0.8fr));
  gap: 12px;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.7);
  color: white;
  padding: 0 14px;
  outline: none;
}

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

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #020617);
}

.movie-card-wide .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.04) 55%);
  pointer-events: none;
}

.rating-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.72);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: 0.25s ease;
}

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

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

.type-badge {
  display: inline-flex;
  padding: 5px 8px;
  margin-bottom: 9px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta-line {
  color: #9ca3af;
  font-size: 12px;
}

.movie-meta-line.strong {
  gap: 12px;
  color: #d1d5db;
  font-weight: 700;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px;
  margin-bottom: 12px;
  background: rgba(31, 41, 55, 0.74);
}

.movie-card-compact .poster-wrap {
  border-radius: 12px;
  aspect-ratio: 16 / 10;
}

.movie-card-compact .movie-card-body {
  padding: 0;
}

.movie-card-compact .type-badge,
.movie-card-compact .rating-badge {
  display: none;
}

.movie-card-compact h3 {
  font-size: 14px;
  -webkit-line-clamp: 1;
}

.movie-card-compact p {
  font-size: 12px;
  -webkit-line-clamp: 2;
}

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

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

.category-tile {
  min-height: 190px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 52%),
    rgba(17, 24, 39, 0.78);
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.65);
}

.category-tile span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: #fbbf24;
  font-weight: 900;
  margin-bottom: 18px;
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto 48px;
  padding: 68px 24px 0;
}

.compact-hero > div {
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 42%),
    rgba(17, 24, 39, 0.78);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.compact-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: -0.04em;
}

.compact-hero p {
  max-width: 780px;
  margin: 0;
  color: #d1d5db;
  line-height: 1.8;
  font-size: 17px;
}

.slim-actions {
  margin-top: 24px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.78);
  transition: 0.25s ease;
}

.ranking-item:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-2px);
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: #111827;
}

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

.ranking-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-weight: 900;
}

.ranking-info h2 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.ranking-info p {
  margin: 0 0 12px;
  color: var(--soft);
  line-height: 1.7;
}

.detail-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

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

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: stretch;
}

.player-card,
.detail-side,
.detail-content,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.78);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.72));
  color: white;
  cursor: pointer;
  z-index: 3;
}

.player-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-size: 34px;
  padding-left: 5px;
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.34);
}

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

.detail-side {
  position: relative;
  overflow: hidden;
  min-height: 360px;
}

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

.detail-score {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  color: #fbbf24;
  font-weight: 900;
}

.detail-content {
  margin-top: 24px;
  padding: 34px;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.detail-content h2 {
  margin: 34px 0 12px;
  font-size: 24px;
}

.detail-content p {
  color: #d1d5db;
  line-height: 1.9;
  font-size: 16px;
}

.lead-text {
  font-size: 18px;
  color: white;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.tag-cloud span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-weight: 700;
  font-size: 13px;
}

.text-panel {
  padding: 34px;
}

.text-panel p {
  color: #d1d5db;
  line-height: 1.9;
  font-size: 17px;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.72);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  margin-bottom: 14px;
}

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

.site-footer h3 {
  margin: 0 0 14px;
}

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

.site-footer li {
  margin-bottom: 9px;
}

.site-footer a:hover {
  color: #fbbf24;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #6b7280;
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .category-shortcuts {
    display: none;
  }

  .hero-side-panel {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
    max-width: none;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .filter-grid,
  .detail-grid,
  .footer-grid,
  .ranking-item {
    grid-template-columns: 1fr;
  }

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

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

  .detail-side {
    display: none;
  }

  .compact-hero > div,
  .detail-content,
  .text-panel {
    padding: 28px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .content-section,
  .detail-page,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-text small {
    display: none;
  }

  .hero-content p {
    font-size: 15px;
  }

  .movie-grid,
  .featured-grid {
    gap: 12px;
  }

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

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

  .movie-card p {
    display: none;
  }
}
