:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --secondary-900: #0f172a;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: #f8fafc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
}

.brand-text small {
  color: var(--text-muted);
  font-size: 12px;
}

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

.nav-link,
.nav-drop-btn {
  border: 0;
  background: transparent;
  font: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: #334155;
  transition: 0.2s ease;
  cursor: pointer;
}

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

.nav-drop {
  position: relative;
}

.nav-drop-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-drop:hover .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-drop-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
}

.nav-drop-menu a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.quick-search-panel input,
.mobile-panel input {
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
  min-width: 230px;
}

.header-search input:focus,
.quick-search-panel input:focus,
.mobile-panel input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.header-search button {
  height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--primary-600);
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.hero-carousel {
  position: relative;
  height: 68vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.25)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 55%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  transform: translateY(-50%);
  width: min(680px, calc(100% - 48px));
  color: #ffffff;
  z-index: 2;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-kicker span {
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  color: #e0f2fe;
  font-size: 14px;
}

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

.hero-content p {
  margin: 0 0 30px;
  color: #cbd5e1;
  font-size: 17px;
  max-width: 760px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions,
.detail-info .btn {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

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

.btn.glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.btn.outline {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn.small {
  min-height: 38px;
  padding: 0 15px;
  color: #ffffff;
  background: var(--primary-600);
  font-size: 14px;
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

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

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

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

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

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.quick-search-panel {
  max-width: 1280px;
  margin: -38px auto 0;
  padding: 22px 24px;
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.quick-search-panel.inner {
  margin-top: 24px;
}

.quick-search-panel strong {
  display: block;
  font-size: 20px;
}

.quick-search-panel p {
  margin: 3px 0 0;
  color: var(--text-muted);
}

.quick-search-panel input {
  min-width: min(420px, 100%);
}

.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.6;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

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

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

.poster-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 42px;
  background: rgba(2, 6, 23, 0.34);
  opacity: 0;
  transition: 0.2s ease;
}

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

.poster-year,
.rank-num {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.76);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.rank-num {
  background: #f97316;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  min-height: 52px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-body p {
  min-height: 48px;
  margin: 8px 0 12px;
  color: var(--text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-row span {
  color: #64748b;
  font-size: 13px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
}

.tag-row.large span {
  padding: 6px 11px;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

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

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

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
}

.movie-card.horizontal .poster {
  aspect-ratio: 16 / 10;
  height: 100%;
}

.movie-card.horizontal .card-title {
  min-height: auto;
}

.category-aside,
.text-panel,
.detail-side,
.category-overview-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-aside {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.category-aside h2 {
  margin: 0 0 8px;
}

.category-aside p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.category-mini-list {
  display: grid;
  gap: 10px;
}

.category-mini-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 13px;
  border-radius: 14px;
  background: #f8fafc;
}

.category-mini-list a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.category-mini-list em {
  font-style: normal;
  color: var(--text-muted);
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  margin-top: 72px;
  font-size: 22px;
  font-weight: 800;
}

.category-tile small {
  color: #e2e8f0;
}

.sub-page {
  padding-bottom: 70px;
}

.sub-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.55), transparent 32%),
    linear-gradient(135deg, #075985, #0f172a 70%);
  color: #ffffff;
}

.sub-hero > div {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 50px 24px;
}

.sub-hero p {
  margin: 0 0 8px;
  color: #bae6fd;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sub-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
}

.sub-hero span {
  color: #cbd5e1;
}

.category-overview-card {
  max-width: 1280px;
  margin: 34px auto 0;
  padding: 24px;
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.category-overview-head h2 {
  margin: 0;
}

.category-overview-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.detail-page {
  padding-bottom: 70px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  filter: blur(2px);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.58)),
    linear-gradient(0deg, #020617, transparent 42%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  color: #ffffff;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.55);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #bae6fd;
  font-size: 14px;
}

.breadcrumbs em {
  color: #e2e8f0;
  font-style: normal;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 780px;
  margin: 18px 0;
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  color: #e0f2fe;
}

.player-section,
.detail-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.34);
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  background: var(--primary-600);
  font-size: 36px;
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.36);
}

.play-overlay.hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.text-panel,
.detail-side {
  padding: 26px;
}

.text-panel h2,
.detail-side h2 {
  margin-top: 0;
}

.text-panel p {
  margin: 0;
  color: #334155;
  font-size: 16px;
}

.detail-side {
  grid-row: span 2;
}

.detail-side dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.detail-side dt {
  color: var(--text-muted);
  font-size: 13px;
}

.detail-side dd {
  margin: 0 0 8px;
  font-weight: 700;
}

.site-footer {
  margin-top: 76px;
  background: var(--secondary-900);
  color: #cbd5e1;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 50px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p {
  color: #94a3b8;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #94a3b8;
  font-size: 14px;
}

[data-card].hidden {
  display: none;
}

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

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

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

  .split-section,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-aside {
    position: static;
  }

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

  .rank-list.full {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    height: 74vh;
    min-height: 560px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-content p {
    -webkit-line-clamp: 3;
  }

  .hero-control {
    display: none;
  }

  .quick-search-panel {
    margin: 18px 16px 0;
    flex-direction: column;
    align-items: stretch;
  }

  .page-section,
  .player-section,
  .detail-content {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-card.horizontal {
    grid-template-columns: 124px minmax(0, 1fr);
  }

  .card-body {
    padding: 13px;
  }

  .card-title {
    min-height: auto;
    font-size: 15px;
  }

  .card-body p {
    min-height: auto;
    -webkit-line-clamp: 2;
  }

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

  .detail-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 30px;
  }

  .detail-poster {
    width: min(240px, 72vw);
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.horizontal {
    grid-template-columns: 1fr;
  }

  .movie-card.horizontal .poster {
    aspect-ratio: 16 / 9;
  }
}
