:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

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

img {
  background: linear-gradient(135deg, #1e293b, #020617);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

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

.header-row {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.logo-text {
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  color: #e2e8f0;
}

.main-nav a,
.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.22s ease;
}

.main-nav a:hover,
.dropdown:hover .dropdown-trigger {
  color: #fb923c;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 230px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s ease;
}

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

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.dropdown-menu a:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.78);
}

.header-search {
  position: relative;
  flex: 0 1 300px;
}

.header-search input,
.page-search input,
.filter-input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 0 18px;
  outline: none;
  transition: all 0.2s ease;
}

.header-search input:focus,
.page-search input:focus,
.filter-input:focus {
  border-color: rgba(249, 115, 22, 0.85);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
  padding: 10px 12px;
}

.mobile-panel {
  display: none;
  padding: 8px 0 18px;
  border-top: 1px solid var(--border);
}

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

.mobile-panel a {
  display: block;
  padding: 11px 0;
  color: #dbeafe;
}

.hero-section {
  padding: 30px 0 16px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, transparent 55%);
}

.hero-content {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 48px;
  max-width: 760px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.38);
  color: #fed7aa;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.82);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.btn-primary,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.25);
}

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

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.btn-soft {
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.26);
  background: rgba(249, 115, 22, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
  transition: background 0.22s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: all 0.22s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--orange);
}

.section {
  padding: 46px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(15, 23, 42, 1));
}

.poster.wide {
  aspect-ratio: 21 / 9;
}

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

.movie-card:hover .poster img,
.category-card:hover .poster img {
  transform: scale(1.09);
}

.poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.82) 100%);
  opacity: 0.88;
}

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

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

.play-icon {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: all 0.24s ease;
}

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

.card-body {
  padding: 15px;
}

.card-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-desc {
  min-height: 44px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  padding: 12px 18px 12px 12px;
  transition: all 0.22s ease;
}

.horizontal-card:hover {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(30, 41, 59, 0.88);
  transform: translateX(4px);
}

.horizontal-card .poster {
  border-radius: 15px;
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  font-size: 20px;
  font-weight: 950;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.36);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.category-card::before {
  content: '';
  position: absolute;
  right: -70px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.18);
}

.category-preview {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.category-preview img {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.page-hero {
  padding: 54px 0 28px;
}

.page-hero-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.2), transparent 24rem),
    rgba(15, 23, 42, 0.76);
  padding: clamp(28px, 5vw, 54px);
  box-shadow: var(--shadow);
}

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

.breadcrumb a {
  color: #fed7aa;
}

.page-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-lead {
  max-width: 780px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
}

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

.player-card,
.info-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.movie-player video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.84)),
    var(--poster-image, none) center / cover no-repeat;
  z-index: 2;
}

.movie-player.is-playing .player-shade {
  display: none;
}

.play-trigger {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  box-shadow: 0 20px 45px rgba(249, 115, 22, 0.34);
  transition: transform 0.24s ease;
}

.play-trigger:hover {
  transform: scale(1.07);
}

.detail-body {
  padding: 24px;
}

.detail-body h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-body h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-body p,
.info-card p {
  color: #cbd5e1;
  line-height: 1.85;
}

.meta-table {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.meta-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
  color: #cbd5e1;
}

.meta-row strong {
  color: #fff;
}

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

.site-footer {
  margin-top: 70px;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid var(--border);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding: 42px 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p,
.footer-grid a {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: #64748b;
  font-size: 14px;
}

.search-results {
  min-height: 240px;
}

.empty-state {
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  color: #94a3b8;
  text-align: center;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-carousel {
    height: 520px;
    border-radius: 22px;
  }

  .hero-content {
    left: 26px;
    right: 26px;
    bottom: 38px;
  }

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

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

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

  .horizontal-card {
    grid-template-columns: 132px 1fr;
  }

  .rank-number {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-wrap {
    width: min(100% - 22px, 1280px);
  }

  .logo {
    font-size: 20px;
  }

  .hero-carousel {
    height: 500px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
  }

  .hero-actions,
  .section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost,
  .btn-soft {
    width: 100%;
  }

  .hero-arrow {
    display: none;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .horizontal-card {
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 10px;
  }

  .horizontal-card .poster {
    aspect-ratio: 3 / 4;
  }
}
