:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #10213a;
  --muted: #667085;
  --line: rgba(16, 33, 58, 0.10);
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --brand-1: #4f46e5;
  --brand-2: #7c3aed;
  --brand-3: #ec4899;
  --brand-4: #f97316;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.06), transparent 28%),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.06), transparent 24%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
}

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

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

button, input, select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .5px;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 52%, var(--brand-3));
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.24);
  position: relative;
  overflow: hidden;
}

.brand__mark::before,
.brand__mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.brand__mark::before {
  width: 18px;
  height: 18px;
  top: 8px;
  left: 8px;
}

.brand__mark::after {
  width: 10px;
  height: 10px;
  right: 9px;
  bottom: 10px;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: #1f2d46;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.nav-link:hover {
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(124,58,237,.12));
  color: #2f3cc0;
  transform: translateY(-1px);
}

.nav-link--accent {
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(236,72,153,.12));
}

.hero {
  position: relative;
  overflow: hidden;
  margin: 24px auto 28px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.14), transparent 24%),
    radial-gradient(circle at 84% 20%, rgba(255,255,255,.12), transparent 20%),
    linear-gradient(135deg, #0f172a 0%, #1d1b6d 46%, #7c3aed 100%);
  color: white;
  box-shadow: var(--shadow-lg);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  opacity: .35;
}

.hero::before {
  width: 280px;
  height: 280px;
  background: #38bdf8;
  top: 10%;
  left: -60px;
}

.hero::after {
  width: 360px;
  height: 360px;
  background: #fb7185;
  right: -90px;
  bottom: -120px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding: 46px 32px 34px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 28px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  margin-bottom: 18px;
  font-size: .92rem;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.hero p {
  margin: 0 0 24px;
  max-width: 58ch;
  color: rgba(255,255,255,.84);
  font-size: 1.04rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search-form {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 280px;
  max-width: 560px;
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.15);
  color: white;
  padding: 15px 18px;
  border-radius: 999px;
  outline: none;
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.search-input::placeholder {
  color: rgba(255,255,255,.7);
}

.search-button,
.button,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.search-button,
.button {
  color: white;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 60%, var(--brand-3));
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.28);
}

.button-ghost {
  color: white;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
}

.search-button:hover,
.button:hover,
.button-ghost:hover {
  transform: translateY(-2px);
}

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

.stat {
  padding: 18px 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
}

.stat strong {
  display: block;
  font-size: 1.35rem;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.75);
  font-size: .92rem;
}

.section {
  margin: 0 auto 26px;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section__title h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}

.section__title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section__link {
  color: #4255d6;
  font-weight: 700;
}

.grid-cards {
  display: grid;
  gap: 18px;
}

.grid-cards--featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.8);
  transition: transform .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.movie-card--search {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  background: rgba(255,255,255,.92);
}

.movie-card__body {
  padding: 14px 14px 16px;
}

.movie-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.movie-card__head h3,
.movie-card__body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.32;
}

.movie-card__type {
  flex-shrink: 0;
  font-size: .78rem;
  color: #4255d6;
  background: rgba(66,85,214,.10);
  padding: 5px 8px;
  border-radius: 999px;
}

.movie-card__body p {
  margin: 0 0 10px;
  color: #52627f;
  font-size: .92rem;
  line-height: 1.55;
}

.movie-card__tags,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79,70,229,.10);
  color: #4350c9;
  font-size: .82rem;
  font-weight: 600;
}

.poster {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 25% 18%, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg, var(--c1), var(--c2) 56%, var(--c3));
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, var(--glow), transparent 28%),
    linear-gradient(180deg, transparent 20%, rgba(5, 10, 25, 0.08) 46%, rgba(4, 9, 20, 0.82));
  pointer-events: none;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  pointer-events: none;
}

.poster__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 35%),
    linear-gradient(180deg, transparent 18%, rgba(2,6,23,.10) 55%, rgba(2,6,23,.78) 100%);
}

.poster__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.poster__content h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-shadow: 0 10px 22px rgba(0,0,0,.18);
}

.poster__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: .82rem;
  font-weight: 700;
  opacity: .92;
}

.poster-small {
  aspect-ratio: 2 / 3;
}

.poster-default {
  aspect-ratio: 2 / 3;
}

.poster-large {
  aspect-ratio: 3 / 4;
}

