:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --text-soft: #d1d5db;
  --brand: #f59e0b;
  --brand-2: #ea580c;
  --brand-3: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  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;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 30%),
    radial-gradient(circle at 90% 15%, rgba(234, 88, 12, 0.12), transparent 32%),
    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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(18px);
  background: rgba(2, 6, 23, 0.84);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--brand-3), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--text-soft);
  padding: 10px 13px;
  border-radius: 12px;
  transition: 0.22s ease;
  font-size: 0.94rem;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: rgba(245, 158, 11, 0.18);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.12);
  color: white;
}

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

.showcase {
  position: relative;
  min-height: clamp(620px, 76vh, 820px);
  overflow: hidden;
  isolation: isolate;
  background: #020617;
}

.showcase-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: center;
  gap: clamp(28px, 6vw, 86px);
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.showcase-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.showcase-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(2px) saturate(1.05);
  z-index: -3;
}

.showcase-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.96)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 38%, #020617 100%);
  z-index: -2;
}

.showcase-content {
  max-width: 720px;
  padding: 110px 0 86px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--brand-3);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.showcase h1,
.page-cover h1,
.detail-header h1 {
  margin: 12px 0 18px;
  line-height: 1.06;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  letter-spacing: -0.05em;
}

.showcase p,
.page-cover p,
.detail-header p {
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.85;
}

.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 32px 0 20px;
}

.primary-btn,
.ghost-btn,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-btn,
.home-search button {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.24);
}

.ghost-btn {
  color: white;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(245, 158, 11, 0.32);
}

.full-width {
  width: 100%;
}

.showcase-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(2deg);
}

.showcase-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.42));
}

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

.showcase-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.showcase-dot {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: 0.22s ease;
}

.showcase-dot.is-active {
  width: 58px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.section-shell,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: center;
  margin-top: -36px;
  position: relative;
  z-index: 8;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search h2,
.section-heading h2,
.rank-panel h2,
.detail-section h2 {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}

.quick-search p {
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.8;
}

.home-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid var(--border);
}

.home-search input,
.search-field input,
.select-field select {
  width: 100%;
  color: white;
  border: 1px solid var(--border);
  outline: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
}

.home-search input {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  background: transparent;
}

.category-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 99px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 0.82rem;
}

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

.section-heading a {
  color: var(--brand-3);
  font-weight: 700;
}

.compact-heading {
  align-items: center;
  margin-bottom: 18px;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
}

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

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.05);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.86));
}

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-weight: 800;
}

.poster-play {
  left: 14px;
  bottom: 14px;
  min-height: 34px;
  padding: 0 14px;
  background: rgba(245, 158, 11, 0.92);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-height: 30px;
  padding: 0 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.card-body {
  padding: 18px;
}

.card-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 1.14rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--brand-3);
}

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

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

.is-compact .card-body p {
  min-height: 0;
}

.two-column-layout,
.rank-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.rank-panel,
.poster-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  padding: 22px;
  box-shadow: var(--shadow);
}

.sticky-panel {
  position: sticky;
  top: 96px;
}

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

.side-item {
  display: grid;
  grid-template-columns: auto 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: 0.22s ease;
}

.side-item:not(:has(.side-rank)) {
  grid-template-columns: 74px minmax(0, 1fr);
}

.side-item:hover {
  background: rgba(245, 158, 11, 0.13);
}

.side-rank {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.side-item img {
  width: 74px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
}

.side-item strong,
.side-item em {
  display: block;
}

.side-item strong {
  margin-bottom: 5px;
  line-height: 1.35;
}

.side-item em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.page-cover {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0 34px;
}

.page-cover h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

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

.category-card {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.35s ease;
}

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

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

.category-card-body {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
}

.category-card strong,
.category-card em {
  display: block;
}

.category-card strong {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.category-card em {
  color: var(--text-soft);
  line-height: 1.65;
  font-style: normal;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.search-field,
.select-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-field input,
.select-field select {
  min-height: 46px;
  padding: 0 14px;
}

.empty-state {
  display: none;
  margin: 26px 0 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.breadcrumb a:hover {
  color: var(--brand-3);
}

.detail-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

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

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.82));
}

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

.big-play {
  position: relative;
  z-index: 2;
  width: clamp(74px, 10vw, 104px);
  height: clamp(74px, 10vw, 104px);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.38);
  cursor: pointer;
}

.big-play span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid white;
  transform: translate(-38%, -50%);
}

.detail-header {
  padding: 30px 0 8px;
}

.detail-header h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
}

.detail-section {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.detail-section p {
  color: var(--text-soft);
  line-height: 1.9;
  font-size: 1.02rem;
}

.meta-section dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.meta-section div {
  padding: 16px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.meta-section dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.meta-section dd {
  margin: 6px 0 0;
  color: var(--text);
  font-weight: 700;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.prev-next a {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.prev-next span {
  display: block;
  color: var(--muted);
  margin-bottom: 7px;
  font-size: 0.88rem;
}

.prev-next strong {
  line-height: 1.45;
}

.poster-panel {
  margin-bottom: 22px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  gap: 14px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--brand-3);
}

@media (max-width: 1100px) {
  .three-cols,
  .four-cols,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column-layout,
  .rank-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .nav-link {
    width: 100%;
  }

  .showcase {
    min-height: 760px;
  }

  .showcase-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .showcase-content {
    padding: 98px 0 16px;
  }

  .showcase-poster {
    max-width: 260px;
    margin: 0 auto 86px;
  }

  .quick-search,
  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .home-search {
    flex-direction: column;
  }

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

  .meta-section dl,
  .prev-next {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 1rem;
  }

  .section-shell,
  .detail-shell,
  .page-cover {
    width: min(100% - 22px, 1240px);
  }

  .showcase-slide {
    width: min(100% - 22px, 1240px);
  }

  .movie-grid,
  .three-cols,
  .four-cols,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .detail-section,
  .rank-panel,
  .poster-panel {
    padding: 20px;
  }

  .side-item,
  .side-item:not(:has(.side-rank)) {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .side-rank {
    display: none;
  }

  .side-item img {
    width: 58px;
  }
}
