:root {
  --bg: #060708;
  --panel: #101419;
  --panel-soft: #151a21;
  --line: #333d47;
  --line-soft: #1a2129;
  --text: #ffffff;
  --muted: #a8b3c1;
  --faint: #758092;
  --primary: #f5871f;
  --primary-dark: #d86d10;
  --primary-soft: rgba(245, 135, 31, 0.18);
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 135, 31, 0.08), transparent 35%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #111;
  box-shadow: 0 0 28px rgba(245, 135, 31, 0.35);
}

.brand-name {
  font-size: 21px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.mobile-link {
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--panel);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--panel);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) brightness(0.58);
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 7, 8, 0.98) 0%, rgba(6, 7, 8, 0.74) 48%, rgba(6, 7, 8, 0.18) 100%), linear-gradient(0deg, rgba(6, 7, 8, 0.95), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 72px 24px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 54px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.page-hero span,
.section-head span {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 670px;
  margin: 0 0 28px;
  color: #d6deea;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.78;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(245, 135, 31, 0.22);
  border-radius: 999px;
  background: var(--primary-soft);
  color: #ffb86b;
  font-size: 13px;
}

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

.primary-button,
.secondary-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  background: var(--primary);
  color: #121212;
}

.secondary-button {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--line);
  background: rgba(16, 20, 25, 0.72);
  color: var(--text);
}

.small-button {
  min-height: 38px;
  padding: 0 16px;
  background: var(--primary-soft);
  color: var(--primary);
}

.primary-button:hover,
.secondary-button:hover,
.small-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(6, 7, 8, 0.62);
  backdrop-filter: blur(12px);
}

.hero-controls button {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.hero-controls > button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35) !important;
}

.hero-dot.active {
  width: 26px;
  border-radius: 999px;
  background: var(--primary) !important;
}

.search-band {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(16, 20, 25, 0.72);
}

.search-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  align-items: center;
  gap: 28px;
}

.search-inner h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

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

.home-search,
.tool-controls {
  display: flex;
  gap: 12px;
}

.home-search input,
.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0d10;
  color: var(--text);
  padding: 0 15px;
  outline: none;
}

.home-search input:focus,
.catalog-tools input:focus,
.catalog-tools select:focus {
  border-color: var(--primary);
}

.home-search button {
  min-width: 96px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #111;
  font-weight: 800;
  cursor: pointer;
}

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

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

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-head a {
  color: var(--primary);
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 135, 31, 0.45);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0b0d10;
}

.poster-link img,
.rank-cover img,
.hero-poster img,
.detail-cover img,
.category-tile img,
.category-overview-card img {
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.8));
}

.year-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.year-badge {
  top: 12px;
  left: 12px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #111;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.rank-meta {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 8px 0 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-card.compact h2 {
  font-size: 16px;
}

.movie-card.compact p {
  min-height: 44px;
  font-size: 13px;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--panel);
}

.category-tile span,
.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 7, 8, 0.92), rgba(6, 7, 8, 0.15));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 50px;
  font-size: 24px;
}

.category-tile em {
  bottom: 22px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  min-height: 360px;
  padding: 90px 24px 60px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line-soft);
}

.page-hero.small-hero {
  background: radial-gradient(circle at top right, rgba(245, 135, 31, 0.16), transparent 35%), linear-gradient(135deg, #101419, #060708);
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78;
}

.catalog-tools {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(16, 20, 25, 0.78);
  display: grid;
  grid-template-columns: 1fr minmax(420px, 620px);
  gap: 24px;
  align-items: center;
}

.catalog-tools h2 {
  margin: 0 0 8px;
}

.catalog-tools p {
  margin: 0;
  color: var(--muted);
}

.tool-controls select {
  max-width: 150px;
}

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

.empty-state.show {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(90deg, var(--panel-soft), var(--panel));
}

.rank-number {
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0b0d10;
}

.rank-info h2 {
  margin: 6px 0;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.compact-rank .rank-row:nth-child(n + 7) {
  display: none;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--primary);
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 20px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  background: #0b0d10;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 12px 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0;
  color: #d6deea;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.detail-meta-grid span {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--muted);
}

.player-section {
  padding-top: 48px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(circle, rgba(245, 135, 31, 0.2), rgba(0, 0, 0, 0.74));
  color: var(--text);
  cursor: pointer;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #111;
  font-size: 32px;
  box-shadow: 0 0 42px rgba(245, 135, 31, 0.35);
}

.player-overlay strong {
  font-size: 20px;
}

.video-player.player-ready .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-panel {
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--panel);
}

.text-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.category-overview-card {
  min-height: 260px;
  display: flex;
  align-items: flex-end;
}

.category-overview-card > div {
  position: relative;
  z-index: 2;
  padding: 22px;
}

.category-overview-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 26px;
}

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

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line-soft);
  background: var(--panel);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.7;
}

.footer-links h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-link-grid {
  display: grid;
  gap: 10px;
}

.footer-link-grid a {
  color: var(--muted);
}

.footer-link-grid a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding: 20px 24px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

@media (max-width: 1180px) {
  .featured-grid,
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 54px;
  }

  .hero-poster {
    display: none;
  }

  .search-inner,
  .catalog-tools,
  .detail-hero,
  .detail-text,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 48px 82px 1fr;
  }

  .rank-row .small-button {
    display: none;
  }

  .detail-cover {
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 0 16px;
  }

  .hero-content,
  .section-wrap,
  .page-hero,
  .detail-hero,
  .breadcrumb,
  .search-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .home-search,
  .tool-controls {
    flex-direction: column;
  }

  .tool-controls select {
    max-width: none;
  }

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

  .rank-number {
    text-align: left;
  }

  .rank-cover {
    width: 120px;
  }
}
