:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --brand: #f59e0b;
  --brand-2: #fbbf24;
  --brand-dark: #d97706;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.logo {
  font-size: 22px;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
  font-size: 14px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-link {
  color: var(--muted-2);
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-2);
}

.site-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input {
  width: 210px;
  padding: 10px 14px;
}

.site-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.85);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.site-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--brand);
  color: #111827;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: var(--muted-2);
}

.mobile-search input {
  width: 100%;
  padding: 10px 14px;
}

.hero {
  position: relative;
  min-height: 70vh;
  height: 720px;
  max-height: 860px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(9px) brightness(0.42) saturate(1.1);
  transform: scale(1.05);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at 50% 42%, rgba(245, 158, 11, 0.18), transparent 36rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-2);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.055em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.hero-subtitle {
  margin: 0 auto 12px;
  max-width: 780px;
  color: var(--muted-2);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
}

.hero-text {
  display: -webkit-box;
  max-width: 760px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 17px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions,
.page-actions,
.side-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.btn-primary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  min-height: 48px;
  padding: 0 24px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.22);
}

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

.btn-ghost {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(251, 191, 36, 0.7);
  color: var(--brand-2);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: rgba(203, 213, 225, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: var(--brand-2);
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.48);
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 8px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

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

.compact-head {
  align-items: center;
}

.section-link {
  border: 1px solid var(--line);
  padding: 10px 16px;
  color: var(--brand-2);
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.20);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: var(--shadow);
}

.movie-card a {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.catalog-grid .card-poster {
  aspect-ratio: 2 / 3;
}

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(2, 6, 23, 0.28);
}

.movie-card h2,
.movie-card h3,
.small-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h2,
.movie-card:hover h3,
.small-card:hover h3 {
  color: var(--brand-2);
}

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

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

.tag-row span,
.detail-tags a,
.tag-cloud a {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(51, 65, 85, 0.68);
  color: var(--muted-2);
  font-size: 12px;
}

.tag-cloud a {
  padding: 9px 14px;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.tag-cloud a:hover,
.detail-tags a:hover {
  background: var(--brand);
  color: #111827;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 34px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-page-list {
  gap: 14px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 52px 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item a:hover {
  transform: translateX(4px);
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(30, 41, 59, 0.9);
}

.rank-num {
  color: var(--brand-2);
  font-size: 22px;
  font-weight: 950;
  text-align: center;
}

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

.rank-copy {
  min-width: 0;
}

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

.rank-copy strong {
  color: var(--text);
}

.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.small-card a {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(15, 23, 42, 0.68);
}

.small-card img {
  width: 112px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.small-card span {
  color: var(--brand-2);
  font-size: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 72px;
  background:
    radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.16), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.95));
  border-bottom: 1px solid var(--line);
}

.category-hero {
  background:
    radial-gradient(circle at 78% 15%, rgba(245, 158, 11, 0.17), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.95));
}

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

.category-tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.58);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  aspect-ratio: 16 / 5;
  overflow: hidden;
}

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

.category-copy {
  padding: 24px;
}

.category-copy span {
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 850;
}

.category-copy h2 {
  margin: 8px 0;
  font-size: 28px;
}

.category-copy p {
  margin: 0;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.35fr));
  gap: 12px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: rgba(15, 23, 42, 0.7);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
}

.empty-state {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-lg);
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-page {
  padding-bottom: 70px;
}

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

.watch-panel,
.detail-side,
.detail-copy,
.related-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.22);
}

.watch-panel {
  padding: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  aspect-ratio: 16 / 9;
}

.play-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
  color: var(--text);
  transition: opacity 0.2s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
  font-size: 30px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.32);
}

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

.detail-side {
  overflow: hidden;
  padding: 16px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.side-actions {
  margin-top: 16px;
}

.detail-copy {
  margin-top: 26px;
  padding: 30px;
}

.detail-copy h1 {
  margin-top: 10px;
}

.lead {
  max-width: 920px;
  margin: 0 0 18px;
  color: var(--muted-2);
  font-size: 18px;
}

.detail-tags {
  margin: 18px 0 26px;
}

.detail-copy section {
  margin-top: 26px;
}

.detail-copy h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0;
  color: var(--muted-2);
}

.related-section {
  margin-top: 28px;
  padding: 30px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-logo {
  font-size: 20px;
}

.site-footer p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-links a:hover {
  color: var(--brand-2);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

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

  .site-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-panel.is-open {
    display: block;
  }

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

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

  .detail-side {
    display: none;
  }
}

@media (max-width: 780px) {
  .nav-wrap {
    min-height: 64px;
  }

  .site-search {
    display: none;
  }

  .hero {
    height: 660px;
    min-height: 640px;
  }

  .hero-content {
    width: min(100% - 28px, 880px);
  }

  .hero-text {
    -webkit-line-clamp: 4;
  }

  .hero-actions,
  .page-actions,
  .side-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  .section-head {
    display: block;
  }

  .section-link {
    margin-top: 14px;
  }

  .feature-grid,
  .movie-grid,
  .catalog-grid,
  .category-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

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

  .rank-item a {
    grid-template-columns: 42px 68px minmax(0, 1fr);
  }

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

  .detail-copy,
  .related-section {
    padding: 22px;
  }
}

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

  .logo {
    font-size: 19px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-text {
    font-size: 15px;
  }

  .small-card a {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .small-card img {
    width: 92px;
    height: 68px;
  }
}
