/* 跃跃 3D 专题页 — 单屏工位 */

.yy-world {
  --yy-ink: #f6f8fc;
  --yy-muted: rgba(246, 248, 252, 0.68);
  --yy-accent: #f5c518;
  color: var(--yy-ink);
}

.page-yueyue {
  background: #05080f;
  color: var(--yy-ink);
  overflow: hidden !important;
  height: 100vh;
}

.page-yueyue.yy-onescreen,
.page-yueyue.yy-onescreen html {
  overflow: hidden !important;
}

/* 仅专题页隐藏站点头尾；首页 banner 嵌入需保留导航 */
.page-yueyue .footer,
.page-yueyue .rightFastMain,
.page-yueyue .play-cursor,
.page-yueyue .header {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.yy-world,
.yy-world--onescreen {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* 首页第一屏：嵌入跃跃画面（桌面 / 平板 / 手机） */
.banner.banner--yueyue {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  background: #05080f;
  overflow: hidden;
}

.banner.banner--yueyue .yy-world,
.banner.banner--yueyue .yy-world--onescreen {
  width: 100%;
  height: 100%;
}

.banner.banner--yueyue .yy-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 桌面：HUD 用 fixed + 高于 main，避免被 index-row1「hello!」上探叠层盖住 */
.banner.banner--yueyue .yy-hud {
  position: fixed;
  right: 0;
  bottom: 0;
  left: auto;
  z-index: 15; /* main.main-index=2，header=100 */
  width: min(24rem, calc(100vw - 2.5rem));
  max-width: 100%;
  box-sizing: border-box;
}

/* 恢复初始视角：默认隐藏，移动端再显示 */
.yy-reset {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 12, 20, 0.72);
  color: #f5c518;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.yy-reset:hover,
.yy-reset:focus-visible {
  transform: translateY(-1px);
  background: rgba(12, 18, 28, 0.88);
  border-color: rgba(245, 197, 24, 0.55);
  outline: none;
}

.yy-reset:active {
  transform: scale(0.96);
}

.yy-reset__icon {
  display: block;
}

.h100vh.h100vh--yy-pass {
  display: block;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
}

main.main-index {
  position: relative;
  z-index: 2;
}

/* 桌面偏小高度：收紧 HUD，避免挡住主体 */
@media only screen and (min-width: 960px) and (max-height: 800px) {
  .banner.banner--yueyue .yy-hud {
    width: min(22rem, calc(100vw - 2rem));
    padding: 1rem 1.15rem 1.15rem;
    gap: 0.75rem;
  }

  .banner.banner--yueyue .yy-chapter__title {
    font-size: clamp(1.2rem, 2vw, 1.55rem);
  }

  .banner.banner--yueyue .yy-chapter__desc {
    font-size: 0.88rem;
    line-height: 1.5;
  }
}

/* 平板横屏 / 中屏桌面 */
@media only screen and (min-width: 960px) and (max-width: 1199px) {
  .banner.banner--yueyue .yy-hud {
    width: min(22rem, calc(100vw - 2rem));
    padding: 1.05rem 1.2rem 1.2rem;
  }

  .banner.banner--yueyue .yy-chapter__title {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  }

  .banner.banner--yueyue .yy-tab {
    font-size: 0.84rem;
  }
}

/* ≤959px：覆盖 style-rel 旧视频 banner；首页中高首屏 + 轻量底栏卡片 */
@media only screen and (max-width: 959px) {
  .banner.banner--yueyue {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    height: 72svh;
    min-height: 460px;
    max-height: 620px;
    margin-top: 0;
    z-index: 1;
    overflow: hidden;
  }

  .h100vh.h100vh--yy-pass {
    display: none !important;
    height: 0 !important;
  }

  .banner.banner--yueyue .yy-world,
  .banner.banner--yueyue .yy-world--onescreen {
    height: 100%;
    min-height: inherit;
  }

  .banner.banner--yueyue .yy-canvas {
    touch-action: pan-y;
  }

  /* 轻量：隐藏文案与三栏切换；仅保留右下角恢复按钮（相对 banner，勿用 fixed） */
  .banner.banner--yueyue .yy-hud {
    position: absolute;
    left: auto;
    right: 0.85rem;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    z-index: 12;
    width: auto;
    max-width: none;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .banner.banner--yueyue .yy-panels,
  .banner.banner--yueyue .yy-tabs {
    display: none !important;
  }

  .banner.banner--yueyue .yy-reset {
    display: inline-flex;
  }

  .banner.banner--yueyue .yy-loading__dock {
    width: min(280px, 78vw);
  }
}

/* 手机：首屏略矮 */
@media only screen and (max-width: 767px) {
  .banner.banner--yueyue {
    height: 68svh;
    min-height: 420px;
    max-height: 560px;
  }

  .banner.banner--yueyue .yy-hud {
    right: 0.7rem;
    bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
  }
}

/* 矮屏 */
@media only screen and (max-width: 959px) and (max-height: 640px) {
  .banner.banner--yueyue {
    height: 78svh;
    min-height: 320px;
    max-height: none;
  }

  .banner.banner--yueyue .yy-reset {
    width: 40px;
    height: 40px;
  }
}

@media only screen and (max-width: 959px) and (orientation: landscape) and (max-height: 500px) {
  .banner.banner--yueyue {
    height: 100svh;
    max-height: none;
  }

  .banner.banner--yueyue .yy-hud {
    right: 0.55rem;
    bottom: 0.55rem;
  }
}

.yy-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-color: #05080f;
  overflow: hidden;
}

/* 加载占位图：略降亮度 + 轻模糊，避免抢过真实 3D；不影响上方 canvas */
.yy-stage::before {
  content: '';
  position: absolute;
  inset: -12px;
  z-index: 0;
  background-image: url('/static/index/images/yueyue/loading-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.62) contrast(0.94) saturate(0.88) blur(3.5px);
  transform: scale(1.02);
  pointer-events: none;
}

.yy-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.yy-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: transparent;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  pointer-events: none;
}

/* 中央略压暗，让进度文案可读，四周仍露出场景 */
.yy-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 48% 36% at 50% 50%,
      rgba(5, 8, 15, 0.48) 0%,
      rgba(5, 8, 15, 0.22) 55%,
      rgba(5, 8, 15, 0.28) 100%
    );
  pointer-events: none;
}

