:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .10);
  --brand: #06b6d4;
  --brand-strong: #2563eb;
  --accent: #f97316;
  --danger: #ef4444;
  --shadow: 0 24px 60px rgba(15, 23, 42, .14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #eff6ff 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 14px 30px rgba(37, 99, 235, .35);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: -.02em;
}

.brand-text small {
  margin-top: 3px;
  color: #67e8f9;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #dbeafe;
  font-weight: 700;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link {
  padding: 10px 13px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(6, 182, 212, .18);
  transform: translateY(-1px);
}

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

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

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

.page-top {
  padding-top: 42px;
}

.hero-shell {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity .8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(0deg, #ffffff, rgba(255, 255, 255, 0));
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 170px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -.06em;
}

.hero-copy h2 {
  margin: 18px 0 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.18;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #cffafe;
  font-size: 13px;
  font-weight: 700;
  background: rgba(8, 145, 178, .24);
  border: 1px solid rgba(125, 211, 252, .22);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  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: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  box-shadow: 0 18px 38px rgba(249, 115, 22, .32);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
}

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

.hero-dots button {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  cursor: pointer;
}

.hero-dots button.active {
  background: #67e8f9;
}

.hero-card-row {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  margin: -92px auto 0;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .10);
  border: 1px solid rgba(15, 23, 42, .07);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(6, 182, 212, .36);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

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

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

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

.score-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  box-shadow: 0 12px 24px rgba(239, 68, 68, .28);
}

.movie-card-body {
  padding: 14px;
}

.movie-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--brand-strong);
}

.card-meta,
.card-line,
.card-tags {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-line {
  color: #334155;
}

.card-tags {
  color: var(--brand-strong);
  font-weight: 700;
}

.movie-card.compact .card-line {
  display: none;
}

.content-section {
  padding: 58px 0 0;
}

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

.section-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.04em;
}

.section-link {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--brand-strong);
  font-weight: 900;
  background: #e0f2fe;
}

.search-panel {
  margin: 54px 0 6px;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .10);
  border: 1px solid rgba(15, 23, 42, .08);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 20px;
  padding: 0 18px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, .08);
}

.search-box span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.search-box input {
  width: 100%;
  height: 56px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chips button {
  border: 0;
  padding: 9px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 800;
  background: #e2e8f0;
  cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.empty-result {
  display: none;
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 700;
}

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

.rank-preview {
  padding: 48px;
  margin-top: 58px;
  border-radius: 34px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(15, 23, 42, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .12);
}

.rank-no {
  color: var(--accent);
  font-size: 22px;
  font-weight: 1000;
  text-align: center;
}

.rank-item img {
  width: 72px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-radius: 28px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-card.large {
  min-height: 260px;
}

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

.category-card span {
  font-size: 22px;
  font-weight: 1000;
}

.category-card strong {
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.7;
}

.page-title-block {
  margin-bottom: 36px;
  padding: 46px;
  border-radius: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #164e63 55%, #2563eb);
  box-shadow: var(--shadow);
}

.page-title-block h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.page-title-block p:not(.eyebrow) {
  max-width: 780px;
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

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

.breadcrumb.invert {
  color: #bfdbfe;
}

.breadcrumb.invert a:hover {
  color: #ffffff;
}

.detail-hero {
  position: relative;
  min-height: 590px;
  color: #ffffff;
  overflow: hidden;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.06);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(0deg, #f8fafc, rgba(248, 250, 252, 0));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 42px 0 100px;
}

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

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .36);
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.detail-line {
  max-width: 820px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

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

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .18);
}

.detail-main {
  margin-top: -62px;
  position: relative;
  z-index: 5;
}

.player-section {
  padding: 0 0 38px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 32px 80px rgba(15, 23, 42, .28);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(6, 182, 212, .20), rgba(2, 6, 23, .68));
  cursor: pointer;
}

.play-cover strong {
  font-size: 20px;
  letter-spacing: .08em;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  color: #ffffff;
  font-size: 35px;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  box-shadow: 0 22px 48px rgba(239, 68, 68, .36);
  transition: transform .2s ease;
}

.play-cover:hover .play-icon {
  transform: scale(1.08);
}

.player-shell.is-playing .play-cover {
  display: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 22px;
}

.story-card {
  padding: 30px;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .09);
}

.story-card.accent {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.story-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.03em;
}

.story-card p:not(.eyebrow) {
  margin: 16px 0 0;
  color: #334155;
  line-height: 1.95;
  font-size: 16px;
}

.related-section {
  padding-bottom: 20px;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-brand {
  margin-bottom: 18px;
}

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

.site-footer p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #64748b;
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 4px;
  }

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

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

  .rank-list,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero-copy {
    padding: 96px 0 160px;
  }

  .hero-card-row {
    margin-top: -70px;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h2 {
    font-size: 14px;
  }

  .card-line {
    display: none;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .search-panel,
  .rank-preview,
  .page-title-block,
  .story-card {
    border-radius: 22px;
    padding: 22px;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 64px 1fr;
  }

  .rank-meta {
    display: none;
  }

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

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

  .detail-poster {
    width: 58%;
    max-width: 240px;
  }

  .detail-main {
    margin-top: -34px;
  }

  .play-icon {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
}

@media (max-width: 460px) {
  .page-wrap,
  .header-inner,
  .mobile-nav,
  .hero-card-row,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .listing-grid {
    gap: 10px;
  }

  .hero-tags,
  .tag-row,
  .filter-chips {
    gap: 7px;
  }
}
