* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-panel: rgba(30, 41, 59, 0.58);
  --bg-panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f97316;
  --accent-light: #f59e0b;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.10), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 70px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.25);
  font-size: 0.9rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
}

.nav-link,
.nav-dropdown > button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 0;
  color: var(--muted-strong);
  background: transparent;
  font-weight: 600;
  transition: color 180ms ease, transform 180ms ease;
}

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

.nav-dropdown {
  position: relative;
}

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

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

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

.dropdown-panel a:hover {
  color: var(--accent-light);
  background: rgba(51, 65, 85, 0.8);
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.95);
  outline: none;
  transition: border 180ms ease, box-shadow 180ms ease;
}

.nav-search input {
  width: 270px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(249, 115, 22, 0.8);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.nav-search button,
.mobile-search button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  font-weight: 700;
  white-space: nowrap;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.24);
}

.secondary-button {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: none;
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.82);
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: var(--text);
}

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

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

.mobile-panel nav {
  display: grid;
  gap: 4px;
  padding: 12px 0;
}

.mobile-panel a,
.mobile-panel span {
  padding: 10px 4px;
  color: var(--muted-strong);
}

.mobile-panel span {
  color: var(--accent-light);
  font-weight: 800;
}

.main-section {
  padding: 56px 0;
}

.hero-wrap {
  padding: 34px 0 16px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  height: 600px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 680ms ease, transform 680ms ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.50) 42%, rgba(0, 0, 0, 0.10) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.90) 0%, transparent 48%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(34px, 8vw, 78px);
  width: min(680px, calc(100% - 48px));
}

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

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  max-width: 820px;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-content p {
  margin: 0 0 24px;
  max-width: 620px;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.hero-tags span,
.movie-tags span,
.movie-meta span,
.detail-chip,
.compact-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  font-size: 0.78rem;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: background 180ms ease, transform 180ms ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.44);
  transition: 180ms ease;
}

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

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease, border 220ms ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.35);
  background: var(--bg-panel-strong);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px) scale(1.01);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  margin: 0;
  background: rgba(15, 23, 42, 0.86);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease, filter 500ms ease;
}

.movie-card:hover .poster-wrap img,
.compact-card:hover img,
.category-card:hover img {
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.08);
}

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

.poster-badge,
.poster-score {
  position: absolute;
  z-index: 2;
  top: 10px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 26px;
}

.poster-badge {
  left: 10px;
  background: var(--accent);
}

.poster-score {
  right: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: 220ms ease;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}

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

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

.movie-card h3,
.compact-card h3,
.category-card h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.35;
  transition: color 180ms ease;
}

.movie-card:hover h3,
.compact-card:hover h3,
.category-card:hover h2 {
  color: var(--accent-light);
}

.movie-card p,
.compact-card p,
.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.movie-meta,
.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.h-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 20px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scroll-snap-type: x mandatory;
}

.h-scroll > * {
  scroll-snap-align: start;
}

.h-scroll::-webkit-scrollbar {
  height: 8px;
}

.h-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  overflow: hidden;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  transition: transform 220ms ease, background 220ms ease, border 220ms ease;
}

.compact-card:hover {
  border-color: rgba(249, 115, 22, 0.35);
  background: var(--bg-panel-strong);
  transform: translateY(-3px);
}

.compact-poster {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 180px;
  background: #111827;
}

.compact-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease, filter 500ms ease;
}

.rank-number {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.compact-card > div:last-child {
  align-self: center;
  padding: 18px 18px 18px 0;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.62);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  transition: transform 220ms ease, border 220ms ease;
}

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

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transition: 500ms ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.24));
}

.category-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 230px;
  padding: 24px;
}

.page-title {
  margin: 42px 0 30px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 28rem),
    rgba(15, 23, 42, 0.64);
  box-shadow: var(--shadow);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 180px;
  gap: 14px;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.filter-panel select {
  appearance: none;
}

.empty-state {
  display: none;
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 56px;
}

.detail-head {
  display: grid;
  gap: 16px;
}

.detail-head h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-subtitle {
  max-width: 880px;
  margin: 0;
  color: #fed7aa;
  font-size: 1.18rem;
  line-height: 1.8;
}

.detail-chips,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: #ffffff;
  background: #000000;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.22), transparent 24rem),
    linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.22));
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  font-size: 2rem;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45);
  transition: transform 180ms ease, filter 180ms ease;
}

.play-button:hover {
  transform: scale(1.06);
  filter: brightness(1.06);
}

.content-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: var(--bg-panel);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 1.6rem;
}

.content-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.content-panel + .content-panel {
  margin-top: 18px;
}

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

.related-section h2 {
  margin: 0 0 22px;
  font-size: 2rem;
}

.rank-page-list {
  display: grid;
  gap: 18px;
}

.rank-page-list .compact-card {
  grid-template-columns: 170px 1fr;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

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

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.05rem;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
}

.footer-bottom div {
  display: flex;
  gap: 18px;
  color: var(--muted);
}

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

  .nav-bar {
    justify-content: space-between;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero-slider,
  .hero-track {
    min-height: 520px;
    height: 520px;
  }

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

  .compact-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 1.28rem;
  }

  .hero-wrap {
    padding-top: 20px;
  }

  .hero-slider,
  .hero-track {
    min-height: 560px;
    height: 560px;
    border-radius: 22px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.42) 100%);
  }

  .hero-content {
    left: 18px;
    bottom: 54px;
    width: calc(100% - 36px);
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 2.55rem;
  }

  .hero-control {
    display: none;
  }

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

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

  .compact-card,
  .rank-page-list .compact-card {
    grid-template-columns: 112px 1fr;
    min-height: 150px;
  }

  .compact-poster {
    min-height: 150px;
  }

  .compact-card > div:last-child {
    padding: 14px 14px 14px 0;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .page-title {
    margin-top: 24px;
    padding: 28px 20px;
  }

  .detail-head h1 {
    font-size: 2.45rem;
  }

  .content-panel {
    padding: 22px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
