:root {
  --primary: #0073e6;
  --primary-dark: #005ab8;
  --primary-soft: #e8f3ff;
  --accent: #e67300;
  --accent-soft: #fff2e4;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --page: #f6f8fb;
  --night: #080d18;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

img,
video {
  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;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.82);
  backdrop-filter: blur(16px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 115, 230, 0.24);
}

.brand-text {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 22px;
}

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

.desktop-nav a,
.mobile-panel a {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  width: 276px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 8px 12px;
  background: transparent;
  color: var(--ink);
}

.nav-search button,
.btn-primary,
.btn-light,
.section-action,
.filter-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-search button,
.btn-primary,
.section-action {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 115, 230, 0.18);
}

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

.btn-primary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
}

.btn-light {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.nav-search button:hover,
.btn-primary:hover,
.btn-light:hover,
.section-action:hover,
.filter-button:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
}

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

.mobile-panel a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
}

.mobile-panel a:hover,
.mobile-panel a.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 12%, rgba(0, 115, 230, 0.55), transparent 28%), radial-gradient(circle at 82% 24%, rgba(230, 115, 0, 0.38), transparent 30%), var(--night);
  color: #ffffff;
}

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

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

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

.hero-slide .image-shell {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 115, 230, 0.62), rgba(230, 115, 0, 0.32));
}

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(8, 13, 24, 0.96) 0%, rgba(8, 13, 24, 0.72) 42%, rgba(8, 13, 24, 0.12) 100%), linear-gradient(0deg, rgba(8, 13, 24, 0.92), transparent 58%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  min-height: 650px;
  padding: 72px 0 110px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-heading p,
.detail-eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  font-size: clamp(30px, 4.2vw, 54px);
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2.1vw, 20px);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}

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

.hero-controls {
  position: absolute;
  z-index: 5;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-controls button,
.hero-dot {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 22px;
}

.hero-controls button:hover,
.hero-dot.is-active {
  background: rgba(255, 255, 255, 0.3);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

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

.hero-thumb {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.hero-thumb strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-thumb span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

main {
  min-height: 62vh;
}

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

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.section-action {
  flex: 0 0 auto;
  padding: 11px 18px;
}

.category-strip,
.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-pill,
.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  font-weight: 750;
}

.category-pill:hover,
.filter-button.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 115, 230, 0.2), rgba(230, 115, 0, 0.18)), #dce7f5;
}

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

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

.poster-frame figcaption,
.rank-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-frame figcaption {
  right: 10px;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.66);
}

.rank-badge {
  left: 10px;
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.movie-card-body h2,
.movie-card-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin: 0 0 9px;
  color: #111827;
  font-size: 16px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span {
  padding: 4px 7px;
  border-radius: 8px;
  background: #f3f4f6;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.rank-panel,
.category-card,
.info-panel,
.detail-card,
.search-panel {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.rank-panel {
  padding: 22px;
}

.rank-panel h2,
.category-card h2,
.info-panel h2,
.detail-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f5;
}

.rank-item strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.rank-title {
  overflow: hidden;
  color: #111827;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item span:not(.rank-title) {
  color: var(--muted);
  font-size: 13px;
}

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

.category-card {
  padding: 22px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-samples {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.category-samples a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.category-samples strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-samples span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 64px 0 30px;
  background: radial-gradient(circle at top left, rgba(0, 115, 230, 0.12), transparent 34%), radial-gradient(circle at top right, rgba(230, 115, 0, 0.12), transparent 30%);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.toolbar input,
.search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 12px 16px;
  background: #f9fafb;
}

.search-panel {
  margin-bottom: 26px;
  padding: 22px;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel button {
  flex: 0 0 auto;
  padding: 0 22px;
}

.empty-message {
  display: none;
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

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

.detail-hero {
  padding: 42px 0 36px;
  background: radial-gradient(circle at 18% 12%, rgba(0, 115, 230, 0.22), transparent 28%), radial-gradient(circle at 82% 10%, rgba(230, 115, 0, 0.2), transparent 28%), #0d1422;
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: center;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.54));
  color: #ffffff;
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.play-button-core {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.play-button-core span {
  margin-left: 7px;
  font-size: 44px;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-info p {
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumbs {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 40px 0 0;
}

.info-panel,
.detail-card {
  padding: 24px;
}

.info-panel + .info-panel {
  margin-top: 18px;
}

.info-panel p {
  margin: 0;
  color: #374151;
}

.detail-card {
  position: sticky;
  top: 96px;
}

.detail-poster {
  overflow: hidden;
  margin: 0 0 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 115, 230, 0.2), rgba(230, 115, 0, 0.18)), #dce7f5;
}

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

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

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f5;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 750;
  text-align: right;
}

.site-footer {
  margin-top: 72px;
  background: #0b1020;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 28px;
  padding: 42px 0;
}

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

.footer-grid p {
  max-width: 460px;
  margin: 12px 0 0;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

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

  .detail-card {
    position: static;
  }
}

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-rail {
    display: none;
  }

  .hero-controls {
    right: 16px;
    bottom: 22px;
  }

  .section-heading,
  .toolbar,
  .search-panel form,
  .footer-bottom {
    display: block;
  }

  .section-action {
    margin-top: 16px;
  }

  .search-panel button {
    width: 100%;
    margin-top: 12px;
    padding: 12px 22px;
  }

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

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

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

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 34px;
  }

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

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

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

  .rank-item span:not(.rank-title) {
    display: none;
  }

  .detail-hero {
    padding-top: 24px;
  }

  .player-card {
    border-radius: 18px;
  }
}
