:root {
  --color-blue: #2563eb;
  --color-blue-dark: #1d4ed8;
  --color-cyan: #0891b2;
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-white: #ffffff;
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.1);
  --shadow-hover: 0 24px 55px rgba(37, 99, 235, 0.18);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --header-height: 74px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.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.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.nav-wrap {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: #2563eb;
  background: #eff6ff;
}

.nav-search {
  display: flex;
  align-items: center;
  width: 310px;
  padding: 4px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.nav-search input,
.mobile-search input,
.filter-input,
.sort-select {
  border: 0;
  outline: none;
  color: #0f172a;
}

.nav-search input {
  min-width: 0;
  flex: 1;
  padding: 9px 12px;
  background: transparent;
}

.nav-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.section-more,
.category-card-link {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-search button,
.mobile-search button,
.primary-button,
.category-card-link {
  color: #ffffff;
  background: #2563eb;
}

.nav-search button {
  padding: 9px 16px;
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.category-card-link:hover {
  background: #1d4ed8;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #2563eb;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 4px;
}

.mobile-search input,
.filter-input,
.sort-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #ffffff;
}

.mobile-search button {
  padding: 0 18px;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b 50%, #334155);
}

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

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1e293b 45%, #334155);
}

.hero-bg.image-failed {
  opacity: 0;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 18%, rgba(37, 99, 235, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.58) 46%, rgba(15, 23, 42, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-text {
  width: min(680px, 92vw);
  color: #ffffff;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-tags span,
.hero-tags a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-tags a:first-child {
  background: #2563eb;
}

.hero-text h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-text p {
  width: min(620px, 90vw);
  margin: 0 0 32px;
  color: #e2e8f0;
  font-size: clamp(18px, 2.3vw, 26px);
  line-height: 1.55;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  min-height: 52px;
}

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

.secondary-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.content-section {
  padding: 72px 0;
}

.content-section:nth-of-type(even) {
  background: #ffffff;
}

.section-head,
.page-head,
.detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 12px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 20px;
  font-weight: 800;
}

.section-head h2,
.page-head h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.page-head p,
.detail-title p {
  max-width: 720px;
  margin: 8px 0 0;
  color: #64748b;
  font-size: 17px;
  line-height: 1.7;
}

.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  color: #2563eb;
  background: #eff6ff;
  white-space: nowrap;
}

.section-more:hover {
  color: #ffffff;
  background: #2563eb;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #334155);
}

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

.poster-link img.image-failed {
  opacity: 0;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  line-height: 1;
}

.year-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 13px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.32);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #2563eb;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #64748b;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #2563eb;
  background: linear-gradient(90deg, #eff6ff, #ecfeff);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.category-card h2 {
  margin: 0;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.category-card-link {
  justify-self: start;
  padding: 10px 16px;
}

.page-hero {
  padding: 70px 0 50px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.35), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e293b 50%, #334155);
}

.page-hero .page-head {
  margin-bottom: 0;
}

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

.page-hero p {
  color: #cbd5e1;
}

.tool-bar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.detail-wrap {
  padding: 24px 0 72px;
}

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

.panel {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.player-panel {
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.82));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
  font-size: 32px;
  line-height: 1;
}

.player-overlay strong {
  max-width: min(680px, 80vw);
  font-size: clamp(22px, 3.2vw, 38px);
  line-height: 1.2;
  text-align: center;
}

.player-overlay em {
  color: #cbd5e1;
  font-style: normal;
}

.detail-card {
  padding: 28px;
}

.detail-title h1 {
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.info-item {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.info-item span {
  display: block;
  margin-top: 4px;
  color: #0f172a;
}

.detail-card h2,
.side-panel h2,
.related-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.detail-card p {
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.9;
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.side-panel {
  padding: 22px;
}

.side-poster {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-poster img.image-failed {
  opacity: 0;
}

.side-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
}

.side-list strong {
  color: #0f172a;
  text-align: right;
}

.related-section {
  margin-top: 28px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 180px) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 24px;
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.rank-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.rank-thumb img.image-failed {
  opacity: 0;
}

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

.rank-copy p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  font-weight: 800;
  white-space: nowrap;
}

.rank-action:hover {
  color: #ffffff;
  background: #2563eb;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 28px;
  padding: 48px 0;
}

.footer-logo {
  color: #ffffff;
}

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

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

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

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

.hide-card {
  display: none !important;
}

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

  .mobile-menu-button {
    display: inline-flex;
    justify-content: center;
    margin-left: auto;
  }

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

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-slider {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-text p {
    font-size: 17px;
  }

  .content-section {
    padding: 48px 0;
  }

  .section-head,
  .page-head,
  .detail-head {
    display: block;
  }

  .section-more {
    margin-top: 18px;
  }

  .movie-grid,
  .category-grid,
  .related-section .movie-grid {
    grid-template-columns: 1fr;
  }

  .tool-bar {
    grid-template-columns: 1fr;
  }

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

  .detail-card {
    padding: 22px;
  }

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

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

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