:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-soft: rgba(30, 41, 59, 0.55);
  --line: rgba(126, 34, 206, 0.32);
  --line-bright: rgba(251, 191, 36, 0.45);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #fbbf24;
  --amber-deep: #d97706;
  --purple: #7e22ce;
  --purple-soft: rgba(88, 28, 135, 0.45);
  --radius: 18px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

* {
  box-sizing: border-box;
}

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;
  background: linear-gradient(180deg, #0f172a 0%, #111827 48%, #020617 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(126, 34, 206, 0.35);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
}

.brand__copy {
  display: grid;
  gap: 2px;
}

.brand__name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: transparent;
  background: linear-gradient(90deg, #fde68a, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand__tagline {
  font-size: 12px;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  white-space: nowrap;
}

.main-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: var(--amber);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
}

.nav-search input {
  width: 150px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 8px 8px 12px;
}

.nav-search button,
.search-panel button,
.hero__button,
.section-more,
.filter-btn,
.player-cta,
.footer-bottom button {
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

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

.nav-search button:hover,
.search-panel button:hover,
.hero__button:hover,
.section-more:hover,
.filter-btn:hover,
.player-cta:hover,
.footer-bottom button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.34);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fbbf24;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 12px;
  flex-wrap: wrap;
}

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

.main {
  min-height: 60vh;
}

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

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero__slides,
.hero__slide,
.hero__media,
.hero__media img,
.hero__overlay {
  position: absolute;
  inset: 0;
}

.hero__slide {
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 30% 20%, rgba(126, 34, 206, 0.56), transparent 40%), linear-gradient(135deg, #111827, #020617);
}

.hero__overlay {
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.68) 45%, rgba(15, 23, 42, 0.18) 100%);
}

.hero__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 76px;
  z-index: 2;
}

.hero__content {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--amber);
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
}

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

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 12px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.hero__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-weight: 800;
}

.hero__tools {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  pointer-events: none;
}

.hero__arrow {
  position: absolute;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  pointer-events: auto;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero__arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: scale(1.05);
}

.hero__arrow--prev {
  left: 24px;
}

.hero__arrow--next {
  right: 24px;
}

.hero__dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero__dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero__dot.is-active {
  width: 34px;
  background: var(--amber);
}

.content-stack {
  display: grid;
  gap: 72px;
  padding: 56px 0 20px;
}

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

.section-head span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  color: #fde68a;
}

.section-head p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  font-weight: 800;
  white-space: nowrap;
}

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 4px 20px;
  scrollbar-color: #581c87 #0f172a;
}

.rail .movie-card {
  width: 320px;
  flex: 0 0 320px;
}

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

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

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

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.54), rgba(15, 23, 42, 0.58));
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.62), rgba(30, 41, 59, 0.62));
  box-shadow: 0 24px 70px rgba(251, 191, 36, 0.12);
}

.movie-card__link,
.movie-card__body,
.movie-card__poster {
  display: block;
}

.movie-card__poster {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(126, 34, 206, 0.42), transparent 38%), linear-gradient(135deg, #1e293b, #020617);
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.movie-card__shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.16));
  transition: opacity 0.3s ease;
}

.movie-card:hover .movie-card__shade {
  opacity: 1;
}

.movie-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 56px;
  opacity: 0;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.65);
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
  transform: scale(1);
}

.movie-card__region,
.rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(126, 34, 206, 0.82);
}

.rank-num {
  left: auto;
  right: 12px;
  background: rgba(245, 158, 11, 0.9);
  color: #111827;
}

.movie-card__body {
  padding: 16px;
}

.movie-card__body strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  margin-bottom: 8px;
  color: #fef3c7;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card__body strong {
  color: var(--amber);
}

.movie-card__body > span:not(.tag-row) {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card__body em {
  display: block;
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 13px;
  font-style: normal;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #d8b4fe;
  background: rgba(88, 28, 135, 0.34);
  border: 1px solid rgba(126, 34, 206, 0.24);
  font-size: 12px;
  font-weight: 700;
}

.movie-card--large {
  grid-column: span 2;
}

.movie-card--large .movie-card__poster {
  height: 350px;
}

.movie-card--horizontal .movie-card__link {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0;
}

.movie-card--horizontal .movie-card__poster {
  height: 126px;
}

.movie-card--horizontal .movie-card__body strong {
  min-height: auto;
  -webkit-line-clamp: 1;
}

.movie-card--horizontal .movie-card__body > span:not(.tag-row) {
  min-height: auto;
}

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

.category-card {
  min-height: 178px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65), rgba(88, 28, 135, 0.24));
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: #fef3c7;
  font-size: 22px;
}

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

.page-hero {
  padding: 72px 0 34px;
  background: radial-gradient(circle at 20% 0%, rgba(126, 34, 206, 0.28), transparent 36%), radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.15), transparent 34%);
}

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

.breadcrumb a {
  color: #fbbf24;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 28px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.6);
}

.search-panel input {
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.8);
}

.search-panel button {
  padding: 0 24px;
  font-weight: 800;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.filter-btn {
  padding: 10px 14px;
  color: #fde68a;
  background: rgba(88, 28, 135, 0.42);
  box-shadow: none;
}

.filter-btn.is-active {
  color: #111827;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
}

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

.detail-panel,
.sidebar-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.56), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-copy {
  padding: 26px;
}

.detail-copy h1 {
  margin: 0 0 16px;
  color: #fef3c7;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
}

.detail-copy h2 {
  margin: 32px 0 12px;
  color: #fde68a;
  font-size: 24px;
}

.detail-copy p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0 0 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  color: #fff;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  background: radial-gradient(circle at 30% 20%, rgba(126, 34, 206, 0.55), transparent 40%), linear-gradient(135deg, #111827, #020617);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.25));
}

.player-cover__content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.play-badge {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 26px 60px rgba(245, 158, 11, 0.32);
  font-size: 30px;
}

.player-cover strong {
  color: #fff7ed;
  font-size: clamp(24px, 4vw, 42px);
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sidebar-panel {
  padding: 20px;
}

.sidebar-panel h2 {
  margin: 0 0 16px;
  color: #fde68a;
  font-size: 22px;
}

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

.sidebar-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.48);
  transition: background 0.2s ease;
}

.sidebar-item:hover {
  background: rgba(51, 65, 85, 0.74);
}

.sidebar-item img {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.sidebar-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fef3c7;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: var(--panel-soft);
  text-align: center;
}

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

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(126, 34, 206, 0.32);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), #020617);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

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

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--amber);
  font-size: 18px;
}

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

.site-footer li {
  margin: 8px 0;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(126, 34, 206, 0.22);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom button {
  padding: 10px 14px;
}

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

  .menu-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .nav-search {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .site-header__inner {
    min-height: 68px;
  }

  .brand__name {
    font-size: 19px;
  }

  .hero {
    min-height: 590px;
    height: 76vh;
  }

  .hero__inner {
    padding-bottom: 88px;
  }

  .hero__arrow {
    display: none;
  }

  .section-head {
    display: grid;
  }

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

  .movie-card__poster {
    height: 210px;
  }

  .movie-card--large {
    grid-column: span 2;
  }

  .movie-card--horizontal .movie-card__link,
  .sidebar-item {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .movie-card--horizontal .movie-card__poster {
    height: 112px;
  }

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

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

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

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid--dense,
  .category-cards {
    grid-template-columns: 1fr;
  }

  .movie-card--large {
    grid-column: span 1;
  }

  .rail .movie-card {
    width: 280px;
    flex-basis: 280px;
  }
}
