:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --dark-soft: #1f2937;
  --emerald: #059669;
  --emerald-deep: #047857;
  --emerald-soft: #ecfdf5;
  --amber: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), #14b8a6);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.24);
  font-size: 13px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow: hidden;
}

.nav-link {
  color: #374151;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  margin: 3px auto;
  display: block;
  border-radius: 3px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-slider {
  position: relative;
  height: 60vh;
  min-height: 500px;
  overflow: hidden;
  background: #111827;
}

.hero-bg,
.hero-bg img,
.hero-bg::after {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.02);
  transition: opacity 0.45s ease, transform 0.6s ease;
}

.hero-bg::after {
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.16));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 0 0 70px;
}

.hero-slide {
  display: none;
  max-width: 720px;
  color: #ffffff;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pill,
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
}

.pill {
  color: #ffffff;
  background: var(--emerald);
}

.score-pill {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.hero-slide h1,
.hero-slide h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero-slide p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: #d1d5db;
  font-size: 14px;
}

.hero-meta span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  display: inline-block;
  margin-left: 10px;
  border-radius: 999px;
  vertical-align: middle;
  background: #6b7280;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.28);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.btn-soft {
  color: var(--emerald-deep);
  background: var(--emerald-soft);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 22px;
  transform: translateY(-50%);
}

.hero-next {
  right: 22px;
  transform: translateY(-50%);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--emerald);
}

.section {
  padding: 56px 0;
}

.section.tint-emerald {
  background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
}

.section.tint-amber {
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

.section.tint-rose {
  background: linear-gradient(90deg, #fff1f2, #fdf2f8);
}

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

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-line {
  height: 4px;
  flex: 1;
  min-width: 80px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald), rgba(5, 150, 105, 0));
}

.section-more {
  display: inline-flex;
  align-items: center;
  color: var(--emerald);
  font-size: 14px;
  font-weight: 800;
}

.lead-panel,
.content-panel,
.detail-panel,
.filter-panel {
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-panel {
  padding: clamp(24px, 4vw, 42px);
  margin-bottom: 30px;
}

.lead-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.lead-panel p {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

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

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card.compact .poster-wrap {
  aspect-ratio: 2 / 3;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 62%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-hover {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, 0);
}

.year-badge,
.type-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 8px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  right: 10px;
  background: var(--emerald);
}

.type-badge {
  left: 10px;
  background: rgba(17, 24, 39, 0.78);
}

.card-body {
  display: block;
  padding: 14px;
}

.card-body strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: var(--emerald);
}

.card-body em {
  min-height: 40px;
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 12px;
}

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

.category-tile {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 20px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0f766e);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #0ea5e9, #0f766e);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #f59e0b, #e11d48);
}

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

.category-tile strong {
  font-size: 20px;
  font-weight: 900;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.6;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px;
  gap: 12px;
  padding: 18px;
  margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 76px minmax(0, 1fr) 58px;
  gap: 14px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--muted);
  background: #f3f4f6;
  font-weight: 900;
}

.top-rank .rank-num {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #e11d48);
}

.rank-row img {
  width: 76px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #e5e7eb;
}

.rank-info {
  min-width: 0;
}

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

.rank-info strong {
  color: var(--text);
  font-weight: 850;
}

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

.rank-score {
  color: var(--emerald);
  font-size: 20px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
  cursor: pointer;
}

.player-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.94);
  box-shadow: 0 20px 48px rgba(5, 150, 105, 0.3);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.player-play-button:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-play-button.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-panel {
  padding: clamp(22px, 4vw, 34px);
  margin-top: 24px;
}

.detail-panel h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 750;
}

.text-block {
  margin: 24px 0;
}

.text-block h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 900;
}

.text-block p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--emerald-deep);
  background: var(--emerald-soft);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-card {
  position: sticky;
  top: 86px;
  border-radius: 18px;
  padding: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 900;
}

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

.related-mini {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-mini img {
  width: 74px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #e5e7eb;
}

.related-mini strong,
.related-mini span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-mini strong {
  font-weight: 850;
}

.related-mini span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  display: none;
  border-radius: 16px;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 60px;
  color: #d1d5db;
  background: #111827;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-brand p {
  max-width: 560px;
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 10px;
}

.site-footer a {
  color: #d1d5db;
  font-size: 14px;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #34d399;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 14px;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-slider {
    height: 70vh;
    min-height: 560px;
  }

  .hero-inner {
    padding-bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .mobile-nav,
  .shell,
  .footer-shell {
    width: min(100% - 24px, 1180px);
  }

  .site-logo {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 620px;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-line {
    width: 100%;
    flex: none;
  }

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

  .rank-row img {
    width: 64px;
    height: 84px;
  }

  .rank-score {
    grid-column: 3;
    font-size: 16px;
  }
}
