/* loader.css — 加载动画层（改自 地球/css/space-earth.css）
 * 分层：canvas 星空+地球 / #loader-photo 天台照片 / #flash 再入闪白 / HUD
 * 与原版差异：去掉降落段 HUD（落地后由主场景接管）；文字接统一内容源；色板微调。
 */
#loader-layer { position: fixed; inset: 0; z-index: 60; background: #020409; }
#loader-layer.off { display: none; }

#loader-stage { position: absolute; inset: 0; }

#space { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }

/* ---------- 天台照片层 ---------- */
#loader-photo { position: absolute; inset: 0; opacity: 0; visibility: hidden; will-change: opacity; pointer-events: none; background: #0a0f1c; }
#loader-photo .ph-scale { position: absolute; inset: 0; will-change: transform; }
#loader-photo .ph-scale img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .9s ease;
}
#loader-photo .ph-day.on, #loader-photo .ph-night.on { opacity: 1; }
#loader-photo .ph-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,8,18,.40), transparent 28%, transparent 60%, rgba(4,8,18,.52));
}

#flash {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; will-change: opacity;
  pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #dceaff 45%, #9cc4ff 100%);
}

/* ---------- 太空段 HUD ---------- */
#hud-space { position: absolute; inset: 0; pointer-events: none; transition: opacity .5s; color: #eaf2ff; }
#hud-space.hide { opacity: 0; }
/* 左上角统一品牌（.zc-brand 皮肤在 theme.css；这里只管太空层内的落位） */
.zc-brand--loader {
  position: absolute; top: 28px; left: 32px;
}

.hint { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); text-align: center; transition: opacity .5s; }
.hint.hide { opacity: 0; pointer-events: none; }
.hint-line { font-family: var(--zc-font-body); font-size: 15px; letter-spacing: .5em; text-indent: .5em; opacity: .92; }
.hint-sub { margin-top: 10px; font-family: var(--zc-font-body); font-size: 11px; letter-spacing: .3em; opacity: .55; }
.chevrons { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 5px; animation: hint-bob 1.9s ease-in-out infinite; }
.chevrons i {
  width: 11px; height: 11px;
  border-right: 1.5px solid rgba(210, 230, 255, .85); border-bottom: 1.5px solid rgba(210, 230, 255, .85);
  transform: rotate(45deg);
}
.chevrons i:nth-child(2) { opacity: .55; }
.chevrons i:nth-child(3) { opacity: .25; }
@keyframes hint-bob { 50% { transform: translateY(7px); } }

.credit { position: absolute; left: 32px; bottom: 22px; font-family: var(--zc-font-body); font-size: 10px; letter-spacing: .18em; opacity: .38; }

#loader-skip {
  position: absolute; right: 26px; bottom: 22px; pointer-events: auto;
  appearance: none; background: rgba(10, 18, 34, .3); border: 1px solid rgba(255,255,255,.22);
  color: rgba(234, 242, 255, .75); border-radius: 999px; padding: 7px 16px;
  font-family: var(--zc-font-body); font-size: 12px; letter-spacing: .18em; cursor: pointer;
  transition: opacity .4s, border-color .3s;
}
#loader-skip:hover { border-color: rgba(190, 220, 255, .6); color: #eaf2ff; }
#loader-skip.hide { opacity: 0; pointer-events: none; }

/* ---------- 右侧进度轨 ---------- */
#rail {
  position: absolute; right: 22px; top: 12vh; height: 56vh; width: 2px;
  background: rgba(255, 255, 255, .14); border-radius: 2px; transition: opacity .4s;
}
#rail.hide { opacity: 0; }
#rail i {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: #bfe0ff; box-shadow: 0 0 10px #9fd0ff;
}

/* ---------- 加载动画 ---------- */
.loader { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); text-align: center; transition: opacity .55s; }
.loader.hide { opacity: 0; }
.loader-num {
  font-family: var(--zc-font-body);
  font-size: 46px; font-weight: 200; line-height: 1; letter-spacing: .06em;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 28px rgba(140, 190, 255, .55);
}
.loader-num small { font-size: 18px; font-weight: 300; opacity: .55; margin-left: 3px; }
.loader-bar { width: 224px; height: 1px; margin: 16px auto 12px; background: rgba(255, 255, 255, .14); position: relative; }
.loader-bar i { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: #cfe4ff; box-shadow: 0 0 9px #9fd0ff; }
.loader-cap { font-family: var(--zc-font-body); font-size: 10px; letter-spacing: .42em; text-indent: .42em; opacity: .5; }

@media (max-width: 720px) {
  .zc-brand--loader { top: 18px; left: 20px; }
  .credit { left: 20px; bottom: 16px; }
  .hint-line { font-size: 13px; }
  #rail { right: 12px; }
}
