:root {
  --site-bg: #f8fafc;
  --site-card: #ffffff;
  --site-text: #0f172a;
  --site-muted: #64748b;
  --site-border: #e2e8f0;
  --site-primary: #0284c7;
  --site-primary-dark: #0369a1;
  --site-primary-soft: #e0f2fe;
  --site-shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --site-radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header-inner {
  max-width: 1200px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.28);
}

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--site-primary-dark);
  background: var(--site-primary-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--site-primary-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--site-primary-dark);
}

.hero-section {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image.image-missing,
.detail-backdrop img.image-missing,
.poster-shell img.image-missing {
  opacity: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.16)), linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.05));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1200px, calc(100% - 48px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.copy-grid article span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--site-primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 14px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.tag-row span,
.detail-tags span {
  background: #e0f2fe;
  color: #0369a1;
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  box-shadow: 0 18px 35px rgba(14, 165, 233, 0.28);
}

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

.ghost-button.dark {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #ffffff;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.45);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 54px 24px;
}

.intro-section {
  padding-top: 70px;
}

.panel-section {
  max-width: none;
  padding-left: max(24px, calc((100% - 1200px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1200px) / 2 + 24px));
  background: linear-gradient(180deg, #ffffff, #f0f9ff);
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.page-hero h1,
.copy-grid h2 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--site-muted);
  font-size: 16px;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.more-link {
  color: var(--site-primary-dark);
  font-weight: 800;
}

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

.category-tile {
  min-height: 118px;
  padding: 22px;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: all 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: #bae6fd;
  box-shadow: var(--site-shadow);
}

.category-tile span {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  display: block;
  margin-top: 12px;
  color: var(--site-muted);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--site-radius);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-shell {
  position: relative;
  display: block;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(14, 165, 233, 0.32), transparent 35%), linear-gradient(135deg, #0f172a, #0369a1);
  aspect-ratio: 16 / 9;
}

.poster-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-shell img {
  transform: scale(1.06);
}

.corner-badge,
.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: auto;
  right: 12px;
  background: #0284c7;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--site-primary-dark);
}

.movie-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--site-muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 24px;
  color: #ffffff;
  background: radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.38), transparent 32%), linear-gradient(135deg, #020617, #0f172a 52%, #075985);
}

.page-hero > div {
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.compact-hero {
  padding-top: 68px;
  padding-bottom: 68px;
}

.search-hero {
  min-height: 340px;
}

.search-panel {
  max-width: 760px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.search-panel input {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 999px;
  outline: none;
  padding: 0 22px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a,
.pagination span,
.mini-link-row a,
.detail-category-row a,
.detail-category-row span {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-weight: 800;
}

.pagination a.active,
.pagination a:hover,
.mini-link-row a.active,
.mini-link-row a:hover,
.detail-category-row a:hover {
  color: #ffffff;
  border-color: var(--site-primary);
  background: var(--site-primary);
}

.category-link-panel {
  padding-top: 26px;
  padding-bottom: 4px;
}

.mini-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ranking-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--site-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.ranking-item span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: var(--site-primary);
  font-weight: 900;
}

.ranking-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-item em {
  color: var(--site-muted);
  font-style: normal;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  filter: blur(2px);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.82));
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  aspect-ratio: 4 / 3;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
}

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

.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.detail-meta span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 800;
}

.detail-section {
  padding-bottom: 28px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.30));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-card.player-active .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--site-primary);
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.38);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 18px;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

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

.copy-grid article {
  padding: 28px;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.copy-grid p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.detail-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-category-row strong {
  display: inline-flex;
  align-items: center;
  color: #0f172a;
}

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

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  gap: 18px;
}

.site-footer .footer-logo {
  color: #ffffff;
}

.site-footer p {
  max-width: 760px;
  margin: 0;
}

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

.footer-links a {
  color: #e0f2fe;
  font-weight: 800;
}

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

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

  .detail-poster {
    max-width: 460px;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

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

  .site-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--site-border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--site-shadow);
  }

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

  .nav-link {
    text-align: center;
  }

  .hero-section {
    height: 560px;
  }

  .hero-content {
    bottom: 72px;
    width: calc(100% - 32px);
  }

  .hero-arrow {
    display: none;
  }

  .content-section {
    padding: 40px 16px;
  }

  .movie-grid,
  .category-grid,
  .copy-grid,
  .ranking-strip {
    grid-template-columns: 1fr;
  }

  .row-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero-inner {
    padding: 46px 16px;
  }

  .detail-info h1 {
    font-size: 38px;
  }
}

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