:root {
  color-scheme: dark;
  --bg: #080b14;
  --bg-soft: #101522;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f8fafc;
  --muted: #a8b3c7;
  --soft: #cbd5e1;
  --accent: #f97316;
  --accent-2: #ef4444;
  --accent-3: #7c3aed;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(239, 68, 68, 0.24), transparent 28rem),
    radial-gradient(circle at 84% 10%, rgba(124, 58, 237, 0.23), transparent 30rem),
    linear-gradient(180deg, #0a0f1d 0%, #080b14 42%, #060812 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 20, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1220px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.36);
}

.brand-text {
  font-size: 1.22rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 36vw);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.header-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-width: 0;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input::placeholder,
.filter-bar input::placeholder {
  color: rgba(203, 213, 225, 0.72);
}

.header-search button,
.btn,
.play-button,
.filter-bar button {
  border: 0;
  color: white;
  cursor: pointer;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
}

.btn,
.play-button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-weight: 800;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  border: 1px solid var(--line);
}

.header-search button:hover,
.btn:hover,
.play-button:hover,
.filter-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.28);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: white;
}

main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  margin: 28px auto 54px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(8px);
}

.hero::before {
  width: 360px;
  height: 360px;
  right: -120px;
  top: -120px;
  background: rgba(249, 115, 22, 0.28);
}

.hero::after {
  width: 420px;
  height: 420px;
  left: -180px;
  bottom: -220px;
  background: rgba(124, 58, 237, 0.26);
}

.hero-track {
  position: relative;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 42px;
  padding: clamp(28px, 6vw, 70px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  color: #fed7aa;
  border: 1px solid rgba(251, 146, 60, 0.34);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.9vw, 1.18rem);
  line-height: 1.85;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-poster {
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: min(340px, 100%);
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.52);
  transform: rotate(2deg);
}

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

.hero-meta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(8, 11, 20, 0.72);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 6vw, 70px);
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.26);
}

.hero-dot.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.section {
  margin: 48px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

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

.category-strip,
.footer-cats,
.tag-row,
.breadcrumbs,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pill,
.tag-row span,
.breadcrumbs a,
.breadcrumbs span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.category-pill:hover,
.breadcrumbs a:hover {
  color: white;
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.16);
}

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

.movie-card,
.category-card,
.rank-item,
.info-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.20);
}

.movie-card {
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(30, 41, 59, 0.86);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: white;
  background: rgba(8, 11, 20, 0.76);
  backdrop-filter: blur(12px);
}

.poster-play {
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(239, 68, 68, 0.35);
}

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

.movie-card-title {
  display: -webkit-box;
  min-height: 2.9em;
  overflow: hidden;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 4.55em;
  margin: 10px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row span {
  min-height: auto;
  padding: 4px 8px;
  font-size: 0.78rem;
}

.page-hero,
.detail-hero {
  margin: 34px 0 34px;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(124, 58, 237, 0.13)),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 160px auto;
  gap: 12px;
  margin: 24px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8, 11, 20, 0.45);
}

.filter-bar select option {
  color: #111827;
}

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

.category-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card img {
  width: 130px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.category-card h2 {
  margin: 0 0 10px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 82px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  font-weight: 900;
  background: rgba(249, 115, 22, 0.15);
  color: #fed7aa;
}

.rank-item img {
  width: 82px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(250px, 330px) 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.detail-title h1 {
  margin-top: 16px;
}

.player-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-wrap {
  position: relative;
  background: #020617;
}

.video-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

.video-overlay.hidden {
  display: none;
}

.play-button {
  min-width: 150px;
  min-height: 54px;
  font-size: 1.05rem;
}

.player-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  color: var(--soft);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin: 34px 0 54px;
}

.detail-section,
.side-section {
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
}

.detail-section p,
.side-section p,
.info-panel p {
  color: var(--soft);
  line-height: 1.9;
}

.detail-section p + p {
  margin-top: 18px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.side-card img {
  width: 72px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.side-card strong {
  display: block;
  line-height: 1.4;
}

.side-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.62);
}

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

.footer-inner p,
.footer-links a,
.footer-cats a {
  color: var(--muted);
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 16px;
}

.footer-links a:hover,
.footer-cats a:hover {
  color: white;
}

.empty-message {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 24px;
}

@media (max-width: 1040px) {
  .nav-shell {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav,
  .header-search {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
  }

  .main-nav.open,
  .header-search.open {
    display: flex;
  }

  .main-nav.open {
    flex-wrap: wrap;
    padding-bottom: 4px;
  }

  .header-search.open {
    margin-bottom: 14px;
  }

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

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

  .hero-poster {
    width: min(260px, 78%);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  main {
    width: min(100% - 22px, 1220px);
  }

  .hero,
  .hero-slide {
    min-height: 740px;
  }

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

  .filter-bar,
  .category-overview,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .category-card {
    grid-template-columns: 92px 1fr;
  }

  .category-card img,
  .rank-item img {
    width: 92px;
  }

  .player-title,
  .section-head {
    display: block;
  }
}

@media (max-width: 460px) {
  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 2.15rem;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .btn,
  .play-button {
    width: 100%;
  }
}
