:root {
  --bg: #f6f9ff;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --violet: #7c3aed;
  --dark: #07111f;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.32);
}

.brand-text {
  font-size: 1.12rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  color: #334155;
  border-radius: 999px;
  font-weight: 700;
  transition: all 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

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

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

main {
  overflow: hidden;
}

.hero-wrap {
  position: relative;
  width: min(1220px, calc(100% - 32px));
  margin: 28px auto 0;
  min-height: 640px;
  overflow: hidden;
  border-radius: 34px;
  background: radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.36), transparent 34%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #0891b2 100%);
  box-shadow: var(--shadow);
}

.hero-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 12, 28, 0.78), rgba(5, 12, 28, 0.22), rgba(5, 12, 28, 0.62));
  z-index: 2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  padding: 76px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.7s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transform: scale(1.04);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #bae6fd;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
  max-width: 780px;
}

.hero-copy p {
  margin: 24px 0 0;
  max-width: 680px;
  color: #e0f2fe;
  font-size: clamp(1rem, 2vw, 1.28rem);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.tag-row span {
  color: #1e40af;
  background: rgba(37, 99, 235, 0.08);
}

.large-tags span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.card-button,
.text-button,
.rank-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.card-button,
.rank-more {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.26);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.primary-button:hover,
.ghost-button:hover,
.card-button:hover,
.text-button:hover,
.rank-more:hover {
  transform: translateY(-2px);
}

.hero-panel {
  position: absolute;
  left: 76px;
  right: 76px;
  bottom: 36px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr auto;
  align-items: center;
  gap: 20px;
}

.hero-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: none;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
}

.hero-search button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: var(--blue);
  cursor: pointer;
}

.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-category-links a {
  padding: 8px 12px;
  color: #e0f2fe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.content-section {
  width: min(1220px, calc(100% - 32px));
  margin: 68px auto;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-head p {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--muted);
}

.section-head > a,
.text-button {
  color: var(--blue);
  font-weight: 900;
}

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

.category-tile {
  min-height: 176px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.ranking-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  font-size: 1.16rem;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card.hidden,
.ranking-item.hidden {
  display: none;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dbeafe;
}

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

.movie-card:hover .movie-poster img,
.ranking-item:hover img {
  transform: scale(1.07);
}

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

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.28);
}

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

.card-meta,
.detail-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.card-meta span,
.detail-meta span,
.ranking-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

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

.card-link {
  color: var(--blue);
  font-weight: 900;
  font-size: 0.9rem;
}

.rank-card,
.side-card {
  position: sticky;
  top: 92px;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
  background: radial-gradient(circle at 10% 0%, rgba(6, 182, 212, 0.5), transparent 36%), linear-gradient(145deg, #0f172a, #1e3a8a);
  box-shadow: var(--shadow);
}

.rank-card-head span {
  color: #67e8f9;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.rank-card-head h2 {
  margin: 6px 0;
  font-size: 2rem;
}

.rank-card-head p {
  margin: 0 0 20px;
  color: #bfdbfe;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.rank-index,
.rank-score {
  font-weight: 900;
  color: #67e8f9;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-more {
  width: 100%;
  margin-top: 18px;
}

.page-hero {
  width: min(1220px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 72px;
  border-radius: 34px;
  color: #ffffff;
  background: radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.45), transparent 32%), linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0891b2);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.small-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 1.08rem;
}

.filter-bar {
  width: 100%;
  margin-bottom: 24px;
  border-color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.8);
}

.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
}

.wide-filter {
  max-width: 780px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.category-overview-text span {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 34px;
  padding: 0 12px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.category-overview-text h2 {
  margin: 18px 0 10px;
  font-size: 1.8rem;
}

.category-overview-text p {
  color: var(--muted);
}

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

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

.movie-card.compact .tag-row,
.movie-card.compact .card-actions {
  display: none;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: #dbeafe;
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ranking-main h2 {
  margin: 8px 0;
  font-size: 1.35rem;
}

.ranking-main p {
  margin: 0 0 10px;
  color: var(--muted);
}

.ranking-score {
  justify-self: end;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  font-size: 1.5rem;
  font-weight: 900;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.84));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  padding: 70px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bfdbfe;
  font-weight: 800;
}

.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.detail-line {
  max-width: 820px;
  color: #dbeafe;
  font-size: 1.12rem;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.42));
  cursor: pointer;
}

.player-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.38);
  font-size: 2rem;
}

.player-overlay.is-hidden {
  display: none;
}

.detail-article {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 1.6rem;
}

.detail-article h2 + p {
  margin-top: 0;
}

.detail-article p {
  color: #334155;
  font-size: 1.04rem;
}

.side-card {
  color: var(--text);
  background: #ffffff;
}

.side-card h2 {
  margin: 0 0 16px;
}

.side-card dl {
  margin: 0;
}

.side-card dt {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.side-card dd {
  margin: 4px 0 16px;
  font-weight: 800;
}

.site-footer {
  margin-top: 86px;
  padding: 46px 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  color: #ffffff;
  font-weight: 900;
  font-size: 1.15rem;
}

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

.footer-inner p {
  margin: 0;
}

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

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

  .rank-card,
  .side-card {
    position: static;
  }

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

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .hero-wrap {
    min-height: 740px;
    border-radius: 24px;
  }

  .hero-slide {
    display: block;
    padding: 48px 26px;
  }

  .hero-panel {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

  .hero-search,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .section-head {
    display: block;
  }

  .page-hero {
    padding: 48px 26px;
    border-radius: 24px;
  }

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

  .ranking-item {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .ranking-score {
    grid-column: 2;
    justify-self: start;
    width: 56px;
    height: 42px;
    border-radius: 14px;
    font-size: 1rem;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-cover {
    max-width: 260px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-hero,
  .hero-wrap,
  .footer-inner,
  .detail-inner {
    width: min(100% - 22px, 1220px);
  }

  .brand-text {
    font-size: 1rem;
  }

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

  .ranking-item {
    grid-template-columns: 1fr;
  }

  .ranking-score {
    grid-column: auto;
  }

  .content-section {
    margin: 46px auto;
  }

  .movie-card p {
    min-height: auto;
  }
}
