:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --accent-soft: #cffafe;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

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

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

.nav-link,
.mobile-link {
  position: relative;
  padding: 10px 16px;
  color: #334155;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

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

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: #f1f5f9;
  border: 0;
  border-radius: 14px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #0f172a;
  border-radius: 999px;
}

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

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

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #0891b2 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
  isolation: isolate;
}

.hero-slide.is-active {
  display: block;
}

.hero-backdrop {
  position: absolute;
  inset: -24px;
  z-index: -2;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.52), rgba(14, 165, 233, 0.22)), var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 12% 12%, rgba(59, 130, 246, 0.42), transparent 34%), linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, 0.94));
}

.hero-content {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  align-items: center;
  gap: 64px;
  padding: 72px 0 96px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #93c5fd;
}

.hero h1,
.hero-site-title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.08em;
  font-weight: 950;
}

.hero h2 {
  margin: 18px 0 0;
  color: #bfdbfe;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 900;
}

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

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  color: #1e40af;
  background: #dbeafe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn.soft {
  color: #075985;
  background: #ecfeff;
}

.btn.full {
  width: 100%;
  margin-top: 18px;
}

.hero-search {
  display: flex;
  max-width: 560px;
  margin-top: 30px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 0 18px;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
}

.hero-search input::placeholder {
  color: #bfdbfe;
}

.hero-search button {
  min-width: 92px;
  height: 42px;
  color: #0f172a;
  background: #ffffff;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.hero-poster {
  position: relative;
  display: block;
  padding: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
}

.hero-poster span {
  position: absolute;
  right: 28px;
  bottom: 28px;
  padding: 8px 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
  border: 0;
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.section {
  padding: 82px 0;
}

.section-muted {
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

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

.section-head.compact {
  margin-bottom: 22px;
}

.section-head h2,
.focus-panel h2,
.detail-article h2,
.related-sidebar h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head a,
.text-link {
  color: var(--primary);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-type {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
}

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

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

.tag-row span {
  color: #075985;
  background: #ecfeff;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 22px;
  color: #ffffff;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.92)), var(--category-image);
  background-position: center;
  background-size: cover;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.category-card span {
  font-size: 22px;
  font-weight: 950;
}

.category-card strong {
  margin-top: 8px;
  color: #dbeafe;
  font-size: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 14px;
  font-weight: 950;
}

.rank-row img {
  width: 78px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #0f172a;
}

.rank-info em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.focus-panel {
  padding: 32px;
  background: linear-gradient(135deg, #ffffff, #dbeafe);
  border: 1px solid rgba(191, 219, 254, 0.82);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.focus-panel p {
  margin: 16px 0 24px;
  color: var(--muted);
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.horizontal-card {
  scroll-snap-align: start;
}

.page-hero,
.detail-top {
  color: #ffffff;
  background: linear-gradient(135deg, #1e3a8a, #2563eb 50%, #06b6d4);
}

.page-hero .container {
  padding: 70px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.06em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
}

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

.breadcrumb span::before,
.breadcrumb a + a::before,
.breadcrumb a + span::before {
  content: "/";
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.48);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.category-thumb-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-thumb-stack img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.detail-top .container {
  padding: 32px 0 74px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.watch-panel,
.detail-info-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(18px);
}

.watch-panel {
  padding: 14px;
}

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

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
  z-index: 1;
}

.player-cover-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 16px;
  color: #ffffff;
  text-align: center;
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78)), var(--player-image);
  background-position: center;
  background-size: cover;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-button {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  font-size: 34px;
  font-weight: 900;
}

.player-title {
  max-width: 80%;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.68);
  border-radius: 999px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.detail-info-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.detail-info-card img {
  width: 160px;
  height: 230px;
  object-fit: cover;
  border-radius: 18px;
}

.detail-info-card h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.18;
}

.detail-one-line {
  margin: 0 0 14px;
  color: #dbeafe;
}

.detail-meta {
  margin: 0 0 14px;
}

.detail-tags {
  margin: 12px 0 0;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.detail-article,
.related-sidebar {
  padding: 30px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.detail-article h2,
.related-sidebar h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.detail-article h2:not(:first-child) {
  margin-top: 34px;
}

.detail-article p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  color: #0f172a;
}

.related-sidebar {
  position: sticky;
  top: 96px;
}

.related-list {
  display: grid;
  gap: 12px;
}

.large-rank-list {
  margin-top: 34px;
}

.site-footer {
  color: #e2e8f0;
  background: linear-gradient(135deg, #020617, #0f172a 48%, #172554);
}

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

.site-footer p {
  margin: 14px 0 0;
  color: #cbd5e1;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #bfdbfe;
  font-size: 17px;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #67e8f9;
}

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

[hidden] {
  display: none !important;
}

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

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

  .hero-content,
  .detail-grid,
  .detail-content-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 360px;
  }

  .related-sidebar {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .header-inner {
    height: 66px;
  }

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

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

  .hero-slide {
    position: relative;
  }

  .hero-slide:not(.is-active) {
    display: none;
  }

  .hero-content {
    gap: 32px;
    padding: 54px 0 86px;
  }

  .hero-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 46px;
  }

  .hero-search button {
    width: 100%;
  }

  .section {
    padding: 54px 0;
  }

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

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

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

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

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

  .detail-info-card img {
    width: 150px;
    height: 210px;
  }

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

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

  .rank-row img {
    width: 64px;
    height: 52px;
  }
}
