* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #1c1917;
  --bg-deep: #0c0a09;
  --panel: rgba(41, 37, 36, 0.86);
  --panel-strong: #292524;
  --line: rgba(255, 237, 213, 0.14);
  --text: #fff7ed;
  --muted: #d6d3d1;
  --soft: #a8a29e;
  --amber: #f59e0b;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --red: #991b1b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 36rem),
    linear-gradient(180deg, #292524 0%, #1c1917 45%, #0c0a09 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

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

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fff7ed, #fbbf24);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.logo-text {
  font-size: 1.28rem;
}

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

.nav-link {
  color: #e7e5e4;
  padding: 10px 15px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #431407;
  background: #fef3c7;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff7ed;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 247, 237, 0.22), transparent 16rem),
    radial-gradient(circle at 82% 8%, rgba(254, 243, 199, 0.24), transparent 18rem),
    linear-gradient(135deg, #92400e 0%, #d97706 48%, #7f1d1d 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%);
  background-size: 64px 64px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}

.hero-pill,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 247, 237, 0.22);
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 18px;
  max-width: 780px;
  color: white;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.93);
  font-size: clamp(1.08rem, 2.2vw, 1.45rem);
}

.hero-sub {
  max-width: 690px;
  margin: 0 0 30px;
  color: rgba(255, 247, 237, 0.82);
  font-size: 1.05rem;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #7c2d12;
  background: #fff7ed;
  box-shadow: 0 18px 40px rgba(67, 20, 7, 0.22);
}

.btn-primary:hover {
  background: #fef3c7;
}

.btn-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 620px;
  margin-top: 38px;
}

.hero-stat {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-stat strong {
  display: block;
  color: white;
  font-size: 2rem;
  line-height: 1;
}

.hero-stat span {
  color: rgba(255, 247, 237, 0.82);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 22px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(255, 247, 237, 0.22);
  border-radius: 34px;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  background: rgba(28, 25, 23, 0.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-poster {
  min-height: 430px;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(0, 0, 0, 0.24);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px 10px 8px 0;
}

.hero-slide-copy h2 {
  margin: 12px 0 12px;
  color: white;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  line-height: 1.1;
}

.hero-slide-copy p {
  margin: 0 0 18px;
  color: #f5f5f4;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: -26px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  width: 32px;
  background: #fff7ed;
}

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

.main-section.tight {
  padding-top: 32px;
}

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

.section-heading h2 {
  margin: 12px 0 8px;
  color: white;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.15;
}

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

.section-more {
  flex: none;
  color: #fbbf24;
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(41, 37, 36, 0.8);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(127, 29, 29, 0.2));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.year-badge {
  right: 10px;
  bottom: 10px;
  color: #431407;
  background: #fef3c7;
}

.rank-badge {
  top: 10px;
  left: 10px;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b91c1c);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 8px;
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 900;
}

.movie-card h3 {
  margin: 0 0 9px;
  color: white;
  font-size: 1.02rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: #d6d3d1;
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.channel-card {
  min-height: 210px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 12rem),
    rgba(41, 37, 36, 0.86);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.channel-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.45);
}

.channel-card h2,
.channel-card h3 {
  margin: 0 0 12px;
  color: white;
}

.channel-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.channel-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #431407;
  background: #fef3c7;
  font-weight: 900;
}

.page-hero {
  padding: 66px 0 34px;
}

.page-hero h1 {
  margin: 12px 0 12px;
  color: white;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1.06;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #d6d3d1;
  font-size: 0.94rem;
}

.breadcrumb a {
  color: #fbbf24;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(41, 37, 36, 0.82);
}

.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.filter-title strong {
  color: white;
  font-size: 1.1rem;
}

.filter-title span {
  color: #fbbf24;
  font-weight: 800;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 237, 213, 0.16);
  border-radius: 14px;
  color: white;
  background: rgba(12, 10, 9, 0.44);
  padding: 0 14px;
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-controls select option {
  color: #1c1917;
}

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

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(41, 37, 36, 0.88);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(12, 10, 9, 0.22), rgba(12, 10, 9, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  color: #7c2d12;
  background: #fff7ed;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
  font-size: 2.1rem;
  transform: translateX(3px);
}

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

.player-info {
  padding: 24px;
}

.player-info h1 {
  margin: 0 0 12px;
  color: white;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.12;
}

.player-info p {
  margin: 0;
  color: var(--muted);
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: white;
}

.detail-card p {
  margin: 0 0 18px;
  color: #e7e5e4;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.meta-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12, 10, 9, 0.3);
}

.meta-item span {
  display: block;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 900;
}

.meta-item strong {
  color: white;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.side-poster {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  background: rgba(0, 0, 0, 0.24);
}

.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.side-link {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(12, 10, 9, 0.24);
}

.side-link img {
  width: 64px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong {
  display: block;
  color: white;
  line-height: 1.35;
}

.side-link span {
  color: var(--soft);
  font-size: 0.86rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 66px 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(41, 37, 36, 0.78);
}

.rank-index {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #431407;
  background: #fef3c7;
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-content h2,
.rank-content h3 {
  margin: 0 0 8px;
  color: white;
}

.rank-content p {
  margin: 0;
  color: var(--muted);
}

.rank-extra {
  color: #fbbf24;
  font-weight: 900;
  white-space: nowrap;
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: rgba(12, 10, 9, 0.54);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 104px;
  color: #d6d3d1;
}

.footer-inner strong {
  margin-right: 10px;
  color: white;
}

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

.footer-links a {
  color: #fbbf24;
  font-weight: 800;
}

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

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

  .side-card {
    position: static;
  }

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

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

  .rank-extra {
    grid-column: 3;
  }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(28, 25, 23, 0.96);
  }

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

  .menu-toggle {
    display: block;
  }

  .hero {
    padding-top: 46px;
  }

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

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

  .hero-poster {
    min-height: 260px;
  }

  .hero-slide-copy {
    padding: 0;
  }

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .movie-card p {
    display: none;
  }

  .rank-row {
    grid-template-columns: 44px 82px 1fr;
    gap: 12px;
    padding: 12px;
  }
}

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

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

  .hero h1 {
    letter-spacing: -0.04em;
  }

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