:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --secondary-900: #0f172a;
  --secondary-800: #1e293b;
  --accent-50: #ecfdf5;
  --accent-500: #10b981;
  --accent-700: #047857;
  --text-main: #111827;
  --text-soft: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --page: #f9fafb;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.logo-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.125rem;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.25);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.logo-subtitle {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-soft);
  white-space: nowrap;
}

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

.nav-link {
  padding: 0.6rem 0.95rem;
  border-radius: 0.75rem;
  font-weight: 700;
  color: #374151;
  transition: all 0.2s ease;
}

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 13rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.58rem 0.85rem;
  background: #ffffff;
  transition: all 0.2s ease;
}

.header-search input:focus,
.search-box input:focus,
.filter-select:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--primary-500);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
}

.menu-toggle:hover {
  background: #f3f4f6;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
}

.mobile-menu .nav-link {
  display: block;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 5rem 1rem 4rem;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 46rem;
  color: #ffffff;
  animation: fadeIn 0.55s ease-in-out;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 4.2rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-summary {
  margin: 1rem 0 1.4rem;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: #e5e7eb;
  line-height: 1.8;
  max-width: 42rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-tag {
  display: inline-flex;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero-meta {
  color: #d1d5db;
  font-size: 0.95rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.8rem;
  padding: 0.85rem 1.25rem;
  font-weight: 800;
  transition: all 0.25s ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: scale(1.04);
}

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.btn-soft:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.5rem;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: all 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

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

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.25s ease;
}

.hero-dot:hover,
.hero-dot.active {
  width: 2rem;
  background: #ffffff;
}

.section {
  padding: 3rem 1rem;
}

.section-white {
  background: #ffffff;
}

.section-gradient {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 900;
  color: #111827;
}

.section-desc {
  margin-top: 0.45rem;
  color: var(--text-soft);
  line-height: 1.7;
}

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

.more-link:hover {
  color: var(--primary-700);
}

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

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

.movie-card {
  position: relative;
  display: block;
  min-width: 0;
}

.card-cover {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #e5e7eb;
  aspect-ratio: 16 / 9;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.card-cover.portrait {
  aspect-ratio: 2 / 3;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.55s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
}

.play-badge span {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.5rem;
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

.movie-card:hover .play-badge span {
  transform: scale(1);
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0.55rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-badge {
  left: 0.75rem;
  right: auto;
  background: rgba(249, 115, 22, 0.92);
}

.card-body {
  padding: 0.85rem 0.1rem 0;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 900;
  color: #111827;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--primary-600);
}

.card-summary {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  color: var(--primary-700);
  background: var(--primary-50);
  font-weight: 800;
  white-space: nowrap;
}

.horizontal-list {
  display: grid;
  gap: 0.8rem;
}

.horizontal-card {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 1rem;
  transition: all 0.25s ease;
}

.horizontal-card:hover {
  background: #f9fafb;
}

.horizontal-cover {
  width: 11rem;
  min-width: 11rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.8rem;
  background: #e5e7eb;
}

.horizontal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.horizontal-info {
  min-width: 0;
  padding-top: 0.1rem;
}

.horizontal-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 900;
}

.horizontal-summary {
  color: var(--text-soft);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.topic-scroller {
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: none;
}

.topic-scroller::-webkit-scrollbar {
  display: none;
}

.topic-row {
  display: flex;
  gap: 1rem;
}

.topic-row .movie-card {
  width: 20rem;
  flex: 0 0 auto;
}

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

.category-card {
  display: block;
  padding: 1.4rem;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: all 0.25s ease;
}

.category-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.category-card h3 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 900;
}

.category-card p {
  margin: 0.55rem 0 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.page-hero {
  background: linear-gradient(135deg, #0f172a, #082f49 55%, #075985);
  color: #ffffff;
  padding: 4rem 1rem;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: #cbd5e1;
  font-size: 0.92rem;
}

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

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 50rem;
  margin: 1rem 0 0;
  color: #e5e7eb;
  line-height: 1.85;
}

.toolbar {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.search-box {
  flex: 1 1 20rem;
}

.search-box input,
.filter-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.filter-select {
  flex: 0 1 12rem;
}

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

.player-card,
.detail-card,
.side-card {
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 5rem;
  height: 5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-600);
  font-size: 2rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.player-layer:hover .player-button {
  transform: scale(1.05);
}

.detail-body {
  padding: 1.4rem;
}

.detail-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  font-weight: 900;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 1.1rem;
}

.meta-item {
  display: inline-flex;
  padding: 0.35rem 0.68rem;
  border-radius: 0.7rem;
  color: #334155;
  background: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 800;
}

.detail-section {
  margin-top: 1.4rem;
}

.detail-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.detail-section p {
  margin: 0;
  color: #374151;
  line-height: 1.95;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  color: var(--accent-700);
  background: var(--accent-50);
  font-size: 0.86rem;
  font-weight: 800;
}

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

.related-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.related-thumb {
  width: 5.5rem;
  min-width: 5.5rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #e5e7eb;
}

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

.related-title {
  font-weight: 900;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.related-meta {
  margin-top: 0.25rem;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.site-footer {
  background: var(--secondary-900);
  color: #cbd5e1;
  padding: 3rem 1rem 2rem;
}

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

.footer-title {
  margin: 0 0 0.7rem;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
}

.footer-text,
.footer-list a {
  color: #94a3b8;
  line-height: 1.75;
}

.footer-list {
  display: grid;
  gap: 0.45rem;
}

.footer-list a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 0.88rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }

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

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

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

@media (min-width: 768px) {
  .header-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

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

@media (min-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (min-width: 1280px) {
  .movie-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

@media (max-width: 640px) {
  .hero {
    min-height: 64vh;
  }

  .hero-content {
    min-height: 64vh;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

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

  .horizontal-card {
    gap: 0.75rem;
  }

  .horizontal-cover {
    width: 8.5rem;
    min-width: 8.5rem;
  }

  .topic-row .movie-card {
    width: 17rem;
  }

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

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