* {
  box-sizing: border-box;
}

:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --amber-500: #f59e0b;
  --white: #ffffff;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 8px 28px rgba(2, 6, 23, 0.28);
}

.nav-shell {
  max-width: 1280px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), #7c3aed);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

.nav-categories {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.85);
}

.nav-category-scroll {
  max-width: 1280px;
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  color: #cbd5e1;
  white-space: nowrap;
}

.nav-category-scroll a:hover {
  color: var(--white);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

.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 {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.64) 42%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue-600);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

.primary-button {
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.28);
}

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

.primary-button:hover {
  background: var(--blue-700);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

.primary-button.small,
.ghost-button.small {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.48);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.stat-strip {
  max-width: 1180px;
  margin: -38px auto 50px;
  padding: 22px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.stat-strip div {
  padding: 8px 12px;
  border-right: 1px solid var(--slate-200);
}

.stat-strip div:last-child {
  border-right: 0;
}

.stat-strip strong,
.stat-strip span {
  display: block;
}

.stat-strip strong {
  font-size: 18px;
}

.stat-strip span {
  margin-top: 4px;
  color: var(--slate-500);
}

.content-section,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-section {
  margin-bottom: 64px;
}

.soft-panel {
  padding: 34px 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(90deg, var(--slate-100), #eff6ff);
}

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

.section-heading p {
  margin: 10px 0 0;
  color: var(--slate-500);
}

.section-heading a {
  color: var(--blue-600);
  font-weight: 800;
}

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

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-800);
}

.movie-card.large .movie-cover {
  aspect-ratio: 16 / 8.5;
}

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

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

.cover-badge,
.play-float {
  position: absolute;
  color: var(--white);
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
}

.cover-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.play-float {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.movie-info {
  padding: 18px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--slate-500);
  font-size: 13px;
}

.movie-info h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-info h2 a:hover,
.breadcrumb a:hover,
.side-card a:hover {
  color: var(--blue-600);
}

.movie-info p {
  min-height: 46px;
  margin: 0 0 13px;
  color: var(--slate-600);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-100);
  font-size: 12px;
  font-weight: 700;
}

.showcase-list {
  display: grid;
  gap: 24px;
}

.showcase-row,
.category-panel,
.filter-panel,
.story-card,
.player-card,
.side-card,
.poster-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.showcase-row,
.category-panel,
.filter-panel,
.story-card {
  padding: 26px;
}

.showcase-title,
.category-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.showcase-title h3,
.category-panel-head h2 {
  margin: 0;
  font-size: 26px;
}

.showcase-title a,
.category-panel-head a {
  color: var(--blue-600);
  font-weight: 800;
}

.category-panel-head span {
  color: var(--blue-600);
  font-weight: 800;
}

.category-panel-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--slate-600);
  line-height: 1.65;
}

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

.compact-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--slate-800);
  aspect-ratio: 16 / 9;
}

.compact-card img {
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.compact-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 12px 12px;
  color: var(--white);
  font-weight: 800;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0));
}

.compact-card:hover img {
  opacity: 1;
  transform: scale(1.06);
}

.page-main {
  padding-top: 34px;
  padding-bottom: 64px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 52px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: radial-gradient(circle at 15% 25%, rgba(59, 130, 246, 0.65), transparent 30%), linear-gradient(135deg, var(--slate-900), var(--slate-800));
  box-shadow: var(--shadow-card);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

.category-panel-list {
  display: grid;
  gap: 24px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
}

.multi-filter {
  grid-template-columns: 1fr repeat(4, minmax(140px, 180px));
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  background: var(--white);
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

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

.empty-state {
  margin: 30px 0 0;
  padding: 28px;
  text-align: center;
  border-radius: var(--radius-lg);
  color: var(--slate-500);
  background: var(--slate-100);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 150px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), #7c3aed);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

.rank-thumb img {
  height: 100%;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--slate-600);
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--slate-500);
}

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

.player-card {
  overflow: hidden;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: #000000;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.video-start {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 35px rgba(2, 6, 23, 0.35);
  font-size: 28px;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.video-player.is-playing .video-start {
  opacity: 0;
  pointer-events: none;
}

.video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  transition: opacity 0.2s ease;
}

.video-player:hover .video-controls,
.video-player:focus-within .video-controls {
  opacity: 1;
}

.video-controls button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  padding: 8px 13px;
  cursor: pointer;
}

.detail-text {
  padding: 26px;
}

.detail-text h1 {
  margin: 12px 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.detail-meta {
  font-size: 14px;
}

.lead-text {
  color: var(--slate-600);
  font-size: 18px;
  line-height: 1.75;
}

.detail-tags {
  margin-top: 16px;
}

.story-card {
  margin-top: 24px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.story-card h2:not(:first-child) {
  margin-top: 28px;
}

.story-card p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.9;
  font-size: 17px;
}

.detail-sidebar {
  display: grid;
  gap: 20px;
}

.poster-card {
  overflow: hidden;
  padding: 16px;
}

.poster-card img {
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.poster-card .primary-button {
  width: 100%;
  margin-top: 14px;
}

.side-card {
  padding: 22px;
}

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

.side-card dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--slate-500);
}

.side-card dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 700;
}

.related-section {
  padding: 0;
  margin-top: 48px;
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
}

.footer-logo {
  color: var(--white);
  font-size: 21px;
}

.footer-brand p {
  max-width: 620px;
  color: #94a3b8;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 20px;
  text-align: center;
  color: #94a3b8;
}

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

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

  .detail-sidebar {
    grid-template-columns: minmax(0, 280px) 1fr;
  }

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

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

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
    background: var(--slate-900);
  }

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

  .nav-link {
    padding: 13px 14px;
  }

  .hero {
    height: 66vh;
    min-height: 470px;
  }

  .hero-content {
    bottom: 58px;
  }

  .hero-arrow {
    display: none;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
    margin: 22px 20px 44px;
  }

  .stat-strip div {
    border-right: 0;
  }

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

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

  .rank-item {
    grid-template-columns: 52px 112px 1fr;
  }

  .rank-item .ghost-button {
    grid-column: 2 / -1;
    width: max-content;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .content-section,
  .page-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-content {
    width: calc(100% - 28px);
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .stat-strip,
  .movie-grid,
  .category-grid,
  .featured-grid,
  .compact-grid,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .soft-panel,
  .showcase-row,
  .category-panel,
  .filter-panel,
  .story-card,
  .page-hero {
    padding: 22px;
  }

  .section-heading,
  .showcase-title,
  .category-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 48px 1fr;
  }

  .rank-thumb {
    grid-column: 1 / -1;
  }

  .detail-text {
    padding: 20px;
  }
}
