:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --soft: #f5f5f4;
  --border: #e7e5e4;
  --text: #292524;
  --muted: #78716c;
  --muted-strong: #57534e;
  --dark: #1c1917;
  --primary: #0284c7;
  --primary-strong: #0369a1;
  --primary-soft: #e0f2fe;
  --primary-text: #075985;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 0.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  color: #1c1917;
}

.brand {
  font-size: 1.2rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.25);
}

.brand-mark span {
  width: 0;
  height: 0;
  border-top: 0.42rem solid transparent;
  border-bottom: 0.42rem solid transparent;
  border-left: 0.66rem solid #ffffff;
  margin-left: 0.12rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: #57534e;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary);
}

.search-toggle,
.mobile-toggle {
  border: 0;
  background: transparent;
  color: #57534e;
  font-weight: 800;
}

.search-toggle {
  font-size: 1.35rem;
  line-height: 1;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
}

.search-bar {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.search-bar form,
.mobile-search {
  display: flex;
  gap: 0.5rem;
}

.search-bar input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px #0ea5e9;
}

.search-bar button {
  border: 0;
  border-radius: var(--radius);
  padding: 0.65rem 1.1rem;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.mobile-nav {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0 1rem;
  background: #ffffff;
}

.mobile-nav .container {
  display: grid;
  gap: 0.75rem;
}

.mobile-nav .nav-link {
  display: block;
  padding: 0.35rem 0;
}

.hero-slider {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #0c0a09;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 42rem;
  color: #ffffff;
}

.hero-eyebrow {
  margin: 0 0 0.85rem;
  color: #bae6fd;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-title-large {
  margin: 0 0 0.8rem;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 900;
}

.hero-content h2:not(.hero-title-large) {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
}

.hero-content p:not(.hero-eyebrow) {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.2rem);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  border-radius: var(--radius);
  padding: 0.75rem 1.45rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.65);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
  padding: 3rem 0;
}

.content-section.no-padding {
  padding: 0;
}

.soft-bg {
  background: #ffffff;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head.with-link {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
  color: #1c1917;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.section-head a {
  color: var(--primary);
  font-weight: 700;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1c1917;
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.05);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
}

.play-chip {
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.25rem 0.6rem;
  background: rgba(2, 132, 199, 0.94);
}

.rank-badge {
  left: 0.65rem;
  top: 0.65rem;
  padding: 0.25rem 0.55rem;
  background: rgba(0, 0, 0, 0.55);
}

.movie-info {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
}

.movie-info strong {
  color: #1c1917;
  font-size: 1.05rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.movie-desc {
  color: #57534e;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.75rem;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  display: inline-flex;
  border-radius: 0.35rem;
  padding: 0.22rem 0.5rem;
  background: #f5f5f4;
  color: #57534e;
  font-size: 0.78rem;
  font-style: normal;
}

.tag.primary {
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 700;
}

.movie-card-horizontal {
  flex-direction: row;
  min-height: 8rem;
}

.movie-card-horizontal .poster-wrap {
  width: 8.5rem;
  min-width: 8.5rem;
  aspect-ratio: auto;
}

.movie-card-horizontal .movie-desc {
  -webkit-line-clamp: 2;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr);
  gap: 1.5rem;
}

.featured-side {
  display: grid;
  gap: 1.5rem;
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 0.6rem;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card span {
  color: var(--primary);
  font-weight: 800;
}

.category-card strong,
.category-overview-card strong {
  font-size: 1.1rem;
  color: #1c1917;
}

.category-card em,
.category-overview-card p,
.category-overview-card div {
  margin: 0;
  color: var(--muted);
  font-style: normal;
  font-size: 0.92rem;
}

.category-overview-card div {
  display: grid;
  gap: 0.25rem;
  color: #57534e;
}

.ranking-section {
  background: #f5f5f4;
}

.ranking-list {
  display: grid;
  gap: 0.85rem;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 3rem 4.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.ranking-number {
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 4.6rem;
  height: 6.2rem;
  object-fit: cover;
  border-radius: 0.4rem;
  background: #1c1917;
}

.ranking-body {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.ranking-body strong {
  color: #1c1917;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-body span {
  color: #57534e;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-body em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.ranking-score {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 900;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #ffffff;
}

.page-hero .container {
  padding: 4rem 0;
}

.page-hero p {
  margin: 0 0 0.75rem;
  color: #bae6fd;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
}

.page-hero span {
  display: block;
  max-width: 48rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(18rem, 1.6fr) repeat(3, minmax(10rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-panel div {
  display: grid;
  gap: 0.4rem;
}

.filter-panel label {
  color: #57534e;
  font-weight: 700;
  font-size: 0.9rem;
}

.empty-state {
  margin-top: 2rem;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.detail-wrap {
  padding: 2rem 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.detail-content {
  display: grid;
  gap: 1.5rem;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.75rem;
  border: 0;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 999px;
  background: var(--primary);
  font-size: 1.7rem;
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.32);
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.player-controls button {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 1.1rem;
}

.detail-card,
.related-panel {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.detail-card h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.detail-meta span {
  border-radius: 999px;
  background: #f5f5f4;
  padding: 0.3rem 0.65rem;
}

.text-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.text-block h2,
.related-panel h2 {
  margin: 0 0 0.75rem;
  color: #1c1917;
  font-size: 1.15rem;
}

.text-block p {
  margin: 0;
  color: #57534e;
  line-height: 1.8;
}

.review-block p {
  border-radius: var(--radius);
  background: #f5f5f4;
  padding: 1rem;
}

.related-panel {
  position: sticky;
  top: 5.5rem;
}

.related-list {
  display: grid;
  gap: 1rem;
}

.site-footer {
  margin-top: 5rem;
  background: #1c1917;
  color: #d6d3d1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 1rem;
}

.site-footer p {
  margin: 0;
  color: #a8a29e;
  max-width: 32rem;
}

.site-footer h3 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: #d6d3d1;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid #292524;
  padding: 1.2rem 0;
  text-align: center;
  color: #a8a29e;
  font-size: 0.9rem;
}

[hidden] {
  display: none !important;
}

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

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    padding-right: 3rem;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid,
  .featured-layout,
  .detail-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 1.2rem, 80rem);
  }

  .hero-slider {
    height: 620px;
  }

  .hero-content {
    padding-right: 2.5rem;
  }

  .hero-actions {
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    min-height: 7.4rem;
  }

  .movie-card-horizontal .poster-wrap {
    width: 7.4rem;
    min-width: 7.4rem;
  }

  .ranking-item {
    grid-template-columns: 2.2rem 3.8rem minmax(0, 1fr);
  }

  .ranking-item img {
    width: 3.8rem;
    height: 5.2rem;
  }

  .ranking-score {
    display: none;
  }

  .section-head.with-link {
    display: grid;
    align-items: start;
  }
}
