:root {
  color-scheme: dark;
  --bg: #050708;
  --fg: #f4f1e8;
  --muted: rgba(244, 241, 232, 0.68);
  --soft: rgba(244, 241, 232, 0.44);
  --line: rgba(244, 241, 232, 0.17);
  --line-strong: rgba(244, 241, 232, 0.32);
  --accent: #c7a760;
  --green: #5b7668;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 76% 18%,
      rgba(199, 167, 96, 0.17),
      transparent 25rem
    ),
    radial-gradient(
      circle at 18% 86%,
      rgba(91, 118, 104, 0.24),
      transparent 24rem
    ),
    linear-gradient(180deg, #050708 0%, #0a0d0d 52%, #11130f 100%);
  color: var(--fg);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

.page-shell {
  width: min(100%, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 70px) 70px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.22fr) minmax(
      112px,
      0.22fr
    );
  min-height: 74px;
  background: rgba(5, 7, 8, 0.46);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.site-nav a {
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 2.8vw, 42px);
  color: rgba(244, 241, 232, 0.72);
  font-size: clamp(16px, 1.4vw, 22px);
  font-weight: 650;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.site-nav a:hover {
  color: var(--fg);
  background: rgba(244, 241, 232, 0.055);
}

.nav-home {
  gap: 14px;
}

.brand-logo {
  width: clamp(48px, 5vw, 72px);
  height: auto;
  flex: 0 0 auto;
  display: block;
  filter: drop-shadow(0 0 18px rgba(244, 241, 232, 0.18));
}

.museum-intro {
  position: relative;
  min-height: clamp(560px, 74vh, 780px);
  margin-top: 0;
  display: grid;
  align-items: start;
  overflow: hidden;
  background: #070909;
  isolation: isolate;
}

.intro-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: url("./assets/chengdu-natural-museum-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  animation: bg-arrive 1400ms ease-out forwards;
}

.museum-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      rgba(5, 7, 8, 0.92) 0%,
      rgba(5, 7, 8, 0.58) 42%,
      rgba(5, 7, 8, 0.34) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 7, 8, 0.2) 0%,
      rgba(5, 7, 8, 0.44) 46%,
      rgba(5, 7, 8, 0.92) 100%
    );
}

.intro-content {
  width: min(760px, 100%);
  padding: clamp(28px, 4vw, 54px) clamp(42px, 6vw, 84px);
  opacity: 0;
  transform: translateY(20px);
  animation: rise-in 780ms cubic-bezier(0.16, 1, 0.3, 1) 260ms forwards;
}

.section-kicker {
  margin: 0 0 16px;
  color: rgba(244, 241, 232, 0.58);
  font-size: 13px;
  line-height: 1.5;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(52px, 7.4vw, 104px);
  line-height: 0.98;
  font-weight: 760;
  white-space: nowrap;
}

.intro-content p:last-child {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.82;
}

.intro-meta {
  position: absolute;
  right: clamp(24px, 4vw, 56px);
  bottom: clamp(28px, 4vw, 56px);
  display: flex;
  gap: 10px;
  color: rgba(244, 241, 232, 0.54);
  font-size: 13px;
}

.intro-meta span {
  padding: 8px 13px;
  background: rgba(5, 7, 8, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.science-band {
  position: relative;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px clamp(30px, 5vw, 72px);
  overflow: hidden;
  background:
    linear-gradient(
      90deg,
      rgba(5, 7, 8, 0.72),
      rgba(5, 7, 8, 0.45),
      rgba(5, 7, 8, 0.82)
    ),
    url("./assets/science-shared-bg.png") center center / cover;
}

.science-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(5, 7, 8, 0.52),
      transparent 28%,
      rgba(5, 7, 8, 0.66)
    ),
    radial-gradient(
      circle at 35% 50%,
      rgba(199, 167, 96, 0.2),
      transparent 24rem
    );
  pointer-events: none;
}

.science-band > * {
  position: relative;
}

.science-band h2 {
  margin: 0;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1;
  font-weight: 730;
}

.topic-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: clamp(420px, 58vh, 620px);
}

.topic-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #070909;
}

.topic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: url("./assets/science-shared-bg.png");
  background-size: cover;
  transition:
    transform 500ms ease,
    filter 500ms ease;
}

.topic-dino::before {
  background-position: center center;
}

.topic-mineral::before {
  background-position: center center;
}

.topic-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      180deg,
      rgba(5, 7, 8, 0.22),
      rgba(5, 7, 8, 0.52) 42%,
      rgba(5, 7, 8, 0.92)
    ),
    linear-gradient(90deg, rgba(5, 7, 8, 0.68), rgba(5, 7, 8, 0.16));
  pointer-events: none;
}

.topic-link {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(34px, 5vw, 70px);
}

.topic-number {
  display: none;
}

.topic-card h3 {
  margin: 0;
  font-size: clamp(46px, 7vw, 96px);
  line-height: 0.96;
  font-weight: 740;
}

.topic-card p {
  max-width: 430px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.78;
}

.topic-card:hover::before {
  transform: scale(1.055);
  filter: saturate(1.08) brightness(1.08);
}

