:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.22);
  --muted: #94a3b8;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --orange: #f97316;
  --orange-2: #fb923c;
  --red: #ef4444;
  --blue: #4f46e5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(249, 115, 22, 0.22), transparent 28rem),
    radial-gradient(circle at 78% 18%, rgba(79, 70, 229, 0.28), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

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

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

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

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand {
  font-size: 1.35rem;
}

.brand-mark {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 36px rgba(249, 115, 22, 0.32);
}

.desktop-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link,
.footer-links a,
.mobile-nav a {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.footer-links a:hover,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(249, 115, 22, 0.16);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
}

.menu-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 0 1.25rem 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 1240px;
  margin: 0 auto;
}

.mobile-nav.open {
  display: flex;
}

.page-wrap,
.section,
.category-page,
.detail-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero {
  position: relative;
  max-width: 1240px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 2rem;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 620px;
  isolation: isolate;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.74fr);
  gap: 2rem;
  align-items: center;
  animation: fadeIn 0.5s ease both;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--bg-image);
  background-position: center;
  background-size: cover;
  filter: blur(22px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.36;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.82) 46%, rgba(2, 6, 23, 0.58) 100%),
    radial-gradient(circle at 65% 40%, rgba(249, 115, 22, 0.23), transparent 24rem);
}

.hero-copy {
  padding: 4.2rem 0 4.2rem 4.2rem;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid rgba(249, 115, 22, 0.38);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  font-size: 0.85rem;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 1.4rem;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.32);
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #fb923c, #dc2626);
}

.hero-poster {
  position: relative;
  padding: 4.2rem 4.2rem 4.2rem 0;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster-card {
  position: absolute;
  left: -1rem;
  bottom: 6rem;
  max-width: 18rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-controls {
  position: absolute;
  left: 4.2rem;
  right: 4.2rem;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 3;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 2.2rem;
  background: var(--orange);
}

.hero-arrow {
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.search-panel {
  max-width: 1240px;
  margin: 1.2rem auto 0;
  padding: 0 1.25rem;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.search-box input,
.filter-input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  color: var(--text);
  background: rgba(2, 6, 23, 0.6);
  padding: 0 1rem;
  outline: none;
}

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

.section {
  padding-top: 4rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-head h2,
.category-title h1,
.detail-title h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head p,
.category-title p,
.page-hero p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  flex: none;
  color: #fed7aa;
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 10rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(79, 70, 229, 0.14)),
    rgba(15, 23, 42, 0.8);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 950;
}

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

.category-tile span {
  position: absolute;
  right: 1rem;
  bottom: 0.8rem;
  color: rgba(255, 255, 255, 0.18);
  font-size: 4rem;
  font-weight: 950;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card[hidden] {
  display: none;
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.card-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img {
  transform: scale(1.06);
}

.play-dot {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 2.3rem;
  height: 2.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.card-rank {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  min-width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-style: normal;
  font-weight: 950;
}

.card-body {
  padding: 0.95rem;
}

.card-title {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.36;
}

.card-title:hover {
  color: #fed7aa;
}

.card-meta {
  margin-bottom: 0.55rem;
}

.card-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.91rem;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.75rem;
}

.tag-row span,
.info-pill {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 4rem 5.3rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.72);
}

.rank-no {
  color: #fed7aa;
  font-size: 1.55rem;
  font-weight: 950;
  text-align: center;
}

.rank-item img {
  width: 5.3rem;
  aspect-ratio: 3 / 4;
  border-radius: 0.8rem;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 0.3rem;
  font-weight: 950;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.page-hero {
  max-width: 1240px;
  margin: 1.5rem auto 0;
  padding: 3.4rem 1.25rem 1rem;
}

.page-hero-inner,
.category-title,
.detail-panel,
.player-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.7rem;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(79, 70, 229, 0.12)),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.page-hero-inner {
  padding: 2.4rem;
}

.category-title {
  margin-top: 1.5rem;
  padding: 2.4rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  margin: 1.2rem 0 1.4rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  border-color: rgba(249, 115, 22, 0.48);
  background: rgba(249, 115, 22, 0.15);
}

.detail-wrap {
  padding-top: 1.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.35rem;
}

.player-panel {
  overflow: hidden;
}

.player-box {
  position: relative;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78)),
    rgba(2, 6, 23, 0.18);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 5.6rem;
  height: 5.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 22px 60px rgba(249, 115, 22, 0.38);
  font-size: 2rem;
  cursor: pointer;
}

.player-caption {
  padding: 1.1rem 1.2rem 1.3rem;
}

.player-caption h1,
.player-caption h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.player-caption p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.7rem;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

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

.detail-cover-info {
  padding: 1rem;
}

.detail-panel {
  margin-top: 1.35rem;
  padding: 1.5rem;
}

.detail-panel h2,
.detail-panel h3 {
  margin: 0 0 0.8rem;
  font-size: 1.5rem;
  font-weight: 950;
}

.detail-panel p {
  margin: 0 0 1rem;
  color: var(--text-soft);
  line-height: 1.95;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.info-card {
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.36);
}

.info-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #fed7aa;
  font-size: 0.85rem;
}

.info-card span {
  color: var(--text-soft);
}

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

.no-result {
  display: none;
  margin: 1.5rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
}

.no-result.show {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .hero-slide.is-active,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-poster {
    padding: 3rem;
  }

  .hero-poster-card {
    left: 4rem;
    bottom: 4rem;
  }

  .detail-cover {
    max-width: 26rem;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .brand {
    font-size: 1.05rem;
  }

  .hero,
  .search-panel,
  .section,
  .page-hero,
  .category-page,
  .detail-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-slide {
    min-height: auto;
  }

  .hero-copy,
  .hero-poster {
    padding: 2rem 1.2rem;
  }

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

  .hero-poster-card {
    position: static;
    margin-top: 1rem;
    max-width: none;
  }

  .hero-controls {
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1rem;
  }

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

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

  .category-grid,
  .rank-list,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 3rem 4.6rem 1fr;
  }

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

  .page-hero-inner,
  .category-title,
  .detail-panel {
    padding: 1.4rem;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
