:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #0891b2;
  --cyan-strong: #0e7490;
  --blue: #2563eb;
  --dark: #020617;
  --shadow: 0 24px 60px rgba(15, 23, 42, .12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6fb 44%, #ffffff 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, .85);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(8, 145, 178, .25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan-strong);
  background: #ecfeff;
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.nav-search input,
.mobile-search input {
  width: 220px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: var(--text);
}

.nav-search button,
.mobile-search button {
  border: 0;
  padding: 10px 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
  font-weight: 800;
}

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

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-menu nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-menu nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  font-weight: 800;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.hero-main {
  position: relative;
  min-height: 620px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease, transform .8s ease;
  transform: scale(1.02);
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 20%, rgba(6, 182, 212, .28), transparent 32%), linear-gradient(90deg, rgba(2, 6, 23, .92) 0%, rgba(2, 6, 23, .72) 43%, rgba(2, 6, 23, .18) 100%), linear-gradient(0deg, rgba(2, 6, 23, .72), transparent 50%);
}

.hero-content {
  position: absolute;
  left: clamp(26px, 6vw, 70px);
  bottom: clamp(28px, 7vw, 82px);
  width: min(640px, calc(100% - 52px));
  color: #fff;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #0891b2;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 900;
}

.hero-kicker {
  color: #67e8f9;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: .98;
  letter-spacing: -.06em;
}

.hero-content p {
  margin: 0;
  max-width: 620px;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.detail-tags span,
.card-tags span {
  background: #ecfeff;
  color: #0e7490;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(37, 99, 235, .25);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.hero-side-head a {
  color: var(--cyan-strong);
  font-size: 14px;
}

.hero-pick {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  transition: background .2s ease, transform .2s ease;
}

.hero-pick:hover,
.hero-pick.active {
  background: #ecfeff;
  transform: translateX(2px);
}

.hero-pick img {
  width: 76px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #e2e8f0;
}

.hero-pick b,
.hero-pick em {
  display: block;
}

.hero-pick b {
  font-size: 15px;
  line-height: 1.35;
}

.hero-pick em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-section {
  padding: 72px 0;
}

.alt-section {
  position: relative;
}

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

.section-head h2,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.section-head p,
.sub-hero p {
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--cyan-strong);
  font-weight: 900;
}

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

.category-tile,
.category-card-large,
.content-card,
.player-card {
  border: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .92);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.category-tile {
  padding: 20px;
}

.category-tile > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 900;
}

.category-tile b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.category-tile p {
  min-height: 52px;
  margin: 12px 0;
  color: var(--muted);
}

.category-tile div {
  display: grid;
  gap: 6px;
}

.category-tile div a {
  color: #334155;
  font-size: 14px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .86);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #bae6fd;
  box-shadow: 0 24px 70px rgba(8, 145, 178, .18);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .5s ease;
}

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

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

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(8, 145, 178, .9);
  box-shadow: 0 12px 24px rgba(2, 6, 23, .28);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #eab308);
  font-weight: 900;
  z-index: 2;
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

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

.card-tags {
  align-items: center;
}

.card-tags b {
  margin-left: auto;
  color: #eab308;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 112px 1fr;
}

.movie-card.compact .poster img {
  height: 100%;
}

.sub-hero {
  padding: 84px 0 70px;
  color: #fff;
  background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, .36), transparent 28%), linear-gradient(135deg, #020617, #0f172a 50%, #0e7490);
}

.category-sub-hero {
  background: radial-gradient(circle at 80% 0%, rgba(37, 99, 235, .34), transparent 30%), linear-gradient(135deg, #020617, #0f172a 56%, #164e63);
}

.ranking-hero {
  background: radial-gradient(circle at 74% 18%, rgba(234, 179, 8, .24), transparent 32%), linear-gradient(135deg, #020617, #111827 60%, #0e7490);
}

.sub-hero .kicker,
.detail-hero .kicker {
  color: #67e8f9;
}

.sub-hero p {
  color: #dbeafe;
  max-width: 680px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

.crumbs a:hover {
  color: #fff;
}

.category-list {
  display: grid;
  gap: 22px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 18px;
  align-items: center;
}

.category-poster-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-poster-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #e2e8f0;
}

.category-card-large h2 {
  margin: 0 0 8px;
}

.category-card-large p {
  color: var(--muted);
  margin: 0 0 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 12px 14px;
  background: #fff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #67e8f9;
  box-shadow: 0 0 0 4px rgba(103, 232, 249, .18);
}

.empty-result {
  display: none;
  padding: 18px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}

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

.detail-hero {
  padding: 58px 0;
  color: #fff;
  background: radial-gradient(circle at 88% 20%, rgba(8, 145, 178, .32), transparent 32%), linear-gradient(135deg, #020617, #0f172a 55%, #164e63);
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .34);
  background: #1e293b;
}

.detail-info h1 {
  font-size: clamp(40px, 6vw, 68px);
  color: #fff;
}

.detail-info .lead {
  max-width: 760px;
  color: #dbeafe;
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, .12);
}

.detail-tags {
  margin-bottom: 26px;
}

.player-card {
  padding: 22px;
}

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

.player-title-row h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(8, 145, 178, .18), rgba(2, 6, 23, .38));
  cursor: pointer;
  z-index: 3;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
  font-size: 34px;
  text-indent: 4px;
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 22px;
  padding-bottom: 6px;
}

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.site-footer {
  margin-top: 40px;
  padding: 54px 0 26px;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr .7fr .8fr;
  gap: 34px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, .18);
  color: #94a3b8;
  font-size: 14px;
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

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

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

  .hero-side-head {
    grid-column: 1 / -1;
  }

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

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

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

@media (max-width: 820px) {
  .nav-wrap {
    height: 66px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero,
  .hero-main,
  .hero-slide img {
    min-height: 560px;
  }

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

  .section-head,
  .player-title-row {
    align-items: start;
    flex-direction: column;
  }

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

  .category-card-large,
  .detail-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 320px;
  }

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

@media (max-width: 520px) {
  .container,
  .hero,
  .nav-wrap,
  .mobile-menu,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .hero,
  .hero-main,
  .hero-slide img {
    min-height: 520px;
  }

  .hero-content {
    left: 20px;
    bottom: 28px;
    width: calc(100% - 40px);
  }

  .hero-content p {
    font-size: 15px;
  }

  .movie-grid,
  .library-grid,
  .rank-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    grid-template-columns: 104px 1fr;
  }

  .page-section {
    padding: 52px 0;
  }

  .sub-hero {
    padding: 58px 0;
  }
}
