:root {
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-850: #172033;
  --secondary-900: #0f172a;
  --secondary-950: #080f1f;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-card: 0 18px 50px rgba(2, 8, 23, 0.35);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--secondary-950);
  color: #ffffff;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.25);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-700));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
}

.brand-name {
  font-size: 26px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--text-soft);
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--primary-400);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  cursor: pointer;
  padding: 9px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.92);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
  animation: slideUp 0.32s ease-out;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-soft);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.18);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--secondary-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.18), transparent 34%),
    linear-gradient(90deg, rgba(8, 15, 31, 0.98) 0%, rgba(8, 15, 31, 0.86) 42%, rgba(8, 15, 31, 0.25) 100%),
    linear-gradient(0deg, var(--secondary-950), transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 720px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.1vw, 22px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.9);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.25);
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-soft);
}

.hero-meta span,
.detail-meta span,
.meta-line span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 16px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 42px rgba(2, 132, 199, 0.38);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.76);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 168px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: var(--primary-400);
}

.hero-thumbs {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.hero-thumb {
  min-height: 104px;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.hero-thumb img {
  width: 72px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  font-weight: 700;
  color: #ffffff;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.section-alt {
  background: rgba(15, 23, 42, 0.58);
  border-block: 1px solid rgba(148, 163, 184, 0.08);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title.compact {
  align-items: center;
}

.section-title span {
  display: block;
  color: var(--primary-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-title a {
  color: var(--primary-400);
  font-weight: 700;
}

.search-wrap {
  padding-top: 28px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow-card);
}

.search-panel label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 700;
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 15px;
  outline: none;
  background: rgba(8, 15, 31, 0.9);
  padding: 0 16px;
}

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

.search-panel button {
  align-self: end;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  color: #ffffff;
  background: var(--secondary-700);
  padding: 0 18px;
  cursor: pointer;
}

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

.category-tile,
.category-overview-card a {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--secondary-800);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 58px rgba(2, 8, 23, 0.48);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(8, 15, 31, 0.92), rgba(8, 15, 31, 0.16));
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile span,
.category-tile p,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 12px;
  color: var(--text-soft);
}

.category-tile em {
  font-style: normal;
  color: var(--primary-400);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: var(--secondary-850);
  box-shadow: 0 15px 38px rgba(2, 8, 23, 0.36);
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
  transition: opacity 0.3s ease;
}

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

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

.poster-wrap em {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-600);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-500);
  color: #111827;
  font-size: 14px;
}

.play-hover {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.card-body {
  padding: 12px 2px 0;
}

.card-body h3 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body h3 {
  color: var(--primary-400);
}

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

.meta-line {
  gap: 6px;
  font-size: 12px;
}

.meta-line span {
  padding: 2px 6px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(30, 41, 59, 0.82);
  font-size: 12px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
}

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

.rank-list.wide {
  max-width: 900px;
  margin: 0 auto;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.58);
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.94);
  transform: translateX(4px);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.16);
  color: var(--primary-400);
  font-weight: 900;
}

.rank-item img {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info {
  display: grid;
  gap: 4px;
}

.rank-info strong {
  color: #ffffff;
  font-size: 17px;
}

.rank-info small {
  color: var(--text-muted);
}

.rank-hot {
  color: var(--accent-400);
  font-weight: 900;
}

.page-hero {
  position: relative;
  min-height: 330px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 20% 12%, rgba(56, 189, 248, 0.18), transparent 28%),
    linear-gradient(135deg, var(--secondary-900), var(--secondary-950));
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  filter: blur(10px);
}

.small-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  max-width: 840px;
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  color: var(--text-soft);
  font-size: 18px;
}

.category-overview-card a {
  min-height: auto;
  padding: 0;
  overflow: hidden;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
}

.category-collage img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-body {
  padding: 20px;
}

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

.category-overview-body p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--text-soft);
}

.category-overview-body span {
  color: var(--primary-400);
  font-weight: 800;
}

.detail-top {
  padding: 56px 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.18), transparent 34%),
    linear-gradient(135deg, var(--secondary-900), var(--secondary-950));
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-400);
}

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 850px;
  color: var(--text-soft);
  font-size: 20px;
}

.detail-tags {
  margin: 20px 0 26px;
}

.player-section {
  padding: 44px 0 20px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.player-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.94);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.36);
  font-size: 32px;
}

.play-overlay strong {
  font-size: clamp(24px, 3vw, 40px);
}

.play-overlay em {
  font-style: normal;
  color: var(--text-soft);
}

.detail-content {
  padding: 36px 0 12px;
}

.detail-content h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

.detail-content p {
  color: var(--text-soft);
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.info-table div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.58);
}

.info-table span,
.info-table strong {
  display: block;
}

.info-table span {
  color: var(--text-muted);
  font-size: 13px;
}

.info-table strong {
  margin-top: 6px;
  color: #ffffff;
}

.searchable-card.is-hidden {
  display: none;
}

@keyframes slideUp {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

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

  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-thumb:nth-child(n + 4) {
    display: none;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 680px;
  }

  .hero-content {
    padding-top: 60px;
    justify-content: flex-start;
  }

  .hero-controls {
    bottom: 138px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
  }

  .hero-thumb:nth-child(n + 2) {
    display: none;
  }

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

  .detail-poster {
    max-width: 280px;
  }

  .info-table {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .brand-name {
    font-size: 22px;
  }

  .container,
  .nav-wrap,
  .mobile-nav,
  .small-hero > div,
  .hero-content,
  .hero-controls,
  .hero-thumbs {
    width: min(100% - 24px, 1180px);
  }

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

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

  .category-grid,
  .overview-grid,
  .movie-grid,
  .movie-grid.tight {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

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

  .rank-item img {
    width: 58px;
    height: 76px;
  }

  .rank-hot {
    display: none;
  }

  .detail-top {
    padding: 32px 0;
  }

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

  .play-circle {
    width: 68px;
    height: 68px;
  }
}
