:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(59, 130, 246, 0.26);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --gold: #fbbf24;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 36rem),
    linear-gradient(135deg, #020617 0%, #0f172a 42%, #06153c 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(30, 64, 175, 0.9), rgba(2, 6, 23, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.3);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 13px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.22);
}

.brand-text,
.footer-brand {
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #dbeafe;
  font-weight: 650;
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--cyan);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
  width: 240px;
}

.nav-search input,
.mobile-search input,
.wide-search input,
.filter-panel input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.nav-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-panel input:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 130;
  display: none;
  width: min(420px, 86vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  color: var(--subtle);
}

.search-result-item:hover {
  background: rgba(34, 211, 238, 0.08);
  color: var(--text);
}

.search-result-item img {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #0f172a;
}

.search-result-item strong {
  display: block;
  color: var(--text);
}

.search-result-item span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #e0f2fe;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(59, 130, 246, 0.24);
}

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

.mobile-search {
  position: relative;
}

.page-main {
  padding: 32px 0 64px;
}

.hero {
  position: relative;
  height: min(680px, calc(100vh - 110px));
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 30px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 55%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 74px);
  right: clamp(20px, 12vw, 440px);
  bottom: clamp(36px, 10vh, 92px);
}

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

.hero-tags span,
.card-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span:nth-child(2) {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold);
}

.hero h1,
.hero h2 {
  max-width: 860px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-meta {
  margin-bottom: 28px;
  color: var(--subtle);
}

.hero-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(203, 213, 225, 0.45);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  color: white;
  box-shadow: 0 18px 46px rgba(6, 182, 212, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-button,
.section-more {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.58);
  color: #e0f2fe;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.5);
  color: white;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(34, 211, 238, 0.18);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 44px;
  background: var(--cyan);
}

.quick-search-panel,
.filter-panel,
.page-hero,
.story-section {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.24);
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
}

.wide-search {
  position: relative;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.quick-search-panel h2,
.section-heading h2,
.page-hero h1,
.story-section h2 {
  margin: 0;
  color: white;
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.content-section {
  margin-top: 42px;
}

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

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

.category-card,
.category-overview-card {
  min-height: 158px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent),
    rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.6);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.1)),
    rgba(15, 23, 42, 0.9);
}

.category-card span,
.category-title-link {
  display: block;
  color: white;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.category-card p,
.category-overview-card p,
.page-hero p,
.story-section p,
.site-footer p {
  color: var(--subtle);
  line-height: 1.75;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 13px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.16);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.56);
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.14);
}

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.05);
  filter: saturate(1.1) brightness(1.04);
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.78));
}

.card-rank {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #111827;
  font-weight: 900;
}

.card-content {
  padding: 14px;
}

.card-meta {
  gap: 5px;
  margin-bottom: 10px;
}

.card-meta span {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 17px;
  line-height: 1.35;
}

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

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

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

.tag {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.32);
  color: #bfdbfe;
  font-size: 12px;
}

.compact-hero {
  min-height: 230px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 64, 175, 0.28));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 4px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: stretch;
}

.player-card,
.detail-info {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.player-card {
  padding: 18px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
  color: white;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-symbol {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.34);
  font-size: 34px;
}

.detail-info {
  padding: 20px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
  background: #0f172a;
}

.detail-meta {
  margin: 18px 0 12px;
}

.detail-info h1 {
  margin: 0 0 12px;
  color: white;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: #dbeafe;
  line-height: 1.75;
}

.story-section h2 + p {
  margin-top: 10px;
}

.related-grid {
  grid-template-columns: repeat(6, 1fr);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.66);
  padding: 44px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--subtle);
}

.footer-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.55);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(59, 130, 246, 0.18);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.is-filtered-out {
  display: none;
}

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

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

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

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

  .detail-info {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }

  .detail-info .detail-meta,
  .detail-info h1,
  .detail-info .detail-one-line,
  .detail-info .tag-row {
    grid-column: 2;
  }

  .detail-cover {
    grid-row: 1 / 6;
  }
}

@media (max-width: 820px) {
  .site-nav {
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .brand,
  .footer-brand {
    font-size: 20px;
  }

  .hero {
    min-height: 560px;
    border-radius: 22px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

  .detail-info {
    display: block;
  }

  .detail-cover {
    width: min(260px, 100%);
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .page-main {
    padding-top: 18px;
  }

  .hero {
    min-height: 520px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .quick-search-panel,
  .filter-panel,
  .page-hero,
  .story-section {
    padding: 22px;
    border-radius: 22px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .card-content {
    padding: 12px;
  }

  .play-symbol {
    width: 68px;
    height: 68px;
  }
}
