:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.58);
  --bg-card-strong: rgba(15, 23, 42, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-deep: #ea580c;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 58%, #020617 100%);
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.96));
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.38);
  font-size: 20px;
  font-weight: 900;
}

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

.brand-text span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(30, 41, 59, 0.72);
  border-radius: 12px;
  padding: 10px 14px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 18px;
}

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

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 36%, rgba(2, 6, 23, 0.28) 70%, rgba(2, 6, 23, 0.72) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.15) 48%, rgba(2, 6, 23, 0.44) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 76vh;
  display: flex;
  align-items: center;
  padding: 96px 0 120px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #fbbf24;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 22px #f59e0b;
}

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

.hero p {
  max-width: 660px;
  margin: 0 0 26px;
  color: #dbe4ef;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-meta,
.movie-meta,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(30, 41, 59, 0.64);
  color: #dbe4ef;
  font-size: 13px;
  line-height: 1;
}

.pill.accent {
  border-color: rgba(245, 158, 11, 0.44);
  color: #fff7ed;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(234, 88, 12, 0.95));
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.25);
  transition: 0.25s ease;
}

.button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 48px rgba(245, 158, 11, 0.34);
}

.button.secondary {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: none;
}

.button.secondary:hover {
  border-color: rgba(245, 158, 11, 0.44);
  color: #fbbf24;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 610px;
  margin-top: 32px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  padding: 12px 14px;
}

.hero-panel {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 60px;
  width: min(430px, calc(100% - 48px));
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-thumb {
  position: relative;
  border: 1px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-thumb img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  opacity: 0.72;
}

.hero-thumb span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-thumb.is-active {
  border-color: rgba(245, 158, 11, 0.9);
  transform: translateY(-2px);
}

.hero-thumb.is-active img {
  opacity: 1;
}

.section {
  padding: 72px 0;
}

.section.soft {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), transparent);
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: var(--bg-card);
  transition: 0.28s ease;
}

.movie-card-link:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.86);
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

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

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

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(2, 6, 23, 0.42);
  transition: 0.25s ease;
}

.movie-card-link:hover .play-badge {
  opacity: 1;
}

.play-badge i,
.player-overlay i {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 18px 35px rgba(245, 158, 11, 0.34);
  font-style: normal;
}

.poster-tags {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.poster-tags .pill {
  min-height: auto;
  padding: 6px 9px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.card-meta {
  color: #94a3b8;
  font-size: 13px;
}

.horizontal-list {
  display: grid;
  gap: 14px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.52);
  transition: 0.25s ease;
}

.horizontal-card:hover {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(30, 41, 59, 0.82);
  transform: translateX(4px);
}

.horizontal-card img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
}

.horizontal-content {
  padding: 16px 16px 16px 0;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.8fr);
  gap: 28px;
}

.side-panel,
.content-panel,
.category-card,
.info-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.side-panel,
.content-panel {
  padding: 24px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-card {
  padding: 24px;
  min-height: 210px;
  transition: 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
}

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

.category-preview {
  display: flex;
  gap: 8px;
}

.category-preview img {
  width: 62px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
}

.page-hero {
  padding: 68px 0 42px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at 16% 0%, rgba(245, 158, 11, 0.20), transparent 30rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.18));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -0.04em;
}

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

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

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px 150px;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-list {
  display: grid;
  gap: 12px;
  counter-reset: rank;
}

.rank-item {
  counter-increment: rank;
  position: relative;
  display: grid;
  grid-template-columns: 86px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.52);
  transition: 0.25s ease;
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(30, 41, 59, 0.82);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #fff7ed;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(234, 88, 12, 0.95));
}

.rank-item img {
  width: 150px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.48);
  cursor: pointer;
  z-index: 2;
}

.player-overlay[hidden] {
  display: none;
}

.player-overlay span {
  font-weight: 800;
  letter-spacing: 0.03em;
}

.detail-main h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  margin-bottom: 18px;
}

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

.info-card {
  padding: 22px;
  position: sticky;
  top: 96px;
}

.info-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.info-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-row span:first-child {
  color: var(--muted);
}

.info-row span:last-child,
.info-row a {
  color: #e2e8f0;
}

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

.no-result {
  display: none;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 20px;
}

.no-result.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
  padding: 44px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 26px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
}

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

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

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

.copyright {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
  backdrop-filter: blur(16px);
}

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

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

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

  .info-card {
    position: static;
  }

  .hero-panel {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 760px);
    margin: -88px auto 36px;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-text span {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-search,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 58px 106px 1fr;
  }

  .rank-item img {
    width: 106px;
    height: 72px;
  }

  .rank-item .button {
    grid-column: 1 / -1;
  }

  .horizontal-card {
    grid-template-columns: 128px 1fr;
  }

  .horizontal-content {
    padding: 12px 12px 12px 0;
  }

  .section {
    padding: 48px 0;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-content {
    padding: 74px 0 112px;
  }

  .hero-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.cards,
  .grid.compact,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-number,
  .rank-item img {
    width: 100%;
  }

  .rank-number {
    height: 44px;
  }

  .rank-item img {
    height: 170px;
  }

  .horizontal-card {
    grid-template-columns: 1fr;
  }

  .horizontal-card img {
    min-height: 190px;
  }

  .horizontal-content {
    padding: 0 14px 14px;
  }
}
