:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --bg-card: #211c18;
  --bg-elevated: #292524;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --muted-strong: #d6d3d1;
  --border: rgba(120, 113, 108, 0.34);
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --copper: #b45309;
  --danger: #ef4444;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem),
    linear-gradient(180deg, #0c0a09 0%, #1c1917 48%, #0c0a09 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 32px, var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(68, 64, 60, 0.82);
  background: rgba(28, 25, 23, 0.92);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.site-brand__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--copper));
  color: #120b04;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.3);
}

.site-brand__text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--amber-light), #fed7aa 55%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav__link,
.mobile-nav__link {
  border-radius: 999px;
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.site-nav__link {
  padding: 9px 16px;
}

.site-nav__link:hover,
.site-nav__link.is-active,
.mobile-nav__link:hover,
.mobile-nav__link.is-active {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-light);
}

.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(41, 37, 36, 0.9);
}

.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--text);
}

.mobile-nav {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(68, 64, 60, 0.62);
}

.mobile-nav__link {
  display: block;
  padding: 13px 16px;
}

.hero-slider {
  position: relative;
  min-height: 520px;
  height: 70vh;
  overflow: hidden;
  background: #0c0a09;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(12, 10, 9, 0.97) 0%, rgba(12, 10, 9, 0.76) 43%, rgba(12, 10, 9, 0.24) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.025);
  transition: opacity 620ms ease, transform 1200ms ease;
}

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

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(12, 10, 9, 0.96) 0%, transparent 28%),
    radial-gradient(circle at 16% 28%, rgba(245, 158, 11, 0.18), transparent 28rem);
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 56px;
  padding-top: 48px;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 22px 0 0;
  max-width: 680px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.movie-card__tags span {
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 850;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--copper));
  color: #130c04;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

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

.btn-small {
  min-height: 38px;
  padding: 0 16px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-light);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 30px;
  background: rgba(41, 37, 36, 0.9);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot,
.hero-arrow {
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(28, 25, 23, 0.78);
  color: var(--text);
  transition: background 180ms ease, transform 180ms ease;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  background: var(--amber);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.hero-arrow:hover,
.hero-dot:hover {
  transform: translateY(-2px);
  background: rgba(245, 158, 11, 0.2);
}

.section-block {
  padding: 64px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-card h1,
.content-panel h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 3.2vw, 46px);
}

.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
}

.section-link {
  color: var(--amber-light);
  font-weight: 800;
}

.section-link:hover {
  color: #fed7aa;
}

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

.movie-grid--home {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.movie-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 16px;
}

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

.movie-card__poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.9);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #1c1917, #292524);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.movie-card__poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.movie-card:hover .movie-card__poster img {
  transform: scale(1.055);
  filter: saturate(1.08) brightness(1.08);
}

.movie-card__poster::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  content: "";
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.92), transparent);
}

.movie-card__year,
.movie-card__rank,
.movie-card__play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.movie-card__year {
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  background: rgba(12, 10, 9, 0.72);
  color: #fed7aa;
  font-size: 12px;
}

.movie-card__rank {
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  background: linear-gradient(135deg, var(--amber), var(--copper));
  color: #130c04;
  font-size: 12px;
}

.movie-card__play {
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: rgba(245, 158, 11, 0.92);
  color: #130c04;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.movie-card__body {
  padding: 12px 3px 0;
}

.movie-card__body h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card__body h3 a:hover {
  color: var(--amber-light);
}

.movie-card__meta,
.detail-card__meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-card__intro {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 10px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-tile-grid,
.category-card-grid {
  display: grid;
  gap: 22px;
}

.category-tile-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.category-tile,
.category-card,
.content-panel,
.detail-card,
.filter-panel,
.ranking-item {
  border: 1px solid var(--border);
  background: rgba(28, 25, 23, 0.74);
  box-shadow: var(--shadow);
}

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: var(--radius-xl);
  padding: 24px;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
  transition: transform 260ms ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(145deg, rgba(12, 10, 9, 0.92), rgba(12, 10, 9, 0.36));
}