.yy-loading.is-done {
  opacity: 0;
  visibility: hidden;
}

.yy-loading__dock {
  position: relative;
  z-index: 1;
  width: min(300px, 70vw);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
}

.yy-loading__text {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: rgba(236, 240, 248, 0.9);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
}

.yy-loading__bar {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.yy-loading__bar > span {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e0b010, #f5c518 45%, #fff3a0);
  box-shadow: 0 0 12px rgba(245, 197, 24, 0.45);
  transition: width 0.25s ease;
}

.yy-loading__bar > span.is-pulse {
  width: 34% !important;
  background: linear-gradient(90deg, transparent, #f5c518, #fff3a0, transparent);
  background-size: 200% 100%;
  animation: yy-bar-pulse 1.15s linear infinite;
}

@keyframes yy-bar-pulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.yy-brand {
  position: fixed;
  top: clamp(5.5rem, 12vh, 7rem);
  left: clamp(1.25rem, 4vw, 3.5rem);
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  pointer-events: none;
}

.yy-brand__mark {
  font-family: "DIN Alternate", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  letter-spacing: 0.42em;
  color: var(--yy-accent);
  font-weight: 600;
}

.yy-brand__name {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.yy-hud {
  position: fixed;
  right: 0;
  bottom: 0;
  left: auto;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 1rem;
  width: min(24rem, calc(100vw - 1.5rem));
  padding: 1.25rem 1.35rem 1.35rem 1.5rem;
  pointer-events: none;
  background: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s;
}

.yy-hud.is-ready {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.yy-panels {
  position: relative;
  width: 100%;
  text-align: right;
  pointer-events: none;
}

.yy-panel {
  display: none;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.yy-panel.is-active {
  display: block;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  animation: yy-hud-panel-in 0.4s ease;
}

@keyframes yy-hud-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.yy-chapter__eyebrow {
  margin: 0 0 0.4rem;
  font-family: "DIN Alternate", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--yy-accent);
  font-weight: 600;
}

.yy-chapter__title {
  margin: 0 0 0.5rem;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
}

.yy-chapter__desc {
  margin: 0;
  max-width: none;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--yy-muted);
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.yy-chapter__list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  text-align: right;
}

.yy-chapter__list li {
  position: relative;
  padding: 0.15rem 0.95rem 0.15rem 0;
  font-size: 0.92rem;
  color: rgba(246, 248, 252, 0.88);
}

.yy-chapter__list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.55em;
  left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yy-accent);
}

.yy-chapter__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.yy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.yy-btn:hover {
  transform: translateY(-1px);
}

.yy-btn--primary {
  background: var(--yy-accent);
  color: #1a1400;
  font-weight: 700;
}

.yy-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.yy-tabs {
  display: flex;
  gap: 0.35rem;
  pointer-events: auto;
  width: 100%;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(10, 14, 22, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.yy-tab {
  appearance: none;
  flex: 1;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.86rem;
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.yy-tab.is-active {
  background: var(--yy-accent);
  color: #1a1400;
  font-weight: 700;
}

.yy-tab:hover:not(.is-active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
  .yy-brand {
    top: 4.75rem;
    left: 1rem;
  }

  .yy-brand__name {
    font-size: 1.85rem;
  }

  .yy-hud {
    width: 100%;
    max-width: none;
    left: 0;
    padding: 1rem 1rem 1rem;
    background: none;
  }

  .yy-chapter__title {
    font-size: 1.45rem;
  }

  .yy-tab {
    padding: 0.55rem 0.3rem;
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yy-loading__bar > span.is-pulse {
    animation: none;
  }

  .yy-hud,
  .yy-panel.is-active {
    transition: none;
    animation: none;
  }
}
