:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-2: #292524;
  --panel-3: #44403c;
  --line: #3f3a34;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --soft: #78716c;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --orange: #fb923c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.16), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(251, 146, 60, 0.11), transparent 28%),
    linear-gradient(180deg, #0c0a09 0%, #1c1917 52%, #0c0a09 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: rgba(28, 25, 23, 0.94);
  border-bottom: 1px solid rgba(68, 64, 60, 0.75);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 20px;
}

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

.nav-link {
  padding: 9px 14px;
  color: #d6d3d1;
  border-radius: 999px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-2);
  background: rgba(245, 158, 11, 0.1);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: #e7e5e4;
  border-radius: 99px;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.72fr);
  gap: 22px;
}

.hero-slider {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.08);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.92) 0%, rgba(12, 10, 9, 0.68) 48%, rgba(12, 10, 9, 0.18) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.92) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, 92%);
  padding: 78px 54px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--amber-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero p,
.page-hero p,
.detail-intro {
  max-width: 680px;
  margin: 20px 0 0;
  color: #d6d3d1;
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  color: #fde68a;
  background: rgba(120, 113, 108, 0.28);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

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

.btn-primary {
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(28, 25, 23, 0.72);
}

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

.hero-dots {
  position: absolute;
  left: 54px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(214, 211, 209, 0.28);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.is-active {
  width: 58px;
  background: var(--amber-2);
}

.hero-side {
  display: grid;
  gap: 22px;
}

.hero-search-card,
.hero-panel,
.feature-copy,
.content-card,
.filter-panel,
.category-tile,
.player-shell {
  border: 1px solid rgba(68, 64, 60, 0.74);
  background: rgba(28, 25, 23, 0.82);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.hero-search-card {
  padding: 30px;
}

.hero-search-card h2,
.hero-panel h2,
.section-heading h2,
.feature-copy h2,
.content-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.12;
}

.hero-search-card p,
.feature-copy p,
.content-card p,
.category-tile p,
.site-footer p {
  color: var(--muted);
}

.hero-search {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.hero-search input,
.filter-controls input,
.filter-controls select {
  min-width: 0;
  width: 100%;
  height: 46px;
  color: var(--text);
  border: 1px solid rgba(68, 64, 60, 0.95);
  border-radius: 999px;
  background: rgba(12, 10, 9, 0.78);
  padding: 0 16px;
  outline: 0;
}

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

.hero-search button {
  flex: 0 0 auto;
  border: 0;
  color: #1c1917;
  background: var(--amber);
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.hero-panel {
  padding: 24px;
}

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

.compact-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(68, 64, 60, 0.42);
  transition: background 0.22s ease, transform 0.22s ease;
}

.compact-card:hover {
  background: rgba(245, 158, 11, 0.12);
  transform: translateY(-2px);
}

.compact-card img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card span {
  overflow: hidden;
  color: #e7e5e4;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.section-heading.tight {
  margin-bottom: 16px;
}

.section-heading a {
  color: var(--amber-2);
  font-weight: 800;
}

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

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

.category-tile {
  display: flex;
  min-height: 238px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
  position: relative;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.56);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
}

.category-tile-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-tile-head span {
  color: var(--amber-2);
  font-size: 13px;
  font-weight: 900;
}

.category-tile-head strong {
  font-size: 22px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 12px;
}

.category-thumbs img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.category-tile em {
  color: var(--amber-2);
  font-style: normal;
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.feature-copy {
  padding: 32px;
  position: sticky;
  top: 92px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(68, 64, 60, 0.72);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(41, 37, 36, 0.92);
}

.rank-num {
  color: var(--amber-2);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: end;
  padding: 22px;
  margin-bottom: 20px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 150px;
  gap: 10px;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.65);
  border-radius: 22px;
  background: rgba(41, 37, 36, 0.84);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  content-visibility: auto;
  contain-intrinsic-size: 340px 420px;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.36);
}

.poster-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #1c1917;
  aspect-ratio: 2 / 3;
}

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

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

.poster-badge,
.poster-year {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.poster-badge {
  left: 12px;
  color: #1c1917;
  background: var(--amber-2);
}

.poster-year {
  right: 12px;
  color: #fef3c7;
  background: rgba(12, 10, 9, 0.68);
  backdrop-filter: blur(8px);
}

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

.movie-card h3 {
  overflow: hidden;
  margin: 0 0 8px;
  color: #f5f5f4;
  font-size: 18px;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--soft);
  font-size: 12px;
}

.movie-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  min-height: 300px;
  margin: 28px auto 0;
  padding: 48px;
  display: flex;
  align-items: end;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(68, 64, 60, 0.72), rgba(28, 25, 23, 0.9)),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.22), transparent 35%);
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 240px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--panel);
}

.detail-inner {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #d6d3d1;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
  margin-top: 70px;
}

.detail-poster {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  color: #fef3c7;
  background: rgba(41, 37, 36, 0.78);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  padding: 7px 13px;
}

.player-section {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #050505;
  border-radius: 28px;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  border: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(12, 10, 9, 0.72) 42%, rgba(12, 10, 9, 0.9));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  border-radius: 999px;
  font-size: 36px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.3);
}

.play-overlay strong {
  font-size: 18px;
}

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

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

.content-card {
  padding: 28px;
}

.content-card p {
  font-size: 16px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(68, 64, 60, 0.8);
  background: rgba(12, 10, 9, 0.84);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #f5f5f4;
  font-size: 16px;
}

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

.site-footer li + li {
  margin-top: 8px;
}

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

.site-footer a:hover {
  color: var(--amber-2);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--soft);
  border-top: 1px solid rgba(68, 64, 60, 0.58);
  font-size: 14px;
}

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

@media (max-width: 1120px) {
  .hero,
  .split-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-side {
    grid-template-columns: 1fr 1fr;
  }

  .feature-copy {
    position: static;
  }

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

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

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

@media (max-width: 820px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    transition: max-height 0.25s ease;
  }

  .nav-links.is-open {
    max-height: 320px;
    padding: 8px 0 14px;
  }

  .nav-link {
    display: block;
  }

  .hero {
    grid-template-columns: 1fr;
    width: min(100% - 20px, 1180px);
    margin-top: 12px;
  }

  .hero-slider {
    min-height: 560px;
    border-radius: 22px;
  }

  .hero-content {
    width: 100%;
    padding: 58px 24px;
  }

  .hero-dots {
    left: 24px;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  .section-shell,
  .page-hero,
  .detail-inner {
    width: min(100% - 20px, 1180px);
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 22px;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .movie-grid.compact,
  .rank-list.rank-page,
  .detail-text,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

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

  .rank-meta {
    display: none;
  }

  .detail-layout {
    margin-top: 34px;
  }

  .detail-poster {
    width: min(280px, 80vw);
  }
}

@media (max-width: 520px) {
  .brand-text {
    font-size: 18px;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero p,
  .page-hero p,
  .detail-intro {
    font-size: 16px;
  }

  .hero-search {
    flex-direction: column;
  }

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

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

  .section-heading {
    display: block;
  }
}
