:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --amber: #f59e0b;
  --orange: #f97316;
  --glow: rgba(245, 158, 11, 0.32);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.78));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.nav-shell,
.container,
.footer-grid,
.footer-bottom,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, var(--orange));
  box-shadow: 0 0 32px var(--glow);
  font-weight: 900;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 21px;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.16);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: #f8fafc;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  padding-top: 72px;
}

.hero-backgrounds,
.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  transition: opacity 0.9s ease, transform 1.4s ease;
}

.hero-bg.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 34%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.36));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(82vh - 72px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: end;
  padding: 72px 0 70px;
}

.hero-copy {
  position: relative;
  min-height: 360px;
}

.hero-slide {
  position: absolute;
  inset: auto 0 56px 0;
  max-width: 780px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-kicker span {
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #f97316);
}

.hero-slide h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-slide p {
  max-width: 720px;
  margin: 0 0 18px;
  color: #dbeafe;
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.tag-list span,
.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  background: rgba(15, 23, 42, 0.62);
  color: #fde68a;
  font-size: 13px;
}

.hero-actions,
.section-heading,
.card-stats,
.meta-line,
.footer-bottom,
.detail-meta,
.filter-row {
  display: flex;
  align-items: center;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  color: #111827;
  background: linear-gradient(90deg, #fcd34d, #fb923c);
  box-shadow: 0 18px 42px var(--glow);
}

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: rgba(15, 23, 42, 0.48);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: #fbbf24;
}

.hero-aside {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-aside h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.hero-aside a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-aside a:last-child {
  border-bottom: 0;
}

.hero-aside span {
  color: #f59e0b;
  font-weight: 900;
}

.hero-aside strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-aside em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.section {
  padding: 62px 0;
}

.page-main {
  padding-top: 72px;
}

.page-hero {
  min-height: 360px;
  display: grid;
  align-items: end;
  padding: 86px max(16px, calc((100vw - 1180px) / 2)) 54px;
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.24), transparent 28%), linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.86));
  background-size: cover;
  background-position: center;
}

.page-hero h1 {
  max-width: 820px;
  margin: 12px 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.section-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading > a,
.text-link {
  color: #fbbf24;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(15, 23, 42, 0.86);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #020617);
}

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

.movie-card:hover .poster-link img,
.category-tile:hover img,
.podium-card:hover img {
  transform: scale(1.07);
}

.poster-shade,
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.06));
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  box-shadow: 0 0 34px var(--glow);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
}

.rank-number {
  left: 10px;
  top: 10px;
  padding: 6px 10px;
  color: #fbbf24;
}

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

.meta-line {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card h2 {
  margin: 0 0 8px;
  min-height: 48px;
  color: #fff;
  font-size: 17px;
  line-height: 1.45;
}

.movie-card h2 a:hover {
  color: #fbbf24;
}

.movie-card p {
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-stats {
  justify-content: space-between;
  color: #cbd5e1;
  font-size: 13px;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.5s ease;
}

.tile-content {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: grid;
  gap: 8px;
}

.tile-content strong {
  font-size: 24px;
}

.tile-content small,
.tile-content em {
  color: #cbd5e1;
  line-height: 1.55;
}

.tile-content em {
  color: #fbbf24;
  font-style: normal;
}

.search-panel {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.search-box {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  outline: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.74);
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.64);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-row {
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.72);
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.empty-state {
  margin: 28px 0;
  padding: 28px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 24px;
  color: #cbd5e1;
  text-align: center;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.category-row-copy span {
  color: #fbbf24;
  font-weight: 800;
}

.category-row-copy h2 {
  margin: 8px 0;
  font-size: 28px;
}

.category-row-copy p {
  color: #cbd5e1;
  line-height: 1.75;
}

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

.category-row-links a {
  padding: 14px;
  border-radius: 16px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.54);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-row-links a:hover {
  color: #fbbf24;
}

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

.podium-card {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(251, 191, 36, 0.26);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}

.podium-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.podium-card span,
.podium-card strong,
.podium-card em {
  position: relative;
  z-index: 1;
}

.podium-card span {
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.podium-card strong {
  margin-top: 14px;
  font-size: 26px;
}

.podium-card em {
  color: #cbd5e1;
  font-style: normal;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 104px 0 20px;
  color: #94a3b8;
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: radial-gradient(circle at 100% 0, rgba(245, 158, 11, 0.14), transparent 36%), rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.detail-one-line {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.86;
}

.detail-meta {
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.detail-meta div {
  min-width: 120px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.player-section {
  padding: 32px 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 32px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  box-shadow: 0 0 60px var(--glow);
  font-size: 30px;
}

.play-cover strong {
  font-size: clamp(18px, 3vw, 28px);
}

.content-panel,
.related-section {
  margin: 0 auto 48px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.66);
}

.content-panel h2 {
  margin: 10px 0 12px;
  font-size: 24px;
}

.content-panel p {
  color: #cbd5e1;
  line-height: 2;
}

.related-grid .movie-card-compact h2 {
  min-height: auto;
}

.site-footer {
  margin-top: 58px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #94a3b8;
  line-height: 1.8;
}

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

.footer-grid li {
  margin: 7px 0;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    display: none;
  }

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

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

@media (max-width: 780px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-inner {
    min-height: 688px;
    padding-bottom: 48px;
  }

  .hero-copy {
    min-height: 520px;
  }

  .hero-slide {
    bottom: 54px;
  }

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .podium,
  .footer-grid,
  .detail-hero,
  .category-row {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 360px;
  }

  .section {
    padding: 42px 0;
  }

  .category-row-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .container,
  .footer-grid,
  .footer-bottom,
  .detail-main {
    width: min(100% - 22px, 1180px);
  }

  .brand-copy small {
    display: none;
  }

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

  .page-hero {
    padding-inline: 12px;
  }

  .detail-hero,
  .content-panel,
  .related-section,
  .player-card,
  .search-panel {
    border-radius: 22px;
  }
}
