/* ===== LV 进入动画（独立文件，不改动 chat.css） ===== */

#lvIntro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity .45s ease;
  -webkit-tap-highlight-color: transparent;
}

#lvIntro.lv-out {
  opacity: 0;
  pointer-events: none;
}

#lvIntro .lv-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 白场遮罩：视频结束后盖住，接替 logo */
#lvIntro .lv-mask {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

#lvIntro .lv-mask.on { opacity: 1; }

/* 可位移的 LV 图标 */
#lvFly {
  position: fixed;
  z-index: 100000;
  left: 50%;
  top: 48.79%;
  width: 21.62vw;
  max-width: 140px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  will-change: top, width, left;
}

#lvFly.on { opacity: 1; }

#lvFly img {
  display: block;
  width: 100%;
  height: auto;
  /* 初始为黑（白底上），飞到顶部后反白 */
}

/* 深色模式下飞行动画仍需反白，故用滤镜切换 */
#lvFly.lv-dark img {
  filter: invert(1);
  transition: filter .5s ease .3s;
}

/* 尊重「减少动态效果」系统设置 */
@media (prefers-reduced-motion: reduce) {
  #lvIntro,
  #lvIntro .lv-mask,
  #lvFly {
    transition: none !important;
  }
}

/* ===== LV-NO-VIDEO-UI: 禁止浏览器把它当成可交互视频 ===== */
#lvIntro {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
#lvIntro .lv-video {
  pointer-events: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  /* 去掉 iOS 播放时出现的小控件层 */
  -webkit-appearance: none;
  appearance: none;
}
/* Safari / iOS 内联播放器的覆盖层 */
#lvIntro .lv-video::-webkit-media-controls,
#lvIntro .lv-video::-webkit-media-controls-enclosure,
#lvIntro .lv-video::-webkit-media-controls-panel,
#lvIntro .lv-video::-webkit-media-controls-play-button,
#lvIntro .lv-video::-webkit-media-controls-start-playback-button,
#lvIntro .lv-video::-webkit-media-controls-overlay-play-button,
#lvIntro .lv-video::-webkit-media-text-track-container {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* 拦截层：吃掉所有手势 */
#lvNoUI {
  cursor: default;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ===== LV-CANVAS-RENDER: canvas 代替 video，浏览器无法接管 ===== */
#lvIntro .lv-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  touch-action: none;
}
#lvIntro { touch-action: none; -webkit-touch-callout: none; user-select: none; }

/* LV-CLEAN: 已移除旧版小米动画样式 */
/* ============================================================
   LV-V1-CSS: 小米浏览器定制动画（logo 淡入 + 分割线 + 逐字母）
   ============================================================ */
#lvStage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  z-index: 4;
}

/* 中心光晕 */
#lvStage .lvs-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(0,0,0,.06) 0%,
    rgba(0,0,0,.02) 45%,
    transparent 72%);
  transform: scale(.2);
  opacity: 0;
}
#lvStage.play .lvs-glow {
  animation: lvsGlow 2.0s cubic-bezier(.2,.8,.3,1) forwards;
}
@keyframes lvsGlow {
  0%   { transform: scale(.2);   opacity: 0; }
  30%  { transform: scale(1);    opacity: 1; }
  70%  { transform: scale(1.15); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* LV logo */
#lvStage .lvs-logo {
  width: 92px !important;
  opacity: 0;
  transform: scale(.55) translateY(14px);
  will-change: transform, opacity;
  margin: 0 !important;
}
#lvStage .lvs-logo img {
  display: block;
  width: 92px !important;
  max-width: 92px !important;
  height: auto !important;
  filter: none !important;
}
#lvStage.play .lvs-logo {
  animation: lvsLogo 2.0s cubic-bezier(.34,1.4,.44,1) forwards;
}
@keyframes lvsLogo {
  0%   { opacity: 0; transform: scale(.55) translateY(14px); filter: blur(6px); }
  22%  { opacity: 1; transform: scale(1)   translateY(0);    filter: blur(0); }
  62%  { opacity: 1; transform: scale(1)   translateY(0);    filter: blur(0); }
  88%  { opacity: 1; transform: scale(1.06) translateY(0);   filter: blur(0); }
  100% { opacity: 0; transform: scale(1.14) translateY(0);   filter: blur(10px); }
}

/* 分割线 */
#lvStage .lvs-line {
  width: 0;
  height: 1px;
  background: #d8d8d8;
  margin: 18px 0 14px;
}
#lvStage.play .lvs-line {
  animation: lvsLine 2.0s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes lvsLine {
  0%   { width: 0;     opacity: 0; }
  30%  { width: 0;     opacity: 0; }
  48%  { width: 120px; opacity: 1; }
  72%  { width: 120px; opacity: 1; }
  92%  { width: 0;     opacity: 0; }
  100% { width: 0;     opacity: 0; }
}

/* LOUIS VUITTON 逐字浮现 */
#lvStage .lvs-word {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Times New Roman", Georgia, "Songti SC", serif !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  color: #1a1a1a !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  opacity: 0;
}
#lvStage .lvs-word i {
  display: inline-block !important;
  width: 9px !important;
  flex: 0 0 9px !important;
}
#lvStage .lvs-word span {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  transform: translateY(6px);
  letter-spacing: .34em !important;
  text-indent: .34em !important;
  will-change: transform, opacity;
}
#lvStage.play .lvs-word { opacity: 1; }
#lvStage.play .lvs-word span {
  animation: lvsLetter 1.2s cubic-bezier(.32,.02,.28,1) forwards;
}
#lvStage.play .lvs-word span:nth-child(1)  { animation-delay: .62s; }
#lvStage.play .lvs-word span:nth-child(2)  { animation-delay: .68s; }
#lvStage.play .lvs-word span:nth-child(3)  { animation-delay: .74s; }
#lvStage.play .lvs-word span:nth-child(4)  { animation-delay: .80s; }
#lvStage.play .lvs-word span:nth-child(5)  { animation-delay: .86s; }
#lvStage.play .lvs-word span:nth-child(7)  { animation-delay: .94s; }
#lvStage.play .lvs-word span:nth-child(8)  { animation-delay: 1.00s; }
#lvStage.play .lvs-word span:nth-child(9)  { animation-delay: 1.06s; }
#lvStage.play .lvs-word span:nth-child(10) { animation-delay: 1.12s; }
#lvStage.play .lvs-word span:nth-child(11) { animation-delay: 1.18s; }
#lvStage.play .lvs-word span:nth-child(12) { animation-delay: 1.24s; }
#lvStage.play .lvs-word span:nth-child(13) { animation-delay: 1.30s; }
@keyframes lvsLetter {
  0%   { opacity: 0; transform: translateY(6px); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0);   filter: blur(0); }
}

/* 整体淡出 */
#lvStage.play {
  animation: lvsStageOut .3s ease 1.9s forwards;
}
@keyframes lvsStageOut {
  to { opacity: 0; }
}