@keyframes bg-arrive {
  to {
    transform: scale(1);
  }
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-body {
  min-height: 100vh;
  background-color: #050708;
  background-image:
    linear-gradient(
      90deg,
      rgba(5, 7, 8, 0.98) 0%,
      rgba(5, 7, 8, 0.72) 34%,
      rgba(5, 7, 8, 0.26) 100%
    ),
    var(--video-bg);
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

.video-dinosaur {
  --video-bg: url("./assets/science-dinosaur-bg.png");
}

.video-mineral {
  --video-bg: url("./assets/science-mineral-bg.png");
}

.video-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      circle at 70% 24%,
      rgba(199, 167, 96, 0.13),
      transparent 28rem
    ),
    linear-gradient(180deg, rgba(5, 7, 8, 0.24), rgba(5, 7, 8, 0.86));
  pointer-events: none;
}

.video-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: clamp(180px, 18vw, 250px) minmax(0, 1fr);
}

.video-sidebar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(5, 7, 8, 0.56);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 34px 0 80px rgba(0, 0, 0, 0.28);
}

.video-logo {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(22px, 3vw, 38px);
  color: rgba(244, 241, 232, 0.78);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 720;
}

.chapter-nav {
  display: flex;
  flex-direction: column;
}

.chapter-link {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px clamp(22px, 3vw, 38px);
  color: rgba(244, 241, 232, 0.62);
  background: rgba(244, 241, 232, 0.025);
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.chapter-link span {
  color: rgba(199, 167, 96, 0.78);
  font-size: 13px;
}

.chapter-link strong {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.12;
}

.chapter-link:hover,
.chapter-link.is-active {
  color: var(--fg);
  background: rgba(244, 241, 232, 0.07);
}

.chapter-link:hover {
  transform: translateX(4px);
}

.video-stage {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(340px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(44px, 7vw, 92px);
}

.video-copy {
  width: min(620px, 100%);
}

.video-copy h1 {
  font-size: clamp(58px, 8vw, 118px);
}

.video-copy p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.8;
}

.player-shell {
  position: relative;
  align-self: center;
  width: min(100%, 940px);
  aspect-ratio: 16 / 9;
  margin-left: clamp(10px, 5vw, 80px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(244, 241, 232, 0.08), transparent 34%),
    rgba(5, 7, 8, 0.46);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 38px 110px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(244, 241, 232, 0.08);
}

.player-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 8, 0.12), rgba(5, 7, 8, 0.7)),
    var(--video-bg) center / cover;
  opacity: 0.38;
}

.bilibili-player {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050708;
}

.play-button,
.fullscreen-button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.play-button {
  position: relative;
  z-index: 1;
  width: clamp(76px, 8vw, 116px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(244, 241, 232, 0.9);
  color: #050708;
  box-shadow:
    0 0 0 18px rgba(244, 241, 232, 0.06),
    0 24px 70px rgba(0, 0, 0, 0.46);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid currentColor;
}

.play-button:hover {
  transform: scale(1.04);
  background: #fffaf0;
}

.player-caption {
  position: absolute;
  left: clamp(22px, 3vw, 38px);
  bottom: clamp(20px, 3vw, 34px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(244, 241, 232, 0.78);
}

.player-caption span {
  color: var(--accent);
  font-size: 13px;
}

.player-caption strong {
  font-size: clamp(20px, 2.2vw, 30px);
}

.fullscreen-button {
  position: absolute;
  right: clamp(18px, 2.6vw, 32px);
  bottom: clamp(18px, 2.6vw, 32px);
  z-index: 1;
  min-height: 42px;
  padding: 0 18px;
  background: rgba(244, 241, 232, 0.12);
  color: rgba(244, 241, 232, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    background 180ms ease,
    color 180ms ease;
}

.fullscreen-button:hover {
  background: rgba(244, 241, 232, 0.2);
  color: var(--fg);
}

@media (max-width: 820px) {
  .page-shell {
    padding: 0 16px 42px;
  }

  .site-nav {
    top: 0;
    grid-template-columns: 1fr 0.42fr 0.42fr;
    min-height: 60px;
  }

  .site-nav a {
    padding: 0 14px;
    font-size: 14px;
  }

  .brand-logo {
    width: 44px;
  }

  .museum-intro {
    min-height: 620px;
  }

  .intro-content {
    padding: 28px 24px 96px;
  }

  h1 {
    white-space: normal;
  }

  .intro-meta {
    right: 24px;
    bottom: 28px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 210px;
  }

  .science-band {
    min-height: 140px;
    padding: 28px 24px;
  }

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

  .topic-card {
    min-height: 360px;
  }

  .topic-card::before {
    background-size: cover;
  }

  .video-page {
    grid-template-columns: 1fr;
  }

  .video-sidebar {
    min-height: auto;
  }

  .video-logo {
    min-height: 76px;
    padding: 0 20px;
    font-size: 18px;
  }

  .chapter-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 14px 14px;
    gap: 10px;
  }

  .chapter-link {
    min-width: 154px;
    min-height: 88px;
    padding: 16px;
  }

  .chapter-link:hover {
    transform: none;
  }

  .video-stage {
    min-height: auto;
    grid-template-rows: auto auto;
    padding: 34px 20px 46px;
  }

  .video-copy h1 {
    white-space: normal;
  }

  .player-shell {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