.category-tile span,
.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  color: var(--amber-light);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.category-tile strong {
  margin-top: 42px;
  font-size: 28px;
}

.category-tile small {
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 14px;
}

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

.ranking-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.page-main {
  padding: 42px 0 72px;
}

.page-hero {
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-xl);
  margin-bottom: 32px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 24rem),
    rgba(28, 25, 23, 0.72);
  box-shadow: var(--shadow);
}

.page-hero--small {
  padding: clamp(28px, 6vw, 58px);
}

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

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

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

.category-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.category-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.category-card__media {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #0c0a09;
}

.category-card__media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.category-card__body {
  padding: 24px;
}

.category-card__body span {
  color: var(--amber-light);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.category-card__body h2 {
  margin: 8px 0;
  font-size: 26px;
}

.category-card__body p {
  color: var(--muted-strong);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 210px 210px;
  gap: 14px;
  margin-bottom: 26px;
  border-radius: var(--radius-lg);
  padding: 16px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(120, 113, 108, 0.48);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(12, 10, 9, 0.74);
  color: var(--text);
  outline: none;
}

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

.empty-state {
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--muted-strong);
  text-align: center;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 92px 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-radius: var(--radius-lg);
  padding: 14px;
}

.ranking-item__poster {
  overflow: hidden;
  border-radius: 14px;
}

.ranking-item__poster img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ranking-item__index {
  color: var(--amber-light);
  font-size: 30px;
  font-weight: 950;
}

.ranking-item__content h2 {
  margin: 0;
  font-size: 22px;
}

.ranking-item__content p {
  margin: 6px 0 0;
  color: var(--muted-strong);
}

.detail-main {
  padding-bottom: 80px;
}

.detail-hero {
  padding-top: 36px;
}

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

.player-section {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(12, 10, 9, 0.26), rgba(12, 10, 9, 0.72));
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.player-overlay__icon {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--copper));
  color: #130c04;
  font-size: 34px;
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.34);
}

.detail-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

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

.detail-card > div {
  padding: 24px;
}

.detail-card h1 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.12;
}

.detail-card .movie-card__tags {
  margin-top: 16px;
}

.detail-content {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.content-panel {
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 34px);
}

.content-panel h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.content-panel p {
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: 17px;
  white-space: pre-line;
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.detail-info div {
  border: 1px solid rgba(120, 113, 108, 0.34);
  border-radius: 14px;
  padding: 14px;
  background: rgba(12, 10, 9, 0.42);
}

.detail-info dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-info dd {
  margin: 4px 0 0;
  color: var(--text);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-brand {
  color: var(--amber-light);
  font-size: 24px;
  font-weight: 950;
}

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

.site-footer h2 {
  margin: 0 0 10px;
  color: var(--amber-light);
  font-size: 16px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  border-top: 1px solid rgba(68, 64, 60, 0.62);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

  .hero-poster {
    display: none;
  }

  .section-split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .container {
    width: min(100% - 24px, var(--max-width));
  }

  .site-nav__links {
    display: none;
  }

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

  .hero-slider {
    min-height: 620px;
    height: 78vh;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: clamp(36px, 12vw, 58px);
  }

  .hero-controls {
    bottom: 22px;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

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

  .ranking-item__index {
    position: absolute;
    margin: 8px;
    font-size: 20px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  }

  .ranking-item__poster img {
    width: 72px;
  }

  .ranking-item .btn {
    grid-column: 1 / -1;
  }

  .detail-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .detail-card > div {
    padding: 18px;
  }

  .detail-card h1 {
    font-size: 24px;
  }

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

  .movie-card__body h3 {
    font-size: 15px;
  }

  .movie-card__intro {
    font-size: 12px;
  }
}

@media (max-width: 460px) {
  .hero-actions {
    display: grid;
  }

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

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

  .detail-card img {
    max-height: 360px;
  }
}