.poster-wide {
  aspect-ratio: 16 / 9;
  border-radius: 28px;
}

.card-featured .poster__content {
  padding: 20px;
}

.card-featured .poster__content h3 {
  font-size: 1.45rem;
}

.category-tile {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 20px 20px 18px;
  color: white;
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.20);
  background: linear-gradient(135deg, var(--tile-1), var(--tile-2) 65%, var(--tile-3));
  min-height: 132px;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 18%, rgba(255,255,255,.24), transparent 28%);
}

.category-tile h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  opacity: .92;
}

.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(79,70,229,.10);
  color: #3342c0;
  font-weight: 700;
}

.page-hero {
  padding: 24px 0 8px;
}

.page-hero__panel {
  border-radius: 30px;
  padding: 28px 24px;
  background:
    radial-gradient(circle at 8% 15%, rgba(79,70,229,.18), transparent 22%),
    radial-gradient(circle at 88% 18%, rgba(236,72,153,.18), transparent 18%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.8));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.85);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .92rem;
}

.breadcrumb a {
  color: #4453cc;
  font-weight: 700;
}

.movie-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

.player-shell {
  border-radius: 28px;
  overflow: hidden;
  background: #050816;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.10);
}

.player-shell video {
  aspect-ratio: 16 / 9;
  background: #050816;
  cursor: pointer;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(5,8,22,.65), rgba(5,8,22,.95));
  color: white;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.player-actions button {
  border: 0;
  background: rgba(255,255,255,.12);
  color: white;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.player-actions button:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.18);
}

.player-timeline {
  width: 100%;
  margin-top: 10px;
}

.player-timeline input[type="range"] {
  width: 100%;
}

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

.info-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.info-card h1,
.info-card h2,
.info-card h3 {
  margin: 0 0 12px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 8px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(79,70,229,.10);
  color: #3040bf;
  font-weight: 700;
  font-size: .88rem;
}

.content-block p {
  margin: 0 0 12px;
  color: #44516b;
}

.related-grid {
  display: grid;
  gap: 14px;
}

.related-grid--side {
  grid-template-columns: 1fr;
}

.related-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.related-card h4 {
  margin: 0 0 6px;
  font-size: .98rem;
  line-height: 1.36;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}

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

.rank-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(248,250,252,.92);
  border: 1px solid rgba(15,23,42,.06);
}

.rank-num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
}

.rank-item h4 {
  margin: 0 0 4px;
  font-size: .98rem;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}

.empty-state {
  padding: 36px 24px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: var(--shadow);
}

.empty-state h2 {
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 32px;
  background: linear-gradient(135deg, #0f172a, #1e293b 55%, #111827);
  color: white;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr .9fr .9fr .9fr;
  gap: 18px;
  padding: 34px 0 22px;
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 1.02rem;
}

.site-footer p,
.site-footer a {
  color: rgba(255,255,255,.78);
}

.site-footer a:hover {
  color: white;
}

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

.site-footer__bottom {
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.70);
  font-size: .92rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.toolbar__count {
  color: var(--muted);
  font-weight: 700;
}

.toolbar__input {
  min-width: min(440px, 100%);
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.9);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 6px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}

.pagination .active {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: white;
  border-color: transparent;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(79,70,229,.10);
  color: #4554c8;
  font-size: .84rem;
  font-weight: 700;
}

.stack {
  display: grid;
  gap: 18px;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toc a {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(79,70,229,.10);
  color: #3647c2;
  font-weight: 700;
}

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

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

  .movie-hero,
  .hero__grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .container {
    width: min(100vw - 24px, 1200px);
  }

  .site-header__bar {
    min-height: 68px;
  }

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

  .nav-menu {
    width: 100%;
    padding: 0 0 12px;
  }

  .site-header__bar {
    flex-wrap: wrap;
  }

  .hero__inner {
    padding: 28px 18px 22px;
  }

  .hero {
    border-radius: 26px;
  }

  .hero__actions,
  .search-form {
    width: 100%;
    max-width: none;
  }

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

  .grid-cards--featured,
  .grid-cards--compact,
  .grid-cards--category,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

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

  .section__head,
  .toolbar {
    align-items: start;
    flex-direction: column;
  }

  .toolbar__input {
    min-width: 0;
    width: 100%;
  }
}
