:root {
  --primary: #2563eb;
  --primary-light: #60a5fa;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --panel: #ffffff;
  --night: #0f172a;
  --night-soft: #1e293b;
  --radius: 20px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

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

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

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

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(96, 165, 250, 0.2);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  color: inherit;
  background: transparent;
}

.header-search input,
.mobile-search input {
  padding: 11px 14px 11px 18px;
  color: #ffffff;
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #ffffff;
  background: var(--primary);
  padding: 11px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.98);
}

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

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

.mobile-search {
  display: flex;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 640px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.48), transparent 36%), linear-gradient(135deg, #020617 0%, #0f172a 48%, #1e293b 100%);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -20% -10%;
  height: 280px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.26), transparent 64%);
  pointer-events: none;
}

.hero-slider {
  position: relative;
  min-height: 640px;
}

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

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

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

.hero-media img {
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.76) 44%, rgba(15, 23, 42, 0.24) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 56%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  padding: 70px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.32);
}

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

.hero-desc {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}

.hero-meta span,
.detail-meta span,
.badge-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  padding: 7px 12px;
  font-size: 14px;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.34);
}

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

.hero-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.hero-panel img {
  aspect-ratio: 3 / 4;
  height: 480px;
  object-fit: cover;
}

.hero-panel-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  border-radius: 22px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
}

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

.hero-dots button {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #ffffff;
}

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

.section {
  padding: 56px 0;
}

.section.alt {
  width: 100%;
  background: #eaf1fb;
}

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

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

.section-head h2,
.page-hero h1,
.detail-text h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-head p,
.page-hero p,
.category-tile small,
.card-desc,
.detail-summary,
.detail-review,
.breadcrumbs {
  color: var(--muted);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-frame img {
  aspect-ratio: 2 / 3;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.poster-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(8px);
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.card-content {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.card-content strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.card-meta {
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-line span,
.filter-chip,
.rank-index {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 160px;
  border-radius: 26px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #2563eb);
  box-shadow: 0 18px 38px rgba(30, 41, 59, 0.16);
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 86px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: 22px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-index {
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  font-weight: 900;
}

.rank-poster img {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info strong {
  display: block;
  color: var(--ink);
}

.rank-info span,
.rank-info p {
  color: var(--muted);
  font-size: 13px;
}

.page-banner {
  background: linear-gradient(135deg, #0f172a, #1e293b 55%, #2563eb);
  color: #ffffff;
}

.page-hero {
  padding: 58px 0;
}

.page-hero h1 {
  color: #ffffff;
}

.page-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  border-radius: 24px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-input,
.filter-select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
}

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

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

.detail-hero {
  background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.38), transparent 32%), linear-gradient(135deg, #020617, #111827 54%, #1e293b);
  color: #ffffff;
}

.detail-section {
  padding: 42px 0 58px;
}

.breadcrumbs {
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.72);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: start;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.28);
}

.detail-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-text h1 {
  color: #ffffff;
  margin: 0 0 16px;
}

.detail-summary,
.detail-review {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.detail-body {
  display: grid;
  gap: 22px;
}

.detail-card {
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
}

.player-section {
  background: #020617;
  color: #ffffff;
  padding: 56px 0;
}

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

.player-wrap h2 {
  margin: 0 0 20px;
  font-size: clamp(26px, 3vw, 38px);
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  overflow: hidden;
}

.player-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.player-cover span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
  font-weight: 900;
}

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

.player-message {
  margin-top: 12px;
  min-height: 22px;
  color: rgba(255, 255, 255, 0.72);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.search-note {
  margin-bottom: 20px;
  color: var(--muted);
}

.site-footer {
  color: rgba(255, 255, 255, 0.72);
  background: #0f172a;
  padding: 44px 0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
}

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

.footer-inner p {
  max-width: 620px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

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

  .hero-content {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .hero-content {
    padding: 56px 0 90px;
  }

  .hero-panel img {
    height: auto;
  }

  .section-head,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

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

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

  .card-content {
    padding: 12px;
  }

  .rank-item {
    grid-template-columns: 46px 72px 1fr;
    gap: 12px;
  }

  .hero h1 {
    letter-spacing: -0.03em;
  }
}
