:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #0f766e;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--blue);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  padding: 0 22px 16px;
  max-width: 1180px;
  margin: 0 auto;
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  background: #f8fafc;
  font-weight: 650;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 52%, #0f766e 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
    radial-gradient(circle at 78% 30%, rgba(125, 211, 252, 0.26), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.04));
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 46px 46px;
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 78px 22px 52px;
  min-height: 650px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 58px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-kicker {
  padding: 9px 15px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0;
  max-width: 720px;
  color: #dff6ff;
  font-size: 19px;
}

.hero-tags,
.detail-tags,
.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 4px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.ghost-button {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  position: relative;
  min-height: 430px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
  transform: rotate(1deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.018);
}

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

.hero-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.78), transparent 58%);
}

.hero-poster-title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 900;
}

.hero-control {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.hero-control button {
  border: 0;
  cursor: pointer;
}

.hero-control > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 32px;
  line-height: 1;
}

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

.hero-dots button {
  width: 32px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
  background: #ffffff;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 22px;
}

.section-raised {
  margin-top: -22px;
  position: relative;
  z-index: 2;
}

.section-head {
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-bottom: 34px;
}

.section-head-inline {
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  justify-items: unset;
}

.section-kicker {
  color: var(--blue);
  background: #dbeafe;
  padding: 6px 12px;
}

.section h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  letter-spacing: -0.035em;
}

.section-head h2,
.page-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.section-head p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.section-more {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  min-height: 44px;
  padding: 0 18px;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

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

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

.movie-card {
  min-width: 0;
}

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

.poster-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0);
  transition: background 0.25s ease;
}

.poster-link:hover .poster-shade {
  background: rgba(15, 23, 42, 0.28);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  color: var(--orange);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.74);
  font-size: 12px;
  font-weight: 750;
}

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.movie-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card strong {
  color: #111827;
  line-height: 1.35;
  min-height: 44px;
  transition: color 0.2s ease;
}

.poster-link:hover strong {
  color: var(--orange);
}

.movie-card-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 40px;
}

.tag-row span,
.tag-cloud span {
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  padding: 4px 9px;
}

.soft-panel {
  max-width: 1220px;
  border-radius: 32px;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: var(--shadow-soft);
}

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

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

.category-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-card strong {
  font-size: 20px;
}

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

.category-samples {
  display: grid;
  gap: 4px;
  color: #334155;
  font-size: 13px;
}

.ranking-preview {
  padding-top: 52px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 94px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
}

.rank-row img {
  width: 94px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.rank-hot {
  color: var(--orange);
  font-weight: 900;
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 74px;
  padding: 0 22px;
}

.feature-card {
  padding: 34px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow);
}

.feature-card span {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  margin-bottom: 12px;
}

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

.feature-card p {
  margin: 0;
  color: #dff6ff;
}

.page-hero {
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 58px 22px;
  display: grid;
  gap: 14px;
}

.page-hero-rank {
  border-radius: 0 0 32px 32px;
}

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

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

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.search-box span {
  color: var(--blue);
  font-weight: 900;
}

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

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 700;
}

.filter-button.is-active,
.filter-button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.detail-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px 20px;
}

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

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.28);
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  object-fit: cover;
  background: #020617;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

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

.player-cover img {
  object-fit: cover;
}

.player-cover-shade {
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.12));
}

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--orange);
  background: #ffffff;
  font-size: 28px;
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.32);
}

.detail-card,
.side-card {
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.detail-card {
  padding: 30px;
}

.detail-card h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  margin: 14px 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.detail-card p {
  margin: 0 0 12px;
  color: #334155;
}

.detail-tags span {
  color: var(--blue);
  background: #dbeafe;
}

.tag-cloud {
  margin-top: 24px;
}

.side-card {
  padding: 22px;
  position: sticky;
  top: 92px;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: #f8fafc;
}

.compact-card img {
  width: 104px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compact-card strong {
  line-height: 1.35;
}

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

.related-section {
  padding-top: 36px;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 22px 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 44px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-brand span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.footer-main p {
  margin: 0;
  color: #94a3b8;
}

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

.footer-main a {
  display: block;
  color: #94a3b8;
  margin: 7px 0;
}

.footer-main a:hover {
  color: #38bdf8;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

  .hero-inner {
    min-height: auto;
    padding-top: 50px;
  }

  .hero-slide,
  .hero-slide.is-active {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 300px;
  }

  .section-head-inline,
  .toolbar,
  .footer-main,
  .feature-band {
    grid-template-columns: 1fr;
    display: grid;
  }

  .toolbar {
    align-items: stretch;
  }

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

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

@media (max-width: 620px) {
  .header-inner {
    min-height: 62px;
  }

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

  .hero-inner,
  .section,
  .detail-wrap,
  .page-hero,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .rank-row {
    grid-template-columns: 42px 74px minmax(0, 1fr);
  }

  .rank-hot {
    display: none;
  }

  .rank-row img {
    width: 74px;
  }

  .detail-card {
    padding: 22px;
  }

  .compact-card {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .compact-card img {
    width: 90px;
  }
}
