* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.86);
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --orange: #f97316;
  --orange-strong: #ea580c;
  --amber: #f59e0b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.site-nav {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fb923c, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 8px 22px rgba(249, 115, 22, 0.34);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(249, 115, 22, 0.16);
}

.nav-search {
  width: min(330px, 30vw);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(51, 65, 85, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 6px;
}

.nav-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input::placeholder,
.search-page-form input::placeholder,
.filter-panel input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.search-page-form button {
  border: 0;
  border-radius: 10px;
  padding: 8px 13px;
  color: #ffffff;
  background: var(--orange);
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-search button:hover,
.search-page-form button:hover {
  background: var(--orange-strong);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.9);
  cursor: pointer;
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.1)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.76));
}

.hero-copy {
  position: absolute;
  inset: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.25);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-cloud {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-bottom: 32px;
}

.hero-tags span,
.detail-meta span,
.tag-cloud span {
  border-radius: 999px;
  padding: 8px 13px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-tags span:first-child,
.detail-meta span:first-child {
  color: #ffffff;
  background: var(--orange);
  border-color: var(--orange);
}

.hero-actions,
.detail-title-row,
.section-heading,
.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.btn-primary,
.btn-secondary,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  min-height: 46px;
  padding: 12px 18px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.34);
}

.btn-secondary,
.section-more {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.28);
}

.btn-secondary:hover,
.section-more:hover {
  color: #ffffff;
  background: rgba(249, 115, 22, 0.24);
}

.btn-block {
  width: 100%;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 38px;
  background: var(--orange);
}

.page-main {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 70px;
}

.section-block {
  margin-bottom: 62px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1,
.detail-panel h1,
.side-panel h2,
.cta-panel h2 {
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.04em;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.46);
  box-shadow: 0 20px 44px rgba(249, 115, 22, 0.1), 0 16px 50px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.9);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.card-content strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.3;
}

.card-line {
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.1em;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-tags {
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.5;
}

.movie-card-horizontal,
.movie-card-compact {
  flex-direction: row;
  align-items: stretch;
}

.movie-card-horizontal .poster-wrap {
  width: 38%;
  min-width: 170px;
  aspect-ratio: 4 / 3;
}

.movie-card-compact {
  border-radius: 16px;
}

.movie-card-compact .poster-wrap {
  width: 86px;
  min-width: 86px;
  aspect-ratio: 3 / 4;
}

.movie-card-compact .card-content {
  padding: 12px;
}

.movie-card-compact .card-line,
.movie-card-compact .card-tags {
  display: none;
}

.movie-card-featured {
  min-height: 520px;
}

.soft-panel,
.rank-panel,
.cta-panel,
.page-hero,
.detail-panel,
.side-panel,
.search-panel,
.filter-panel,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
}

.soft-panel,
.rank-panel,
.cta-panel,
.search-panel,
.category-overview-card {
  padding: 28px;
}

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

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border-radius: 22px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.2), transparent 13rem),
    rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  border-color: rgba(249, 115, 22, 0.42);
  transform: translateY(-3px);
}

.category-name {
  color: #ffffff;
  font-size: 26px;
  font-weight: 850;
}

.category-desc {
  color: var(--muted);
  line-height: 1.75;
}

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

.category-preview span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 16px;
  padding: 15px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: 0.2s ease;
}

.rank-row:hover,
.ranking-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(249, 115, 22, 0.36);
}

.rank-num,
.ranking-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-weight: 900;
}

.rank-title {
  color: #ffffff;
  font-weight: 800;
}

.rank-meta {
  color: var(--subtle);
  font-size: 13px;
}

.cta-panel {
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.22), transparent 22rem),
    linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(245, 158, 11, 0.08));
}

.cta-panel p,
.page-hero p,
.category-overview-card p,
.side-panel p,
.detail-panel p {
  color: var(--muted);
  line-height: 1.85;
}

.page-hero {
  margin-bottom: 30px;
  padding: 42px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
}

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

.small-hero p {
  max-width: 820px;
  margin-bottom: 0;
}

.filter-panel {
  position: sticky;
  top: 88px;
  z-index: 10;
  margin-bottom: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  backdrop-filter: blur(18px);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
  min-height: 48px;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.movie-card.is-hidden {
  display: none;
}

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

.category-overview-head {
  margin-bottom: 20px;
}

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 58px 120px 1fr;
  gap: 18px;
  align-items: center;
  border-radius: 22px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: 0.2s ease;
}

.ranking-card img {
  width: 120px;
  height: 90px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-info strong {
  color: #ffffff;
  font-size: 20px;
}

.ranking-info em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.ranking-info small {
  color: var(--subtle);
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.search-page-form input {
  flex: 1;
}

.search-result-heading {
  margin-bottom: 18px;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--subtle);
}

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

.detail-main {
  width: min(1380px, calc(100% - 48px));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.detail-primary {
  min-width: 0;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.42);
}

.detail-panel,
.side-panel {
  margin-top: 24px;
  padding: 28px;
}

.detail-title-row {
  margin-bottom: 18px;
}

.detail-panel h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-meta,
.tag-cloud {
  margin-bottom: 22px;
}

.detail-panel section {
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-panel h2 {
  margin: 0 0 10px;
  color: #ffffff;
}

.detail-panel p {
  margin: 0;
  text-align: justify;
}

.detail-side {
  position: sticky;
  top: 92px;
  align-self: start;
}

.side-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.warm-panel {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(245, 158, 11, 0.1));
}

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

.footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 20px;
}

.footer-inner p {
  margin: 10px 0 0;
  color: var(--subtle);
  line-height: 1.75;
}

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

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

.footer-links a:hover {
  color: #fed7aa;
}

.copyright {
  font-size: 14px;
}

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

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .site-nav {
    flex-wrap: wrap;
    padding: 12px 18px;
  }

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

  .nav-links {
    order: 3;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-link {
    width: 100%;
  }

  .nav-search {
    order: 4;
    display: none;
    width: 100%;
  }

  .nav-links.is-open + .nav-search {
    display: flex;
  }

  .hero {
    height: 680px;
  }

  .hero-copy {
    padding: 0 20px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .page-main,
  .detail-main,
  .footer-inner {
    width: min(100% - 28px, 1280px);
  }

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

  .filter-panel {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions,
  .detail-title-row,
  .section-heading,
  .category-overview-head,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-card {
    grid-template-columns: 48px 90px 1fr;
  }

  .ranking-card img {
    width: 90px;
    height: 78px;
  }
}

@media (max-width: 560px) {
  .site-logo {
    font-size: 19px;
  }

  .hero {
    height: 660px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

  .page-hero,
  .soft-panel,
  .rank-panel,
  .cta-panel,
  .search-panel,
  .category-overview-card,
  .detail-panel,
  .side-panel {
    padding: 20px;
    border-radius: 18px;
  }

  .movie-grid,
  .movie-grid-2,
  .movie-grid-3,
  .category-grid,
  .rank-list,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    flex-direction: column;
  }

  .movie-card-horizontal .poster-wrap {
    width: 100%;
    min-width: 0;
    aspect-ratio: 3 / 4;
  }

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

  .rank-meta {
    grid-column: 2;
  }

  .ranking-card {
    grid-template-columns: 42px 76px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .ranking-card img {
    width: 76px;
    height: 70px;
  }

  .ranking-info em {
    display: none;
  }
}
