:root {
  --bg: #0b1020;
  --bg-soft: #111827;
  --bg-card: rgba(17, 24, 39, 0.78);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f9fafb;
  --muted: #9ca3af;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --blue: #60a5fa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.15), transparent 34rem),
    linear-gradient(180deg, #050816 0%, #0b1020 45%, #111827 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 22, 0.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark,
.footer-logo span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.32);
}

.logo-text {
  font-size: 22px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: #d1d5db;
  font-size: 15px;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--amber);
}

.header-search {
  display: flex;
  overflow: hidden;
  width: 300px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.header-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 12px 14px;
}

.header-search button,
.search-page-form button {
  border: 0;
  color: #111827;
  background: var(--amber);
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

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

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #050816;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image:
    linear-gradient(90deg, rgba(5, 8, 22, 0.94), rgba(5, 8, 22, 0.7), rgba(5, 8, 22, 0.38)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 50%, rgba(245, 158, 11, 0.22), transparent 22rem),
    linear-gradient(180deg, transparent 70%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: center;
  padding: 120px 0 96px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #d1d5db;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
  padding: 7px 12px;
  font-size: 13px;
}

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.26), rgba(17, 24, 39, 0.9));
  box-shadow: var(--shadow);
}

.hero-poster img {
  height: 440px;
  object-fit: cover;
}

.hero-poster img.is-missing,
.poster img.is-missing,
.ranking-cover img.is-missing {
  opacity: 0;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.page-main {
  padding: 52px 0 80px;
}

.inner-page {
  padding-top: 36px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: -92px;
  margin-bottom: 74px;
  position: relative;
  z-index: 6;
}

.stats-strip div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.84);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stats-strip strong {
  display: block;
  color: var(--amber);
  font-size: 30px;
}

.stats-strip span {
  color: var(--muted);
}

.content-section {
  margin-bottom: 76px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 32px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
  transform: translateY(-4px);
}

.poster,
.ranking-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.25), rgba(96, 165, 250, 0.12)),
    #111827;
}

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

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

.quality,
.play-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quality {
  top: 10px;
  right: 10px;
  border-radius: 999px;
  color: #111827;
  background: var(--amber);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--amber);
}

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  min-height: 40px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
  gap: 6px;
}

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

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

.ranking-panel,
.text-panel,
.category-overview-card,
.page-hero {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.panel-title {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 900;
}

.ranking-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.ranking-item:hover .ranking-title {
  color: var(--amber);
}

.ranking-number {
  color: var(--amber);
  font-weight: 900;
}

.ranking-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-score {
  color: #fbbf24;
}

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

.category-card,
.category-overview-card a {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(96, 165, 250, 0.08)),
    rgba(17, 24, 39, 0.76);
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card span,
.category-overview-card h2 {
  font-size: 24px;
  font-weight: 900;
}

.category-card em,
.category-count {
  color: var(--amber);
  font-style: normal;
  font-weight: 800;
}

.category-card small,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  margin-bottom: 34px;
  padding: clamp(28px, 6vw, 56px);
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.2), transparent 22rem),
    rgba(17, 24, 39, 0.78);
}

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

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

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

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

.filter-bar,
.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 24px;
}

.filter-bar input,
.filter-bar select,
.search-page-form input {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.filter-bar select {
  max-width: 160px;
}

.search-page-form button {
  min-width: 120px;
  border-radius: 999px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 42px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  color: #d1d5db;
  font-size: 20px;
  line-height: 1.8;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  margin-bottom: 42px;
}

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

.video-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--text);
  border: 0;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.66)),
    transparent;
  cursor: pointer;
}

.video-start.is-hidden {
  display: none;
}

.video-start span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  color: #111827;
  border-radius: 999px;
  background: var(--amber);
  font-size: 30px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.35);
}

.video-start strong {
  font-size: 22px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 76px;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  margin: 0 0 14px;
}

.text-panel p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.95;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 86px 58px minmax(0, 1fr) 70px;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.76);
  padding: 14px;
}

.ranking-cover {
  border-radius: 14px;
}

.ranking-rank {
  color: var(--amber);
  font-size: 28px;
  font-weight: 900;
}

.ranking-info a {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
}

.ranking-info a:hover {
  color: var(--amber);
}

.ranking-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-large-score {
  color: #fbbf24;
  font-size: 28px;
  font-weight: 900;
  text-align: right;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 22, 0.72);
  padding: 52px 0 26px;
}

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

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.footer-grid li {
  margin-bottom: 8px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding-top: 22px;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(17, 24, 39, 0.88);
  cursor: pointer;
}

.back-to-top.is-visible {
  display: block;
}

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 3;
    margin: 0;
    border-top: 1px solid var(--border);
    padding: 12px 0;
  }

  body.nav-open .main-nav {
    display: flex;
  }

  .header-search {
    order: 4;
    width: 100%;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 96px;
  }

  .hero-poster {
    min-height: auto;
    max-width: 280px;
  }

  .hero-poster img {
    height: 380px;
  }

  .hero-arrow {
    display: none;
  }

  .stats-strip,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .detail-hero {
    grid-template-columns: 1fr 1fr;
  }

  .stats-strip {
    margin-top: -42px;
  }

  .detail-hero {
    align-items: start;
  }
}

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

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

  .stats-strip,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .detail-hero,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .hero-copy p,
  .detail-one-line {
    font-size: 16px;
  }

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

  .filter-bar,
  .search-page-form,
  .footer-bottom {
    flex-direction: column;
  }

  .filter-bar select {
    max-width: none;
  }

  .ranking-large-score {
    text-align: left;
  }
}
