:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-bright: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    "PingFang SC",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

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

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

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-bright), #f97316);
  color: #111827;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.34);
  font-size: 16px;
  font-weight: 950;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--accent-bright);
  background: rgba(245, 158, 11, 0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  font-size: 22px;
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-stage {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.42) 100%),
    var(--hero-image),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.28), transparent 34rem);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

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

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.62fr);
  align-items: center;
  min-height: 660px;
  gap: 42px;
  padding: 72px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  max-width: 800px;
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.hero-text {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 650;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-bright), #f97316);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.26);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(245, 158, 11, 0.35);
}

.button.is-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: none;
}

.button.is-ghost:hover {
  border-color: rgba(251, 191, 36, 0.42);
  color: var(--accent-bright);
}

.hero-poster-card {
  position: relative;
  max-width: 360px;
  justify-self: end;
  padding: 12px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.42));
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster-card::before {
  position: absolute;
  inset: -24px;
  z-index: -1;
  content: "";
  border-radius: 44px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 62%);
  filter: blur(12px);
}

.hero-poster-card .poster-frame {
  border-radius: 24px;
}

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

.hero-dot {
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: var(--accent-bright);
}

.section {
  padding: 64px 0;
}

.section.is-tight {
  padding-top: 34px;
}

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

.section-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 950;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.23);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

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

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.3), transparent 34%),
    linear-gradient(135deg, #111827, #020617);
}

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

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

.poster-img.is-missing {
  opacity: 0;
}

.poster-frame.image-fallback::after {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  content: attr(data-title);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-weight: 850;
  line-height: 1.5;
}

.card-cover {
  padding: 10px 10px 0;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-line {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.card-chip,
.rank-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  background: linear-gradient(135deg, var(--accent-bright), #f97316);
  color: #111827;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.category-card,
.info-panel,
.search-panel,
.detail-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.category-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.category-card::after {
  position: absolute;
  top: -70px;
  right: -70px;
  width: 150px;
  height: 150px;
  content: "";
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  filter: blur(4px);
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.category-count {
  position: relative;
  z-index: 1;
  color: var(--accent-bright);
  font-weight: 850;
}

.page-hero {
  padding: 62px 0 34px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 22% 0%, rgba(245, 158, 11, 0.18), transparent 28rem),
    rgba(2, 6, 23, 0.18);
}

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

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

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

.page-title {
  max-width: 920px;
  margin: 0;
  color: var(--text);
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.page-desc {
  max-width: 840px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: 16px;
  line-height: 1.9;
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 170px 150px;
  gap: 12px;
}

.search-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.74);
  outline: none;
  padding: 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.result-count {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.player-section {
  padding-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 32%),
    rgba(2, 6, 23, 0.24);
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.play-button {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-bright), #f97316);
  box-shadow: 0 24px 70px rgba(245, 158, 11, 0.38);
  font-size: 30px;
  transform: translateZ(0);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.28fr);
  gap: 26px;
  align-items: start;
}

.detail-panel {
  padding: 26px;
}

.detail-panel h2,
.detail-panel h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-weight: 900;
}

.detail-panel h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.detail-panel h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.detail-panel p {
  margin: 0 0 18px;
  color: var(--muted-strong);
  line-height: 1.95;
}

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

.meta-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
  color: var(--muted-strong);
  font-size: 14px;
}

.meta-row strong {
  color: var(--muted);
  font-weight: 700;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.side-poster {
  overflow: hidden;
  border-radius: 24px;
  margin-bottom: 18px;
}

.pagination-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.pagination-row a {
  flex: 1;
}

.footer {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(150px, 0.5fr));
  gap: 28px;
  padding: 42px 0;
}

.footer h3,
.footer h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 900;
}

.footer p,
.footer a,
.footer li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a:hover {
  color: var(--accent-bright);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    border-radius: 14px;
  }

  .hero,
  .hero-inner {
    min-height: 720px;
  }

  .hero-inner,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster-card {
    justify-self: start;
    width: min(320px, 100%);
    transform: none;
  }

  .search-row {
    grid-template-columns: 1fr;
  }
}

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

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-inner {
    min-height: 680px;
  }

  .hero-inner {
    padding: 48px 0 80px;
  }

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

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

  .section {
    padding: 42px 0;
  }

  .section-header,
  .footer-bottom,
  .pagination-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .card-title {
    min-height: 44px;
    font-size: 14px;
  }

  .card-line {
    display: none;
  }

  .detail-panel {
    padding: 20px;
  }
}
