* {
  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: #f5f5f5;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.08), transparent 30rem),
    #0a0a0a;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

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

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111111;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.26);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #d4d4d4;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: #f59e0b;
}

.menu-button {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 14px;
  color: #ffffff;
  background: #171717;
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid #262626;
  border-radius: 20px;
  background: #111111;
}

.mobile-nav a {
  display: block;
  padding: 12px 10px;
  color: #d4d4d4;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid #171717;
  background: #050505;
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, #0a0a0a 0%, rgba(10, 10, 10, 0.2) 42%, rgba(10, 10, 10, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.06em;
  color: #ffffff;
}

.hero h1 span,
.page-hero h1 span {
  color: #f59e0b;
}

.hero-lead,
.page-hero p,
.detail-title p {
  max-width: 690px;
  margin: 20px 0 0;
  color: #d4d4d4;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #111111;
  background: #f59e0b;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.26);
}

.btn-primary:hover {
  background: #fbbf24;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.72);
  color: #fbbf24;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(23, 23, 23, 0.78);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 12px;
  font-weight: 700;
}

.hero-nav {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-button,
.hero-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(10px);
}

.hero-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  color: transparent;
}

.hero-dot.active {
  width: 28px;
  background: #f59e0b;
  border-color: #f59e0b;
}

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

.main-content {
  padding: 72px 0;
}

.page-content {
  padding: 48px 0 74px;
}

.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 62px 0 34px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.section {
  margin-top: 72px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-header p {
  margin: 8px 0 0;
  color: #a3a3a3;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid #262626;
  border-radius: 22px;
  background: #111111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.86);
  box-shadow: 0 24px 68px rgba(245, 158, 11, 0.1);
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050505;
}

.movie-cover img,
.rank-poster img,
.detail-poster img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.05) 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-shade {
  opacity: 1;
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  right: 12px;
  bottom: 12px;
  min-height: 28px;
  padding: 0 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  color: #111111;
  background: #f59e0b;
}

.movie-body {
  padding: 16px;
}

.movie-body h3,
.rank-content h3,
.detail-info h2,
.related-list h2 {
  margin: 0;
  color: #ffffff;
}

.movie-body h3 {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-body h3 a,
.rank-content h3 a {
  transition: color 0.2s ease;
}

.movie-body h3 a:hover,
.rank-content h3 a:hover {
  color: #f59e0b;
}

.movie-body p,
.rank-content p,
.detail-copy p {
  color: #a3a3a3;
  line-height: 1.72;
}

.movie-body p {
  min-height: 52px;
  margin: 10px 0 14px;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #737373;
  font-size: 13px;
}

.movie-meta span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 10px;
  border-radius: 50%;
  background: #525252;
  vertical-align: middle;
}

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

.category-pill,
.category-card {
  border: 1px solid #262626;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(23, 23, 23, 0.96));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-pill {
  padding: 18px;
}

.category-pill:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.78);
}

.category-pill strong,
.category-card h2 {
  display: block;
  margin-bottom: 7px;
  color: #ffffff;
  font-size: 18px;
}

.category-pill span,
.category-card p {
  color: #a3a3a3;
  line-height: 1.65;
}

.scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
  display: none;
}

.scroller .movie-card {
  scroll-snap-align: start;
}

.rank-grid {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 64px 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid #262626;
  border-radius: 22px;
  background: rgba(17, 17, 17, 0.92);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.78);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #111111;
  background: #f59e0b;
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #050505;
}

.rank-content h3 {
  font-size: 20px;
}

.rank-content p {
  margin: 8px 0 12px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px 140px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid #262626;
  border-radius: 22px;
  background: #111111;
}

.catalog-toolbar input,
.catalog-toolbar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #262626;
  border-radius: 14px;
  color: #f5f5f5;
  background: #0a0a0a;
  padding: 0 14px;
  outline: none;
}

.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
  border-color: #f59e0b;
}

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

.category-card {
  overflow: hidden;
}

.category-cover {
  display: block;
  aspect-ratio: 21 / 8;
  overflow: hidden;
  background: #050505;
}

.category-card-body {
  padding: 22px;
}

.category-card .btn {
  margin-top: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #a3a3a3;
  font-size: 14px;
}

.breadcrumb a {
  color: #f59e0b;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  align-items: end;
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-poster {
  overflow: hidden;
  border: 1px solid #262626;
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #050505;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.2));
}

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

.play-orb {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111111;
  background: #f59e0b;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.34);
  font-size: 30px;
}

.player-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
}

.player-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.player-controls button {
  pointer-events: auto;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 17, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-content {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
}

.detail-copy,
.related-list,
.detail-side-card {
  border: 1px solid #262626;
  border-radius: 26px;
  background: rgba(17, 17, 17, 0.92);
}

.detail-copy {
  padding: 30px;
}

.detail-copy h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 26px;
}

.detail-copy p {
  margin: 0 0 20px;
  font-size: 16px;
}

.detail-copy p:last-child {
  margin-bottom: 0;
}

.detail-side {
  display: grid;
  gap: 20px;
  align-content: start;
}

.detail-side-card,
.related-list {
  padding: 22px;
}

.detail-side-card h2,
.related-list h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.info-list {
  display: grid;
  gap: 12px;
  color: #d4d4d4;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #262626;
}

.info-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list span:first-child {
  color: #737373;
}

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

.related-mini {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-mini img {
  width: 78px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
  background: #050505;
}

.related-mini strong {
  display: block;
  color: #ffffff;
  line-height: 1.4;
}

.related-mini span {
  display: block;
  margin-top: 4px;
  color: #737373;
  font-size: 12px;
}

.empty-state {
  display: none;
  margin: 24px 0;
  padding: 24px;
  border: 1px solid #262626;
  border-radius: 22px;
  color: #a3a3a3;
  background: #111111;
}

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

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

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

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

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

  .menu-button {
    display: flex;
  }

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

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding-top: 58px;
  }

  .hero-nav {
    left: 16px;
    right: auto;
    bottom: 20px;
  }

  .section-header {
    display: block;
  }

  .section-header .btn {
    margin-top: 14px;
  }

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

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

  .rank-item {
    grid-template-columns: 46px 92px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .detail-copy {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .nav-wrap,
  .main-content,
  .page-content,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-content,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .category-strip {
    grid-template-columns: 1fr;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    letter-spacing: -0.04em;
  }

  .rank-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .rank-poster {
    display: none;
  }

  .player-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .play-orb {
    width: 62px;
    height: 62px;
  }
}
