:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #06b6d4;
  --teal: #14b8a6;
  --bg: #f8fafc;
  --soft: #eef6ff;
  --dark: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --danger: #ef4444;
  --shadow: 0 18px 48px rgba(15, 23, 42, .12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, .08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dark);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, .86);
  box-shadow: 0 8px 28px rgba(15, 23, 42, .06);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--dark);
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}

.logo-text {
  font-size: 22px;
  letter-spacing: .02em;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: #334155;
}

.site-nav a {
  position: relative;
  padding: 20px 0;
  transition: color .2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 10px;
  background: var(--dark);
}

.hero {
  position: relative;
  min-height: 630px;
  overflow: hidden;
  background: #071126;
}

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

.hero-slide {
  display: none;
  position: relative;
  align-items: center;
  gap: 56px;
  padding: 76px max(32px, calc((100vw - 1200px) / 2)) 86px;
  background-position: center;
  background-size: cover;
  color: #fff;
}

.hero-slide.active {
  display: flex;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, .32), transparent 30%),
    linear-gradient(0deg, rgba(2, 6, 23, .72), rgba(2, 6, 23, .12));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow.light {
  color: #dff7ff;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 30px;
  color: #e0f2fe;
  font-size: clamp(18px, 2.5vw, 25px);
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.primary-btn {
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 28px rgba(37, 99, 235, .22);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  padding: 0 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .13);
  backdrop-filter: blur(12px);
}

.light-btn {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 12px 30px rgba(255, 255, 255, .22);
}

.text-link {
  min-height: auto;
  color: var(--primary);
}

.hero-poster {
  position: relative;
  z-index: 2;
  flex: 0 0 min(340px, 32vw);
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .46);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.section {
  padding: 68px 0;
}

.section-white {
  background: #fff;
}

.soft-bg {
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
}

.gradient-section {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--secondary), var(--teal));
}

.section-title-row,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-title-row h2,
.intro-grid h2,
.category-tile h2,
.cta-panel h2,
.category-overview-card h2,
.sidebar-card h2,
.detail-card h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.section-title-row p,
.section-desc,
.category-tile p,
.category-overview-card p,
.cta-panel p {
  margin: 0;
  color: var(--muted);
}

.gradient-section p {
  color: #e0f2fe;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 34px;
  align-items: center;
}

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

.stats-row a {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.stats-row strong,
.stats-row span {
  display: block;
}

.stats-row strong {
  color: var(--primary);
  font-size: 24px;
}

.stats-row span {
  color: var(--muted);
  font-size: 14px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease;
}

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

.movie-card a,
.movie-card-body,
.poster-wrap {
  display: block;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, .68), transparent 60%);
  transition: opacity .25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.corner-badge,
.rank-badge,
.poster-play {
  position: absolute;
  z-index: 3;
}

.corner-badge {
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37, 99, 235, .86);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: var(--danger);
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .72);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.8);
  transition: opacity .22s ease, transform .22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--dark);
  font-size: 16px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card em {
  display: -webkit-box;
  min-height: 43px;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

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

.category-tile,
.category-overview-card,
.sidebar-card,
.detail-card,
.player-card,
.search-card {
  border: 1px solid rgba(226, 232, 240, .82);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.category-tile {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 24px;
}

.category-preview,
.side-list {
  display: grid;
  gap: 12px;
}

.side-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background .2s ease, transform .2s ease;
}

.side-card:hover {
  background: #eef6ff;
  transform: translateX(3px);
}

.side-poster {
  flex: 0 0 72px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.side-poster img {
  width: 72px;
  height: 96px;
  object-fit: cover;
}

.side-info {
  display: grid;
  min-width: 0;
}

.side-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--dark);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.side-rank {
  position: absolute;
  right: 10px;
  top: 10px;
  color: var(--primary);
  font-weight: 900;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-hero {
  padding: 78px 0;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(6, 182, 212, .48), transparent 28%),
    linear-gradient(120deg, #1d4ed8, #0891b2, #0f766e);
}

.page-hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 0 0 24px;
  color: #e0f2fe;
  font-size: 18px;
}

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

.category-overview-card {
  padding: 26px;
}

.search-panel {
  margin-bottom: 26px;
}

.search-card {
  padding: 22px;
}

.search-label {
  display: block;
  margin-bottom: 12px;
  color: var(--dark);
  font-weight: 900;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px));
  gap: 12px;
}

.search-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--dark);
  background: #f8fafc;
  outline: none;
}

.search-input:focus,
.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.empty-state {
  margin: 14px 0 0;
  color: var(--danger);
  font-weight: 700;
}

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

.sidebar-card {
  padding: 22px;
}

.breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  min-height: 54px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 800;
}

.detail-section {
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  overflow: hidden;
  padding: 0;
  background: #030712;
}

.video-stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 99, 235, .4), transparent 22%),
    linear-gradient(0deg, rgba(2, 6, 23, .64), rgba(2, 6, 23, .34));
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 36px rgba(37, 99, 235, .32);
}

.detail-card {
  padding: 28px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-tags a,
.detail-tags span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  background: #dbeafe;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.lead-text {
  margin: 0 0 22px;
  color: #334155;
  font-size: 20px;
  font-weight: 700;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 26px;
}

.meta-list span {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.meta-list strong {
  color: var(--muted);
  font-size: 12px;
}

.detail-card p {
  color: #334155;
  font-size: 16px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.poster-card h2 {
  margin-top: 18px;
  font-size: 22px;
}

.poster-card p {
  color: var(--muted);
}

.full-btn {
  width: 100%;
}

.compact-title {
  margin-bottom: 20px;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand p {
  max-width: 390px;
  color: #94a3b8;
}

.footer-logo .logo-text {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 16px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color .2s ease;
}

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

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

@media (max-width: 1100px) {
  .movie-grid,
  .featured-grid,
  .rank-grid,
  .latest-grid,
  .search-grid,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .detail-sidebar {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 880px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 4px;
  }

  .site-nav a::after {
    display: none;
  }

  .hero-slide.active {
    display: grid;
    grid-template-columns: 1fr;
    padding: 62px 22px 84px;
  }

  .hero-poster {
    width: min(300px, 78vw);
    flex-basis: auto;
    justify-self: center;
  }

  .intro-grid,
  .category-tile,
  .footer-inner,
  .cta-panel,
  .section-title-row,
  .category-overview-head {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

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

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

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

@media (max-width: 640px) {
  .container,
  .header-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1200px);
  }

  .section {
    padding: 46px 0;
  }

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

  .movie-grid,
  .featured-grid,
  .rank-grid,
  .latest-grid,
  .search-grid,
  .category-grid,
  .compact-overview-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

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

  .movie-card em {
    font-size: 12px;
  }

  .page-hero {
    padding: 54px 0;
  }

  .detail-card,
  .sidebar-card,
  .search-card,
  .category-overview-card {
    padding: 18px;
  }

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