:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --surface: #171717;
  --surface-strong: #1f1f1f;
  --surface-light: #262626;
  --border: #2a2a2a;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --muted-strong: #d4d4d4;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --amber-dark: #92400e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem), var(--bg);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #111;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 1.2rem;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 10px 16px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-soft);
  background: rgba(245, 158, 11, 0.1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(23, 23, 23, 0.98);
}

.mobile-panel.open {
  display: grid;
  gap: 4px;
}

.hero-slider {
  position: relative;
  min-height: 760px;
  height: 88vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.08);
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.72) 42%, rgba(10, 10, 10, 0.2) 100%),
    linear-gradient(0deg, #0a0a0a 0%, rgba(10, 10, 10, 0.1) 48%, rgba(10, 10, 10, 0.45) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 52%;
  transform: translateY(-50%);
  width: min(620px, calc(100% - 48px));
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-soft);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  margin: 18px 0;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-content p,
.page-hero p {
  color: var(--muted-strong);
  line-height: 1.9;
  font-size: 1.05rem;
  max-width: 720px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

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

.btn-primary,
.btn-ghost,
.home-search button {
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary,
.home-search button {
  color: #141414;
  background: linear-gradient(135deg, var(--amber-soft), var(--amber));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover,
.home-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(245, 158, 11, 0.38);
}

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

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--amber-soft);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 142px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

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

.hero-rail {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 86px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, 108px);
  gap: 12px;
}

.hero-mini {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 0.78rem;
}

.hero-mini img {
  height: 68px;
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: 0.2s ease;
}

.hero-mini:hover img,
.hero-mini.active img {
  border-color: var(--amber-soft);
  transform: translateY(-3px);
}

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

.section {
  padding: 58px 0;
}

.section-narrow {
  padding: 28px 0 0;
}

.quick-search-card,
.page-hero,
.player-card,
.detail-copy,
.side-card,
.ranking-panel,
.filter-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(38, 38, 38, 0.86), rgba(16, 16, 16, 0.96));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 430px);
  gap: 28px;
  align-items: center;
  padding: 26px;
  margin-top: -86px;
  position: relative;
  z-index: 4;
}

.quick-search-card h2,
.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-copy h2 {
  margin: 8px 0 0;
}

.home-search,
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-search input,
.search-box input {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
}

.home-search input:focus,
.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.home-search button {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

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

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

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

.compact-head h2 {
  font-size: 2rem;
}

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

.featured-grid .movie-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

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

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

.movie-card-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: var(--surface);
  transition: 0.24s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

.type-badge {
  left: 12px;
  color: #111;
  background: var(--amber-soft);
}

.rank-badge {
  right: 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-info strong {
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--text);
}

.movie-line {
  min-height: 42px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #737373;
  font-size: 0.78rem;
}

.compact-card .movie-info {
  padding: 14px;
}

.compact-card .tag-row span:nth-child(n+3) {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
}

.category-grid,
.category-large-grid {
  display: grid;
  gap: 16px;
}

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

.category-tile,
.category-large {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(31, 31, 31, 0.92), rgba(15, 15, 15, 0.96));
  transition: 0.22s ease;
}

.category-tile {
  padding: 24px;
}

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

.category-tile strong,
.category-large strong {
  font-size: 1.2rem;
}

.category-tile span,
.category-large em {
  color: var(--muted);
  line-height: 1.65;
  font-style: normal;
}

.ranking-panel {
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 74px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  transition: 0.2s ease;
}

.rank-item:hover {
  background: rgba(245, 158, 11, 0.09);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #111;
  background: var(--amber-soft);
  font-weight: 900;
}

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

.rank-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-copy strong,
.rank-copy em,
.rank-copy span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy em {
  color: var(--amber-soft);
  font-size: 0.76rem;
  font-style: normal;
}

.rank-copy span {
  color: var(--muted);
  font-size: 0.8rem;
}

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

.page-hero {
  width: min(1180px, calc(100% - 32px));
  min-height: 320px;
  margin: 0 auto 16px;
  padding: 54px;
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% 35%;
  height: 260px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 70%);
}

.small-hero,
.category-hero,
.search-hero,
.ranking-hero {
  min-height: 270px;
}

.filter-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  margin-bottom: 28px;
}

.search-box {
  flex-direction: column;
  align-items: stretch;
}

.search-box span,
.filter-group > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-chip {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  color: #111;
  background: var(--amber-soft);
  border-color: var(--amber-soft);
}

.empty-state {
  display: none;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 42px;
}

.empty-state.show {
  display: block;
}

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

.category-large {
  overflow: hidden;
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 110px;
}

.category-cover-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-copy {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.ranking-top-grid {
  margin-bottom: 28px;
}

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

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
}

.detail-primary,
.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.player-card {
  padding: 14px;
}

.watch-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

.watch-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 16px;
  color: var(--text);
  text-align: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.3));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  color: #111;
  background: linear-gradient(135deg, var(--amber-soft), var(--amber));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
  font-size: 1.65rem;
}

.detail-copy {
  padding: 30px;
}

.detail-copy h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-copy h2 {
  margin-top: 30px;
  font-size: 1.5rem;
}

.detail-copy p {
  color: var(--muted-strong);
  line-height: 1.95;
}

.lead-text {
  font-size: 1.08rem;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.side-card {
  padding: 22px;
}

.side-card strong {
  display: block;
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: var(--text);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.32);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.75;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-content: start;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: #737373;
}

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

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

  .hero-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-slider {
    min-height: 680px;
    height: 82vh;
  }

  .hero-content {
    top: 50%;
  }

  .hero-dots {
    bottom: 80px;
  }

  .quick-search-card,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .home-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .featured-grid .movie-card:first-child {
    grid-column: span 2;
    grid-row: auto;
  }

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

@media (max-width: 560px) {
  .hero-content h1,
  .page-hero h1 {
    font-size: 2.45rem;
    letter-spacing: -0.06em;
  }

  .hero-content p {
    font-size: 0.98rem;
  }

  .section,
  .section-narrow {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .category-grid,
  .category-large-grid,
  .wide-rank-list {
    grid-template-columns: 1fr;
  }

  .featured-grid .movie-card:first-child {
    grid-column: auto;
  }

  .rank-item {
    grid-template-columns: 30px 64px 1fr;
  }

  .detail-copy,
  .page-hero {
    padding: 24px;
  }

  .filter-group {
    align-items: flex-start;
  }
}
