:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
}

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

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.nav-drop {
  position: relative;
}

.drop-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  width: 210px;
  padding: 10px;
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

.drop-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 650;
}

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

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

.top-search input,
.mobile-search input,
.filter-input,
.filter-select {
  width: 240px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

.top-search button,
.mobile-search button,
.btn,
.player-start {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button {
  height: 42px;
  padding: 0 16px;
  color: var(--blue);
  background: #ffffff;
}

.top-search button:hover,
.mobile-search button:hover,
.btn:hover,
.player-start:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  font-size: 26px;
  background: transparent;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  background: rgba(30, 64, 175, 0.35);
}

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

.mobile-link,
.mobile-cats a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover,
.mobile-cats a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.mobile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding-left: 10px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.35), transparent 32%), linear-gradient(135deg, #1e3a8a 0%, #0369a1 42%, #0f172a 100%);
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.65;
}

.hero::before {
  width: 360px;
  height: 360px;
  right: -120px;
  top: 80px;
  background: rgba(6, 182, 212, 0.35);
}

.hero::after {
  width: 240px;
  height: 240px;
  left: 8%;
  bottom: 80px;
  background: rgba(37, 99, 235, 0.45);
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.1);
}

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.76));
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 42px;
  align-items: center;
  min-height: 680px;
  padding: 72px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 20px 0 18px;
  font-size: clamp(34px, 5.2vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.hero p {
  margin: 0 0 26px;
  font-size: 18px;
  color: #dbeafe;
}

.hero-actions,
.section-head,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(6, 182, 212, 0.22);
}

.btn.light {
  color: var(--blue);
  background: #ffffff;
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-panel {
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.hero-feature {
  display: grid;
  gap: 16px;
}

.hero-feature img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

.hero-feature h2 {
  margin: 0;
  font-size: 24px;
  color: #ffffff;
}

.hero-feature p {
  margin: 0;
  color: #e0f2fe;
  font-size: 15px;
}

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

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

.hero-dot.active {
  background: #ffffff;
}

.section {
  padding: 56px 0;
}

.section.tight {
  padding-top: 26px;
}

.section h2,
.category-card h2,
.site-footer h2,
.detail-main h2,
.sidebar h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
}

.section-lead {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card.large {
  grid-column: span 2;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

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

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

.poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(15, 23, 42, 0.62), transparent 58%);
}

.play-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(12px);
}

.play-badge {
  left: 14px;
  bottom: 14px;
  padding: 7px 12px;
}

.year-badge {
  top: 14px;
  right: 14px;
  padding: 6px 10px;
}

.card-body {
  padding: 17px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 52px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover,
.rank-title:hover,
.breadcrumb a:hover,
.site-footer a:hover {
  color: var(--cyan-dark);
}

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

.card-meta,
.card-tags,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta a,
.card-meta span,
.card-tags span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: var(--shadow-soft);
}

.category-card img {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 170px;
  height: 110px;
  object-fit: cover;
  border-radius: 18px;
  opacity: 0.34;
  transition: transform 0.35s ease;
}

.category-card h2,
.category-card p,
.category-card span {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

.category-card p {
  max-width: 210px;
  color: #e0f2fe;
}

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

.rank-list,
.sidebar-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.rank-row,
.sidebar-row {
  display: grid;
  grid-template-columns: 42px 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-num {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-thumb,
.sidebar-thumb {
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-title {
  display: block;
  color: var(--ink);
  font-weight: 850;
}

.rank-row p,
.sidebar-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 64px 0;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.42), transparent 30%), linear-gradient(135deg, #1e3a8a, #0284c7 50%, #0f172a);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bae6fd;
  font-weight: 700;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
  margin-top: 24px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-input,
.filter-select {
  color: var(--ink);
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px var(--line);
}

.detail-hero {
  padding: 42px 0 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #0369a1);
}

.detail-title {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

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

.detail-title h1 {
  font-size: clamp(32px, 4vw, 54px);
}

.detail-title p {
  max-width: 820px;
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
}

.player-card,
.detail-main,
.sidebar,
.search-panel {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  position: relative;
  margin-bottom: 26px;
  background: #020617;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.88));
  z-index: 3;
}

.player-cover.is-hidden {
  display: none;
}

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(6, 182, 212, 0.36);
  font-size: 18px;
}

.detail-main {
  padding: 26px;
}

.detail-main section + section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.detail-main p {
  margin: 12px 0 0;
  color: #475569;
  font-size: 16px;
}

.sidebar {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.sidebar-row {
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 0;
  box-shadow: none;
  border: 1px solid var(--line);
}

.sidebar-row div {
  padding-right: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: #f8fafc;
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-card strong {
  display: block;
  padding: 12px;
  color: var(--ink);
}

.search-panel {
  padding: 22px;
}

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

.site-footer {
  margin-top: 42px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #1f2937, #0f172a);
}

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

.site-footer h2 {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer p {
  margin: 10px 0 0;
}

.footer-brand .brand-mark {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 30;
}

.back-top.show {
  display: block;
}

@media (max-width: 1024px) {
  .top-search,
  .main-nav {
    display: none;
  }

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

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

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

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

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

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

  .sidebar {
    position: static;
  }
}

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

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 52px 0;
  }

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

  .movie-card.large {
    grid-column: auto;
  }

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

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

  .rank-row {
    grid-template-columns: 38px 82px minmax(0, 1fr);
  }

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