:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(59, 130, 246, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 18%, rgba(34, 211, 238, 0.15), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.88), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

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

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

.logo {
  min-width: max-content;
  font-size: 24px;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.38);
}

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

.desktop-nav a,
.mobile-panel a {
  color: #cbd5e1;
  border-radius: 10px;
  transition: 0.2s ease;
}

.desktop-nav a {
  padding: 9px 11px;
  font-size: 14px;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: white;
  background: rgba(37, 99, 235, 0.35);
}

.search-form {
  position: relative;
  width: 270px;
}

.search-form input,
.filter-panel input,
.filter-panel select,
.hero-search input {
  width: 100%;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(59, 130, 246, 0.36);
  outline: none;
  border-radius: 12px;
  transition: 0.2s ease;
}

.search-form input {
  padding: 10px 14px 10px 38px;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.hero-search input:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.menu-toggle {
  display: none;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 10px;
  padding: 8px 10px;
}

.mobile-panel {
  display: none;
  padding: 14px 20px 18px;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid rgba(59, 130, 246, 0.18);
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mobile-panel a {
  padding: 10px 12px;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(2, 6, 23, 0.9));
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 38%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.4) 46%, transparent 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
}

.pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: white;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.26);
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button,
.hero-search button {
  color: white;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.3);
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
}

.primary-button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.42);
}

.primary-button.inline {
  width: max-content;
}

.ghost-button {
  min-height: 46px;
  padding: 0 18px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.26);
}

.ghost-button:hover {
  color: white;
  background: rgba(30, 64, 175, 0.55);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  color: white;
  font-size: 36px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: white;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

.home-shell {
  padding-top: 48px;
}

.content-section {
  margin-bottom: 66px;
}

.intro-panel,
.page-hero,
.filter-panel,
.detail-card,
.side-card,
.prose-card {
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  align-items: center;
  gap: 28px;
  padding: 30px;
}

.intro-panel h2,
.page-hero h1,
.section-heading h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.intro-panel h2,
.page-hero h1 {
  margin-top: 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.intro-panel p,
.page-hero p,
.section-heading p,
.prose-card p {
  color: var(--soft);
  line-height: 1.8;
}

.hero-search {
  display: flex;
  gap: 10px;
}

.hero-search input {
  min-height: 48px;
  padding: 0 16px;
}

.hero-search button {
  min-width: 96px;
  border: 0;
  padding: 0 20px;
}

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

.section-heading h2 {
  font-size: 28px;
}

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

.section-more {
  color: #60a5fa;
  font-weight: 800;
  transition: 0.2s ease;
}

.section-more:hover {
  color: #93c5fd;
}

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

.compact-grid {
  gap: 20px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 22px 54px rgba(14, 165, 233, 0.16);
}

.poster-link {
  position: relative;
  display: block;
}

.poster-frame {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(2, 6, 23, 0.94));
}

.poster-frame img,
.rank-cover img,
.side-poster img,
.category-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-frame img,
.category-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.card-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  color: white;
  background: rgba(37, 99, 235, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.card-content h3 a:hover,
.rank-item h3 a:hover,
.side-card a:hover {
  color: #93c5fd;
}

.card-content p,
.rank-item p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta-row span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  font-size: 12px;
  padding: 3px 9px;
}

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

.tag-row span {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
}

.movie-card.wide .poster-frame {
  aspect-ratio: 16 / 10;
}

.movie-card.mini .card-content p {
  -webkit-line-clamp: 1;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 82px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(34, 211, 238, 0.42);
  transform: translateY(-3px);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  border-radius: 11px;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.rank-cover {
  display: block;
  width: 82px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.rank-item h3 {
  margin: 0 0 7px;
  font-size: 17px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 36px;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -65% auto;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 65%);
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border-radius: 22px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-card img,
.category-gradient {
  position: absolute;
  inset: 0;
}

.category-gradient {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.15));
}

.category-title,
.category-desc {
  position: absolute;
  left: 22px;
  right: 22px;
}

.category-title {
  bottom: 58px;
  font-size: 24px;
  font-weight: 900;
}

.category-desc {
  bottom: 22px;
  color: #cbd5e1;
  line-height: 1.5;
  font-size: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 210px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
}

.empty-state {
  display: none;
  color: var(--muted);
  text-align: center;
  padding: 40px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 18px;
}

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

.detail-shell {
  max-width: 1200px;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
  transition: opacity 0.2s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.42);
  font-size: 30px;
}

.player-status {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 4;
  color: #e2e8f0;
  text-align: center;
  pointer-events: none;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
}

.detail-card h2,
.side-card h2,
.prose-card h2 {
  margin: 28px 0 12px;
  color: white;
  font-size: 22px;
}

.detail-card p,
.side-card dd,
.prose-card p {
  color: var(--soft);
  line-height: 1.9;
}

.lead-text {
  margin: 18px 0;
  font-size: 18px;
}

.detail-tags {
  margin-top: 0;
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.side-card {
  margin-top: 20px;
  padding: 22px;
}

.side-card h2 {
  margin-top: 0;
}

.side-card dl {
  margin: 0;
}

.side-card dt {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.side-card dd {
  margin: 4px 0 0;
}

.prose-card {
  padding: 30px;
}

.site-footer {
  border-top: 1px solid rgba(59, 130, 246, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 14px;
  color: white;
  font-size: 20px;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 16px;
}

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

.site-footer a:hover {
  color: #93c5fd;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 14px;
}

.image-missing {
  opacity: 0;
}

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

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

  .search-form {
    width: min(34vw, 260px);
  }

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

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  .side-card {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 60px;
    padding: 12px 16px;
  }

  .logo {
    font-size: 20px;
  }

  .header-inner > .search-form {
    display: none;
  }

  .mobile-panel .search-form {
    width: 100%;
  }

  .hero-slider {
    height: 520px;
  }

  .hero-content {
    bottom: 66px;
    width: calc(100% - 36px);
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .page-shell {
    padding: 28px 16px 56px;
  }

  .intro-panel,
  .filter-panel,
  .rank-grid,
  .rank-list,
  .footer-bottom,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .hero-search {
    flex-direction: column;
  }

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

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

  .rank-grid {
    padding: 14px;
  }

  .rank-item {
    grid-template-columns: auto 70px minmax(0, 1fr);
  }

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

  .page-hero,
  .detail-card,
  .prose-card {
    padding: 24px;
  }

  .footer-grid {
    padding: 34px 16px;
  }

  .footer-bottom {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .featured-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: auto 66px minmax(0, 1fr);
    gap: 10px;
  }

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