
:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --text: #0f172a;
  --muted: #5b6476;
  --line: rgba(15, 23, 42, 0.08);
  --primary: #4f46e5;
  --primary-2: #06b6d4;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.09);
  --radius: 24px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.11), transparent 34%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.09), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button, input {
  font: inherit;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow-soft);
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-size: 1rem;
  line-height: 1.2;
}

.brand-text em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(79, 70, 229, 0.08);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.header-search input,
.search-panel input {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.header-search input {
  width: 280px;
  padding: 8px 12px;
}

.header-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover,
.btn:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.hero-shell,
.page-hero,
.category-block,
.featured-strip,
.list-section,
.page-subpanel,
.content-card,
.search-panel,
.detail-hero,
.category-tile,
.mini-card,
.movie-card,
.site-footer {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  margin-top: 24px;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.28), transparent 35%),
    radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.18), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #0f172a 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-shell::before,
.page-hero::before,
.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
}

.hero-copy,
.hero-visual,
.detail-copy,
.detail-poster,
.hero-poster,
.content-card,
.page-hero,
.page-subpanel,
.category-block,
.search-panel,
.site-footer {
  position: relative;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.72);
}

.section-kicker {
  color: var(--primary);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 0;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero-summary,
.page-hero p,
.detail-one-line,
.content-card p,
.category-note,
.player-note {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
}

.page-hero p,
.category-note,
.content-card p,
.player-note {
  color: var(--muted);
}

.hero-pills,
.tag-row,
.chip-row,
.detail-meta,
.hero-actions,
.hero-stats,
.mini-grid,
.card-grid,
.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-pills span,
.tag,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
}

.tag {
  color: var(--muted);
  border-color: rgba(79, 70, 229, 0.12);
  background: rgba(79, 70, 229, 0.06);
}

.chip {
  color: var(--text);
  background: rgba(255,255,255,0.7);
  border-color: rgba(15, 23, 42, 0.08);
}

.chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow-soft);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

.hero-stats {
  margin-top: 14px;
  gap: 18px;
}

.hero-stats div {
  padding-right: 16px;
  border-right: 1px solid rgba(255,255,255,0.14);
}

.hero-stats div:last-child {
  border-right: 0;
  padding-right: 0;
}

.hero-stats strong {
  display: block;
  font-size: 1.3rem;
}

.hero-stats span {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.hero-visual {
  display: grid;
  gap: 16px;
  align-content: start;
}

.hero-poster {
  min-height: 250px;
  border-radius: 28px;
  padding: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.hero-poster-letter,
.detail-poster-letter,
.poster-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.hero-poster-letter {
  font-size: clamp(4rem, 12vw, 7rem);
  align-self: flex-start;
  opacity: 0.96;
}

.hero-poster-meta,
.detail-poster-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(16px);
}

.hero-poster-meta b,
.detail-poster-meta b {
  font-size: 1.08rem;
}

.hero-poster-meta small,
.detail-poster-meta small {
  color: rgba(255, 255, 255, 0.76);
}

.hero-slider {
  border-radius: 24px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 16px;
  backdrop-filter: blur(14px);
}

.hero-slider-head,
.section-head,
.footer-inner,
.detail-meta,
.card-topline,
.search-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-slider-head strong,
.section-head h2,
.content-card h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
}

.hero-slider-head span {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.hero-slider-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.hero-slide {
  width: 100%;
  border: 0;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  display: grid;
  gap: 8px;
}

.hero-slide:hover,
.hero-slide.is-active {
  background: rgba(255,255,255,0.16);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.hero-slide-index {
  display: inline-flex;
  width: fit-content;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.68);
}

.hero-slide strong {
  font-size: 1.02rem;
}

.hero-slide small {
  color: rgba(255,255,255,0.72);
}

.hero-slide-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-slide-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.08);
}

