:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --orange: #f97316;
  --red: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-800: #1f2937;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand {
  font-size: 24px;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  font-size: 16px;
}

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

.nav-link,
.dropdown-button {
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 700;
}

.nav-link:hover,
.dropdown-button:hover,
.nav-link.active {
  color: #cffafe;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 190px;
  padding: 8px;
  color: var(--gray-800);
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.dropdown-panel a:hover {
  color: var(--cyan-dark);
  background: #ecfeff;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 280px;
}

.header-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--white);
  padding: 10px 88px 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.mobile-search button {
  position: absolute;
  right: 5px;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
}

.mobile-panel {
  padding: 12px 20px 18px;
  background: rgba(30, 64, 175, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

.mobile-search {
  position: relative;
  margin-bottom: 10px;
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.06));
  z-index: 0;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 88px 20px 96px;
  color: var(--white);
}

.hero-panel {
  max-width: 680px;
}

.hero-badge,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

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

.button-primary,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

.button-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

.button-secondary {
  color: var(--gray-800);
  background: var(--white);
}

.button-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.hero-dots {
  position: absolute;
  z-index: 5;
  right: 40px;
  bottom: 36px;
  display: flex;
  gap: 9px;
}

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

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

.section {
  padding: 64px 20px;
}

.section.soft-blue {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section.soft-orange {
  background: linear-gradient(135deg, #fff7ed, #fefce8);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
}

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

.section-title {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--gray-500);
}

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

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

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

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

.movie-card,
.category-card,
.info-card,
.rank-row {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.movie-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #155e75);
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent);
}

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 900;
}

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

.movie-meta {
  color: var(--cyan-dark);
  font-size: 13px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  color: var(--gray-800);
}

.movie-card h3 a:hover {
  color: var(--cyan-dark);
}

.movie-card p {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.category-card {
  position: relative;
  padding: 24px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(14, 165, 233, 0.12);
  transition: 0.24s ease;
}

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

.category-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--gray-500);
}

.category-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-mini-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  padding: 64px 20px;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.32), transparent 32%),
    linear-gradient(135deg, #1d4ed8, #0891b2 55%, #0f172a);
}

.page-hero h1 {
  margin: 14px 0 12px;
  max-width: 900px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

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

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--gray-700);
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--gray-200);
  outline: 0;
  border-radius: 999px;
  padding: 11px 14px;
  color: var(--gray-800);
  background: var(--gray-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.empty-state {
  display: none;
  margin-top: 22px;
  padding: 28px;
  text-align: center;
  color: var(--gray-500);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}

.empty-state.show {
  display: block;
}

.rank-panel {
  display: grid;
  gap: 10px;
}

.rank-small-item,
.rank-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  transition: 0.2s ease;
}

.rank-small-item {
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.rank-small-item:hover,
.rank-row:hover {
  transform: translateX(4px);
  color: var(--cyan-dark);
}

.rank-number {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
}

.rank-title {
  font-weight: 900;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-year {
  color: var(--gray-500);
  font-weight: 800;
}

.detail-wrap {
  padding: 34px 20px 68px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.16));
  transition: opacity 0.22s ease;
}

.play-overlay button {
  pointer-events: auto;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
  font-size: 32px;
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.32);
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--soft-shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gray-500);
  font-weight: 800;
}

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

.detail-card h1 {
  margin: 12px 0 14px;
  color: var(--gray-800);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-card .detail-meta span {
  color: var(--gray-700);
  background: var(--gray-100);
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: var(--gray-800);
  font-size: 26px;
}

.detail-section p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

.side-card {
  padding: 22px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--soft-shadow);
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 108px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #155e75);
}

.side-item strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.25;
}

.side-item span {
  color: var(--gray-500);
  font-size: 13px;
}

.search-results {
  margin-top: 26px;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 20px 34px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

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

.site-footer p {
  max-width: 460px;
  color: #94a3b8;
}

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

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

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #22d3ee;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 18px 20px;
  text-align: center;
  color: #94a3b8;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--cyan);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  font-weight: 900;
}

.back-to-top.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

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

  .side-card {
    order: 2;
  }
}

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

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

  .header-inner {
    gap: 12px;
  }

  .hero {
    min-height: 620px;
  }

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

  .hero-dots {
    right: 20px;
    bottom: 20px;
  }

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

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

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

@media (max-width: 620px) {
  .brand {
    font-size: 20px;
  }

  .section {
    padding: 44px 16px;
  }

  .page-hero {
    padding: 44px 16px;
  }

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

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

  .rank-small-item,
  .rank-row {
    grid-template-columns: 48px 1fr;
  }

  .rank-year {
    display: none;
  }

  .side-item {
    grid-template-columns: 96px 1fr;
  }

  .side-item img {
    width: 96px;
    height: 64px;
  }

  .detail-card {
    padding: 22px;
  }
}

.search-large {
  display: block;
  width: min(680px, 100%);
}

.search-large input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 16px 20px;
  border-radius: 999px;
  color: var(--gray-800);
  background: var(--white);
  box-shadow: var(--shadow);
}

.category-preview + .category-preview {
  margin-top: 56px;
}
