:root {
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.72);
  --card-border: rgba(148, 163, 184, 0.18);
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --brand: #f59e0b;
  --brand-soft: #fbbf24;
  --brand-deep: #92400e;
  --danger: #fb7185;
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  color-scheme: dark;
}

* {
  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.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text-main);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(20px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(240px, 320px);
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand));
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.26);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 700;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #111827;
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.header-search {
  position: relative;
}

.header-search input,
.page-filter input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text-main);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.header-search input:focus,
.page-filter input:focus {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(520px, calc(100vw - 32px));
  max-height: 430px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: none;
}

.search-panel.is-visible {
  display: grid;
  gap: 8px;
}

.search-result {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  color: var(--text-soft);
  transition: background 0.22s ease;
}

.search-result:hover {
  background: rgba(51, 65, 85, 0.68);
}

.search-result img {
  width: 54px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.search-result strong {
  display: block;
  color: #fff;
  line-height: 1.35;
}

.search-result small {
  color: var(--text-muted);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.72);
  cursor: pointer;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  isolation: isolate;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-content {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 100px;
}

.hero-eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--brand-soft);
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 20px 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 690px;
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--brand-soft);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.button:hover {
  transform: translateY(-2px);
  background: #fcd34d;
}

.button.is-ghost {
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: none;
}

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

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

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

main {
  padding-bottom: 64px;
}

.section-block,
.info-panel,
.detail-panel,
.player-panel,
.category-hero,
.ranking-panel {
  margin-top: 36px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.52));
  box-shadow: var(--shadow-lg);
}

.section-block {
  padding: 28px;
}

.section-heading,
.category-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2,
.category-hero h1,
.detail-title h1,
.ranking-panel h1,
.categories-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p,
.category-hero p,
.detail-title p,
.categories-title p,
.ranking-panel p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: var(--card-bg);
  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.44);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #334155);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.poster-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.card-body h3 {
  margin: 8px 0 6px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--brand-soft);
}

.card-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span,
.detail-meta span,
.rank-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.72);
  color: var(--text-soft);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -52px;
  position: relative;
  z-index: 4;
}

.category-tile,
.category-card {
  min-height: 128px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.13), rgba(15, 23, 42, 0.9)),
    rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow-lg);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile strong,
.category-card strong {
  display: block;
  color: #fff;
  font-size: 20px;
}

.category-tile span,
.category-card span {
  color: var(--text-muted);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 74px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-num {
  color: var(--brand-soft);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 74px;
  height: 98px;
  border-radius: 12px;
  object-fit: cover;
  background: #1e293b;
}

.rank-item h3 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 18px;
}

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

.category-hero,
.ranking-panel,
.categories-title {
  padding: 42px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.page-filter {
  width: min(420px, 100%);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.pagination a {
  min-width: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-soft);
  text-align: center;
}

.pagination a:hover,
.pagination a.is-current {
  border-color: transparent;
  background: var(--brand-soft);
  color: #111827;
  font-weight: 900;
}

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

.player-panel {
  overflow: hidden;
}

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

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

.big-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  color: #fff;
  cursor: pointer;
}

.big-play span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: #111827;
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.34);
}

.video-shell.is-playing .big-play {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 8px 12px;
  display: none;
}

.player-message.is-visible {
  display: block;
}

.detail-title,
.detail-panel,
.side-panel {
  padding: 26px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

.detail-title {
  margin-top: 28px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 24px;
}

.detail-panel p {
  margin: 0 0 18px;
  color: var(--text-soft);
}

.side-panel {
  position: sticky;
  top: 96px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.62);
  transition: background 0.22s ease, transform 0.22s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  background: rgba(51, 65, 85, 0.72);
}

.compact-card img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  background: #1e293b;
}

.compact-card strong,
.compact-card small {
  display: block;
}

.compact-card strong {
  color: #fff;
}

.compact-card small {
  color: var(--text-muted);
  margin-top: 4px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 30px;
  padding: 46px 0 28px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #fff;
}

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

.footer-grid a {
  display: block;
  margin: 7px 0;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 14px;
}

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

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-muted);
  text-align: center;
}

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

@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav,
  .header-search {
    grid-column: 1 / -1;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 16px;
  }

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

  .nav-link {
    justify-content: center;
  }

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

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

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

  .side-panel {
    position: static;
  }

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

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

  .hero,
  .hero-slider {
    min-height: 560px;
  }

  .hero-content {
    padding: 94px 0 92px;
  }

  .section-block,
  .category-hero,
  .ranking-panel,
  .categories-title,
  .detail-title,
  .detail-panel,
  .side-panel {
    padding: 20px;
    border-radius: 22px;
  }

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

  .category-strip,
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 36px 62px 1fr;
  }

  .rank-item .button {
    grid-column: 2 / -1;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}
