:root {
  --primary-900: #0b3f6e;
  --primary-800: #0d518e;
  --primary-700: #0965b2;
  --primary-600: #006fc6;
  --primary-50: #eef7ff;
  --accent-500: #14b8a2;
  --accent-300: #5eead4;
  --neutral-950: #020617;
  --neutral-900: #0f172a;
  --neutral-800: #1e293b;
  --neutral-700: #334155;
  --neutral-600: #475569;
  --neutral-500: #64748b;
  --neutral-200: #e2e8f0;
  --neutral-100: #f1f5f9;
  --neutral-50: #f8fafc;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--neutral-900);
  background: var(--neutral-50);
  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: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--primary-900);
  background: linear-gradient(135deg, var(--accent-300), var(--white));
  box-shadow: 0 8px 20px rgba(20, 184, 162, 0.35);
  font-size: 14px;
}

.brand-name {
  font-size: 21px;
}

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

.nav-link,
.mobile-link {
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.9);
}

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

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

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

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

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

.mobile-link {
  display: block;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-link.is-active,
.mobile-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-section {
  padding: 30px 0 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(20, 184, 162, 0.16), transparent 28%),
    linear-gradient(180deg, #eaf6ff, var(--neutral-50));
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 24px;
  background: var(--neutral-900);
  box-shadow: var(--shadow);
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.55s ease;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  min-height: 560px;
  color: var(--white);
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.5) 46%, rgba(2, 6, 23, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 560px;
  width: min(760px, 100%);
  padding: 64px;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--primary-900);
  background: var(--accent-300);
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-meta span,
.detail-chip,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-meta span {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  font-size: 14px;
}

.hero-actions,
.section-head,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 12px 20px;
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 12px 26px rgba(0, 111, 198, 0.3);
}

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

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

.secondary-button {
  padding: 11px 18px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.text-button {
  color: var(--primary-600);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-shell:hover .hero-control {
  opacity: 1;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

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

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

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

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

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

.main-section {
  padding: 44px 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title h2,
.section-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--neutral-900);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
}

.section-title p,
.detail-title p,
.category-card p,
.footer-grid p {
  margin: 8px 0 0;
  color: var(--neutral-600);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.category-card,
.info-card,
.rank-item,
.player-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.movie-card {
  display: block;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--neutral-200), var(--neutral-100));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), transparent 58%);
  transition: opacity 0.2s ease;
}

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

.card-category,
.card-duration,
.card-play,
.card-rating {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.card-category {
  left: 10px;
  top: 10px;
  padding: 4px 9px;
  background: var(--accent-500);
}

.card-duration {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.76);
}

.card-play {
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.card-body strong {
  min-height: 44px;
  color: var(--neutral-900);
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta,
.card-desc,
.card-foot {
  color: var(--neutral-600);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-foot span:first-child {
  color: #ca8a04;
  font-weight: 800;
}

.movie-card.compact .card-desc {
  display: none;
}

.movie-card.compact .card-body strong {
  min-height: 40px;
}

.category-card {
  display: grid;
  min-height: 170px;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  color: var(--primary-900);
  font-size: 21px;
}

.category-card span {
  align-self: end;
  color: var(--primary-600);
  font-weight: 800;
}

.tool-panel {
  display: grid;
  gap: 16px;
  margin: 24px 0 28px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--neutral-700);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  outline: none;
  color: var(--neutral-900);
  background: var(--neutral-50);
}

.search-box input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(0, 111, 198, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-button:hover,
.filter-button.is-active {
  color: var(--white);
  background: var(--primary-600);
}

.empty-state {
  display: none;
  padding: 40px 0;
  color: var(--neutral-500);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 160px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--neutral-100);
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: var(--neutral-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-score {
  color: #ca8a04;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--neutral-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-600);
  font-weight: 700;
}

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

.player-card {
  padding: 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  color: var(--primary-900);
  background: var(--white);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  font-size: 24px;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: calc(100% - 32px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.detail-title {
  margin: 20px 0 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-chip,
.tag-pill {
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
}

.detail-chip {
  color: var(--primary-900);
  background: var(--primary-50);
}

.info-card {
  padding: 22px;
  margin-bottom: 20px;
}

.info-card h2 {
  margin: 0 0 12px;
  color: var(--neutral-900);
}

.info-card p {
  margin: 0;
  color: var(--neutral-700);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tag-pill {
  color: var(--neutral-700);
  background: var(--neutral-100);
}

.sidebar {
  position: sticky;
  top: 88px;
}

.sidebar h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.sidebar .movie-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.site-footer {
  margin-top: 42px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--neutral-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 30px;
  padding: 46px 0 34px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 16px;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: var(--accent-300);
}

.footer-brand {
  color: var(--white);
  font-size: 18px;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
}

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

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

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

  .sidebar {
    position: static;
  }

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

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

  .menu-button {
    display: block;
  }

  .hero-shell,
  .hero-slide,
  .hero-content {
    min-height: 480px;
  }

  .hero-content {
    padding: 34px 24px 54px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-control {
    opacity: 1;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 120px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }

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

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

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

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

  .rank-thumb {
    display: none;
  }

  .rank-score {
    grid-column: 2;
  }

  .brand-name {
    font-size: 18px;
  }
}