.featured-strip,
.list-section,
.category-block,
.page-subpanel,
.content-card,
.search-panel,
.detail-hero {
  margin-top: 20px;
  border-radius: 28px;
  padding: 24px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

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

.mini-card {
  min-height: 148px;
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  color: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.mini-card::before,
.poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.68));
  z-index: -1;
}

.mini-card strong,
.mini-card small {
  position: relative;
  z-index: 1;
}

.mini-card-year {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
}

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

.category-tile {
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 8px;
  min-height: 166px;
  align-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-tile-index {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
}

.category-tile strong {
  font-size: 1.08rem;
}

.category-tile p,
.category-tile em {
  margin: 0;
  color: var(--muted);
  font-style: normal;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  gap: 16px;
}

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--panel-strong);
}

.poster {
  position: relative;
  min-height: 220px;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  color: #fff;
  isolation: isolate;
}

.poster-letter {
  font-size: clamp(2.5rem, 8vw, 4.6rem);
  line-height: 1;
  opacity: 0.96;
}

.poster-year,
.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 0.78rem;
  backdrop-filter: blur(10px);
  position: absolute;
  top: 14px;
  left: 14px;
}

.card-badge {
  left: auto;
  right: 14px;
  background: rgba(15, 23, 42, 0.4);
}

.card-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.card-topline {
  color: var(--muted);
  font-size: 0.82rem;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  min-height: 3.1em;
}

.page-hero {
  border-radius: 30px;
  padding: 30px 28px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(6, 182, 212, 0.08), rgba(255,255,255,0.88));
}

.page-hero-tight {
  display: grid;
  gap: 16px;
}

.page-hero h1,
.detail-copy h1 {
  color: var(--text);
}

.page-hero p {
  max-width: 64ch;
}

.site-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 40px;
  border-radius: 28px;
  padding: 22px 24px;
}

.footer-inner p {
  margin: 6px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  margin-top: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(79, 70, 229, 0.08), rgba(255,255,255,0.9));
}

.detail-poster {
  min-height: 420px;
  border-radius: 28px;
  padding: 22px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.detail-poster-letter {
  font-size: clamp(5rem, 18vw, 8rem);
  align-self: flex-start;
}

.detail-poster-year {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-weight: 700;
}

.detail-copy {
  display: grid;
  align-content: start;
  gap: 14px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  align-items: center;
}

.breadcrumb strong {
  color: var(--text);
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.07);
  color: var(--text);
  font-size: 0.88rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 20px;
}

.content-card p {
  color: var(--muted);
  margin: 0 0 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
}

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

.player-overlay {
  position: absolute;
  inset: auto auto 18px 18px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(135deg, rgba(79,70,229,0.95), rgba(6,182,212,0.95));
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: 0.2s ease;
}

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

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  background: rgba(255,255,255,0.82);
}

.search-panel input {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  width: 100%;
}

.search-results-meta {
  margin-top: 16px;
  padding: 0 4px;
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,0.82);
  border-radius: 20px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

.category-note {
  margin: 0 0 16px;
}

@media (max-width: 1180px) {
  .mini-grid,
  .card-grid,
  .card-grid-wide,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .header-search {
    display: none;
  }
}

@media (max-width: 820px) {
  .page-shell,
  .site-footer,
  .header-inner {
    width: min(100% - 20px, 100%);
  }

  .hero-shell,
  .page-hero,
  .detail-hero,
  .content-card,
  .search-panel,
  .featured-strip,
  .list-section,
  .category-block,
  .page-subpanel {
    padding: 18px;
    border-radius: 22px;
  }

  .hero-shell {
    gap: 18px;
  }

  .main-nav {
    position: fixed;
    top: 74px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    padding: 14px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

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

  .hero-shell,
  .page-hero,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .hero-stats {
    gap: 10px;
  }

  .hero-stats div {
    border-right: 0;
    padding-right: 0;
  }

  .header-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .brand-text em {
    display: none;
  }
}

@media (max-width: 520px) {
  .mini-grid,
  .card-grid,
  .card-grid-wide,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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