:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.09);
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --cyan: #06b6d4;
  --dark: #08111f;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.11), transparent 30rem), var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.96), rgba(8, 145, 178, 0.96));
  color: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 24px;
  font-weight: 900;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

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

.nav-links a,
.nav-toggle {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0f172a 0%, #111827 42%, #1e293b 100%);
  color: #ffffff;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle at 20% 15%, rgba(6, 182, 212, 0.7), transparent 18rem), radial-gradient(circle at 85% 0%, rgba(37, 99, 235, 0.8), transparent 22rem), linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0, transparent 28%);
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 46px;
  align-items: center;
  padding: 72px 0 82px;
}

.hero-copy h1,
.page-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.85;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

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

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

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

.small-btn {
  min-height: 40px;
  padding: 0 16px;
  color: var(--brand);
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.08);
}

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

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

.hero-category-links a {
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
}

.hero-stage {
  position: relative;
  min-height: 520px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
  background: rgba(15, 23, 42, 0.66);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 17, 31, 0.92), rgba(8, 17, 31, 0.24), rgba(8, 17, 31, 0.75));
  z-index: 1;
}

.hero-image-link {
  display: block;
  height: 100%;
}

.hero-movie-card {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(18px);
}

.hero-movie-card h2 {
  margin: 10px 0 10px;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
}

.hero-movie-card p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
}

.hero-dots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
}

.hero-dots button {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-dots button.is-active {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

.search-panel {
  position: relative;
  z-index: 5;
  margin-top: -34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 18px;
  outline: none;
  color: var(--ink);
  background: #f8fafc;
}

.search-box input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-box button,
.filter-chips button {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
  min-height: 48px;
  white-space: nowrap;
}

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

.filter-chips button.is-active {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(6, 182, 212, 0.14));
  color: var(--brand-strong);
  font-weight: 800;
}

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

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

.section-heading h2 {
  margin-top: 7px;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--brand);
  font-weight: 800;
}

.compact {
  align-items: center;
  margin-bottom: 16px;
}

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

.category-card,
.category-overview-card,
.ranking-panel,
.detail-content article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

.category-card {
  display: block;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.14);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 82px;
  margin-bottom: 14px;
}

.category-thumbs img {
  border-radius: 12px;
  background: #dbeafe;
}

.category-card strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
}

.category-card p,
.category-overview-head p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 17, 31, 0.68));
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 9px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.movie-info {
  padding: 15px;
}

.movie-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.movie-meta {
  margin-top: 12px;
}

.movie-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.tag-row {
  margin-top: 9px;
}

.tag-row span {
  background: #f1f5f9;
  color: #475569;
}

.ranking-panel {
  position: sticky;
  top: 98px;
  padding: 18px;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-list .movie-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border-radius: 18px;
}

.ranking-list .movie-poster {
  height: 128px;
  aspect-ratio: auto;
}

.ranking-list .movie-info {
  padding: 12px;
}

.ranking-list .tag-row {
  display: none;
}

.page-hero {
  margin-top: 30px;
  padding: 54px;
  border-radius: 34px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 55%, #0891b2);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.breadcrumb a {
  color: #ffffff;
  font-weight: 800;
}

.category-overview {
  display: grid;
  gap: 26px;
  padding: 46px 0;
}

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

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.detail-hero {
  padding: 34px 0 12px;
}

.detail-hero .breadcrumb {
  color: var(--muted);
}

.detail-hero .breadcrumb a {
  color: var(--brand);
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 18px;
  padding: 28px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  background: #dbeafe;
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.16);
}

.detail-copy h1 {
  margin: 14px 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 760px;
  color: #334155;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span {
  background: #dbeafe;
}

.detail-tags span {
  background: #ffffff;
}

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

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.28), rgba(2, 6, 23, 0.22));
  color: #ffffff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  box-shadow: 0 20px 55px rgba(37, 99, 235, 0.42);
  font-size: 36px;
  text-indent: 4px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0 34px;
}

.detail-content article {
  padding: 26px;
}

.detail-content h2 {
  margin-bottom: 14px;
  font-size: 26px;
  font-weight: 900;
}

.detail-content p {
  color: #334155;
  line-height: 1.9;
}

.site-footer {
  margin-top: 40px;
  padding: 34px 0;
  background: #0f172a;
  color: #ffffff;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.site-footer strong {
  font-size: 22px;
}

.site-footer p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .hero-layout,
  .two-column,
  .detail-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    min-height: auto;
  }

  .hero-stage {
    min-height: 560px;
  }

  .ranking-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .layout {
    width: min(100% - 22px, 1200px);
  }

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

  .nav-links {
    position: absolute;
    top: 78px;
    left: 11px;
    right: 11px;
    display: none;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-layout {
    padding: 42px 0 58px;
  }

  .hero-stage {
    min-height: 520px;
    border-radius: 24px;
  }

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

  .hero-movie-card {
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 18px;
  }

  .search-panel {
    margin-top: -24px;
  }

  .search-box {
    flex-direction: column;
  }

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

  .category-overview-head,
  .section-heading,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero {
    padding: 30px 22px;
    border-radius: 24px;
  }

  .detail-grid {
    padding: 18px;
    border-radius: 24px;
  }

  .detail-poster {
    width: min(100%, 320px);
  }
}

@media (max-width: 480px) {
  .brand-text em {
    display: none;
  }

  .brand {
    min-width: auto;
  }

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

  .ranking-list .movie-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}
