:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-900: #0c4a6e;
  --mist-50: #f8fafc;
  --mist-100: #f1f5f9;
  --mist-200: #e2e8f0;
  --mist-300: #cbd5e1;
  --mist-400: #94a3b8;
  --mist-500: #64748b;
  --mist-600: #475569;
  --mist-700: #334155;
  --mist-800: #1e293b;
  --mist-900: #0f172a;
  --white: #ffffff;
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.10), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 20px 35px rgba(15, 23, 42, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--mist-900);
  background: var(--mist-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, var(--primary-50), var(--mist-200));
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--mist-200);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.site-header-inner {
  max-width: var(--max-width);
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mist-900);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.32);
}

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--mist-700);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.top-search,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.hero-search input {
  width: 245px;
  border: 1px solid var(--mist-300);
  border-radius: 14px;
  padding: 10px 14px;
  outline: none;
  color: var(--mist-900);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.top-search button,
.mobile-search button {
  border: 0;
  border-radius: 14px;
  padding: 10px 15px;
  color: var(--white);
  background: var(--primary-600);
  cursor: pointer;
  transition: background 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover {
  background: var(--primary-700);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--mist-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--mist-700);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--mist-200);
  padding: 14px 20px 18px;
  background: var(--white);
}

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

.mobile-nav nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

main {
  min-height: 60vh;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: var(--mist-900);
}

.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;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 36%, rgba(56, 189, 248, 0.28), transparent 36%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.20) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.82) 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 40px));
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 142px 20px 130px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary-100);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-desc {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.hero-tags span {
  padding: 7px 12px;
  color: var(--primary-100);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions,
.feature-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

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

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

.btn-glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-outline {
  color: var(--primary-700);
  background: var(--white);
  border-color: var(--primary-100);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.54);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(15, 23, 42, 0.78);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 20px;
}

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

.section-head h2 {
  margin: 0;
  color: var(--mist-900);
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--mist-600);
  max-width: 690px;
}

.section-link {
  color: var(--primary-700);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--mist-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.70), transparent 62%);
  transition: opacity 0.25s ease;
}

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

.play-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28);
}

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

.movie-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.movie-card h2 a:hover {
  color: var(--primary-700);
}

.movie-meta {
  margin: 8px 0 0;
  color: var(--mist-500);
  font-size: 13px;
}

.movie-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin: 10px 0 0;
  color: var(--mist-600);
  font-size: 14px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  color: var(--mist-600);
  background: var(--mist-100);
}

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

.category-tile,
.category-card-large {
  border: 1px solid var(--mist-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
  min-height: 180px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  border-color: var(--primary-100);
  box-shadow: var(--shadow-xl);
}

.category-tile span,
.category-card-kicker {
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--mist-900);
  font-size: 22px;
}

.category-tile em {
  color: var(--mist-600);
  font-size: 14px;
  font-style: normal;
}

.feature-band {
  max-width: calc(var(--max-width) - 40px);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  border-radius: 30px;
  color: var(--white);
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.35), transparent 34%),
    linear-gradient(135deg, var(--mist-900), #082f49);
  box-shadow: var(--shadow-xl);
}

.feature-copy {
  padding: 24px 10px;
}

.feature-copy h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.feature-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
}

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

.feature-stack .movie-card {
  background: rgba(255, 255, 255, 0.94);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.32), transparent 26%),
    linear-gradient(135deg, var(--mist-900), #082f49 72%, var(--primary-900));
}

.page-hero > div {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 20px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.small-hero > div {
  padding-top: 58px;
  padding-bottom: 58px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.toolbar-title {
  color: var(--mist-900);
  font-size: 22px;
  font-weight: 850;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sort-button {
  border: 1px solid var(--mist-200);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--mist-700);
  background: var(--white);
  cursor: pointer;
}

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

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

.category-card-large {
  padding: 26px;
}

.category-card-large h2 {
  margin: 8px 0 10px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.category-card-large p {
  margin: 0;
  color: var(--mist-600);
}

.category-card-large ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.category-card-large li a {
  color: var(--mist-700);
  font-weight: 650;
}

.category-card-large li a:hover {
  color: var(--primary-700);
}

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

.library-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.library-index li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--mist-200);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.library-index a {
  color: var(--mist-900);
  font-weight: 750;
}

.library-index a:hover {
  color: var(--primary-700);
}

.library-index span {
  color: var(--mist-500);
  font-size: 13px;
  white-space: nowrap;
}

.search-hero .hero-search {
  max-width: 660px;
  margin-top: 26px;
}

.hero-search input {
  flex: 1;
  width: auto;
  min-height: 48px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  max-width: none;
  padding: 64px max(20px, calc((100vw - var(--max-width)) / 2));
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--white);
}

.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

.detail-tags {
  margin-top: 22px;
}

.detail-tags span {
  padding: 7px 11px;
  color: var(--primary-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.player-section {
  padding-bottom: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow-xl);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  box-shadow: 0 18px 45px rgba(2, 132, 199, 0.35);
  font-size: 34px;
  transform: translateX(3px);
}

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

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--white);
  background: rgba(220, 38, 38, 0.86);
}

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

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

.detail-text article,
.detail-meta-card {
  border: 1px solid var(--mist-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-text article {
  padding: 30px;
}

.detail-text h2,
.detail-meta-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.detail-text p {
  margin: 0 0 24px;
  color: var(--mist-700);
}

.detail-meta-card {
  align-self: start;
  padding: 26px;
}

.detail-meta-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-meta-card dt {
  color: var(--mist-500);
  font-size: 13px;
  font-weight: 800;
}

.detail-meta-card dd {
  margin: -8px 0 0;
  color: var(--mist-900);
  font-weight: 650;
}

.site-footer {
  margin-top: 40px;
  color: var(--mist-300);
  background: var(--mist-900);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 46px 20px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: var(--white);
}

.footer-brand p {
  max-width: 430px;
  color: var(--mist-400);
}

.footer-block h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
}

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

.footer-block a {
  color: var(--mist-400);
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid var(--mist-800);
  padding: 18px 20px;
  text-align: center;
  color: var(--mist-500);
  font-size: 14px;
}

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

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

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

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

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

  .site-header-inner {
    height: 62px;
  }

  .hero-slider {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 116px;
  }

  .hero-arrow {
    display: none;
  }

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

  .movie-grid,
  .compact-grid,
  .ranking-layout,
  .category-grid,
  .category-page-grid,
  .feature-band,
  .feature-stack,
  .detail-hero,
  .detail-text,
  .footer-inner,
  .library-index {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding-top: 36px;
    padding-bottom: 42px;
  }

  .detail-cover {
    max-width: 420px;
  }

  .footer-block ul {
    columns: 1;
  }
}

@media (max-width: 560px) {
  .site-logo {
    font-size: 15px;
  }

  .hero-slider {
    min-height: 520px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .hero-content,
  .content-section,
  .page-hero > div {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .ranking-layout {
    gap: 16px;
  }

  .hero-actions,
  .feature-actions,
  .detail-actions,
  .hero-search {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-search input {
    width: 100%;
  }

  .library-index li {
    align-items: flex-start;
    flex-direction: column;
  }
}
