:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(59, 130, 246, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(6, 182, 212, 0.12), transparent 30rem),
    linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f1f5f9 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-size: 20px;
  line-height: 1.05;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

.logo-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  background: none;
  -webkit-text-fill-color: var(--muted);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #334155;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-shell {
  position: relative;
  width: 250px;
}

.global-search-input,
.filter-input,
.filter-year {
  width: 100%;
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--text);
  outline: none;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.global-search-input:focus,
.filter-input:focus,
.filter-year:focus {
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 520px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.search-result-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
}

.search-result-item:hover {
  background: #eff6ff;
}

.search-result-item img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.search-result-item span {
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #334155;
  background: #f1f5f9;
  cursor: pointer;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border-top: 1px solid var(--soft);
}

.mobile-nav a {
  display: block;
}

.hero-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 650px;
  margin: 28px auto 70px;
  overflow: hidden;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
  transform: scale(1.04);
}

.hero-overlay,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.70) 42%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 48px;
  padding: 56px;
  color: #fff;
}

.eyebrow,
.section-heading span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  background: rgba(239, 246, 255, 0.92);
}

.hero-copy .eyebrow {
  color: #bae6fd;
  border-color: rgba(186, 230, 253, 0.28);
  background: rgba(14, 165, 233, 0.16);
}

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

.hero-copy h2 + h2 {
  margin-top: -8px;
  font-size: clamp(30px, 4vw, 54px);
  color: #dbeafe;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: #1e40af;
  font-size: 12px;
  font-weight: 700;
  background: #dbeafe;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-buttons,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

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

.secondary-btn {
  color: #1e40af;
  background: #dbeafe;
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.panel-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.hero-poster strong,
.hero-poster span {
  display: block;
  padding: 0 18px;
}

.hero-poster strong {
  padding-top: 16px;
  font-size: 20px;
}

.hero-poster span {
  padding-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
}

.hero-controls {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-prev,
.hero-next,
.hero-dot {
  pointer-events: auto;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  width: 44px;
  background: #fff;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.side-panel h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p,
.side-panel p,
.category-overview-card p,
.story-card p {
  color: var(--muted);
  line-height: 1.8;
}

.category-entrance,
.content-grid-wrap,
.two-column-section,
.listing-section,
.related-section,
.detail-content,
.player-section {
  margin-bottom: 70px;
}

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

.category-card,
.category-overview-card,
.story-card,
.side-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.06);
}

.category-card {
  min-height: 122px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 54px rgba(37, 99, 235, 0.14);
}

.category-card span,
.category-overview-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.category-card strong {
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

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

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

.poster-shine {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent);
}

.play-chip,
.rank-num {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.30);
}

.rank-num {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
  padding: 14px 14px 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.movie-info h3 a:hover {
  color: var(--blue);
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

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

.side-panel {
  position: sticky;
  top: 100px;
  padding: 24px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: #eff6ff;
}

.mini-card img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.panel-link {
  width: 100%;
  color: #fff;
  background: #0f172a;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 52px;
  color: #fff;
  background: #0f172a;
}

.compact-hero {
  padding: 76px 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.48), transparent 36rem),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.compact-hero .container {
  position: relative;
  z-index: 1;
}

.compact-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.04em;
}

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

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

.category-overview-card {
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 26px;
}

.filter-year {
  border-radius: 16px;
}

.detail-hero {
  min-height: 560px;
}

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

.detail-top {
  position: relative;
  z-index: 2;
  padding: 42px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 32px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

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

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-copy .lead {
  max-width: 860px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.9;
}

.large-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.34), rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.52));
  cursor: pointer;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.42);
}

.player-start strong {
  font-size: 20px;
}

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

.story-card {
  padding: 28px;
}

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

.site-footer {
  margin-top: 80px;
  padding: 52px 0 26px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.footer-logo {
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  border-radius: 999px;
  padding: 9px 13px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.38);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-poster {
    display: none;
  }

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    padding: 12px 0;
    align-items: flex-start;
  }

  .header-actions {
    flex: 1;
    justify-content: flex-end;
  }

  .search-shell {
    width: min(100%, 220px);
  }

  .logo-text {
    font-size: 17px;
  }

  .hero-slider {
    height: 600px;
    margin-top: 16px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 28px;
  }

  .hero-copy p,
  .detail-copy .lead {
    font-size: 16px;
  }

  .hero-controls {
    left: 28px;
    right: 28px;
    bottom: 24px;
  }

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

  .category-grid,
  .category-overview-grid,
  .footer-inner,
  .detail-layout,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

  .detail-hero {
    min-height: auto;
  }

  .detail-top {
    padding-bottom: 42px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .rank-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .search-shell {
    order: 3;
    width: 100%;
  }
}
