/* ============================================================
 * 明月照 · 回梦语 七夕彩蛋样式
 * 1) 全屏彩蛋遮罩（huimengyu-qixi-egg*）
 * 2) 聊天流七夕祝福卡片（.huimengyu-message-bubble--card 内嵌）
 * 视觉沿用演示页克制风格：深色半透明遮罩 + 暖金光晕 + 微光星点
 * + 满屏枫叶飘落 + 米白中央卡片；真实设计 token 见 huimengyu-chat.css。
 * ============================================================ */

/* ========== 全屏彩蛋遮罩 ========== */
.huimengyu-qixi-egg {
  position: absolute;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(16, 18, 24, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
}

.huimengyu-qixi-egg--show {
  opacity: 1;
  pointer-events: auto;
}

.huimengyu-qixi-egg--hide {
  opacity: 0;
  pointer-events: none;
}

/* 大面积柔和光晕（暖金 + 月白，从卡片中心向外扩散） */
.huimengyu-qixi-egg__halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 44% at 50% 47%, rgba(255, 226, 186, 0.5) 0%, rgba(255, 236, 208, 0.2) 36%, rgba(255, 242, 224, 0.06) 58%, transparent 74%),
    radial-gradient(ellipse 72% 62% at 50% 49%, rgba(220, 232, 250, 0.14) 0%, rgba(220, 232, 250, 0.05) 42%, transparent 68%);
  opacity: 0;
  animation: huimengyuQixiHaloIn 1s ease .1s both, huimengyuQixiHaloPulse 7s ease-in-out 1.3s infinite;
}

@keyframes huimengyuQixiHaloIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes huimengyuQixiHaloPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: .82; }
}

/* 点缀容器：必须 inset:0 铺满全屏，枫叶负延迟满屏分布 */
.huimengyu-qixi-egg__deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 枫叶飘屏（内联 SVG 五裂枫叶，秋色低饱和） */
.huimengyu-qixi-egg__leaf {
  position: absolute;
  top: -70px;
  pointer-events: none;
  animation-name: huimengyuQixiLeafFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

@keyframes huimengyuQixiLeafFall {
  0%   { opacity: .4; transform: translate3d(0, 0, 0) rotate(0deg); }
  5%   { opacity: 1; }
  30%  { transform: translate3d(var(--drift-a), 30vh, 0) rotate(var(--rot-a)); }
  60%  { transform: translate3d(var(--drift-b), 62vh, 0) rotate(var(--rot-b)); }
  85%  { opacity: 1; }
  100% { opacity: .4; transform: translate3d(var(--drift-c), 112vh, 0) rotate(var(--rot-c)); }
}

/* 微光星点 / 光尘（低饱和、缓慢浮动） */
.huimengyu-qixi-egg__dust {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation-name: huimengyuQixiDustFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes huimengyuQixiDustFloat {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: .18; }
  50% { transform: translate3d(0, -22px, 0); opacity: .6; }
}

.huimengyu-qixi-egg__glowdot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(240, 222, 205, 0.75);
  box-shadow: 0 0 8px rgba(240, 222, 205, 0.5);
  animation: huimengyuQixiGlowDotFloat 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes huimengyuQixiGlowDotFloat {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50% { opacity: .75; transform: translateY(-8px); }
}

/* 中央七夕卡片（米白渐变） */
.huimengyu-qixi-egg__card {
  position: relative;
  z-index: 5;
  width: min(312px, 84vw);
  padding: 30px 26px 26px;
  border-radius: 26px;
  background: linear-gradient(165deg, #fffdf9 0%, #faf4ec 58%, #f3e9dc 100%);
  border: 1px solid rgba(160, 130, 100, 0.16);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 0 46px rgba(255, 226, 186, 0.28),
    0 0 120px rgba(255, 236, 210, 0.16);
  text-align: center;
  animation: huimengyuQixiCardIn .9s cubic-bezier(.22, 1, .36, 1) 1s both;
}

@keyframes huimengyuQixiCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.huimengyu-qixi-egg__kicker {
  font-size: 11px;
  letter-spacing: 0.34em;
  color: rgba(130, 108, 84, 0.66);
  animation: huimengyuQixiFadeUp .8s ease 1.25s both;
}

.huimengyu-qixi-egg__divider {
  width: 40px;
  height: 1px;
  margin: 13px auto 0;
  background: rgba(160, 130, 100, 0.3);
  animation: huimengyuQixiFadeUp .8s ease 1.32s both;
}

.huimengyu-qixi-egg__title {
  margin-top: 16px;
  font-family: "KaiTi", "STKaiti", "Kaiti SC", "楷体", serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #3a2f26;
  animation: huimengyuQixiFadeUp .9s ease 1.38s both;
}

.huimengyu-qixi-egg__heart {
  display: inline-block;
  font-size: 18px;
  color: rgba(190, 130, 130, 0.75);
  margin-right: 2px;
  vertical-align: 2px;
}

.huimengyu-qixi-egg__saying {
  margin-top: 12px;
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: rgba(96, 80, 62, 0.78);
  animation: huimengyuQixiFadeUp .9s ease 1.5s both;
}

.huimengyu-qixi-egg__foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(160, 130, 100, 0.2);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: rgba(120, 95, 70, 0.88);
  animation: huimengyuQixiFadeUp .9s ease 1.62s both;
}

@keyframes huimengyuQixiFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 点击关闭提示 */
.huimengyu-qixi-egg__close-hint {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 9px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.26em;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}

.huimengyu-qixi-egg__close-hint--show {
  opacity: 1;
}

@media (max-height: 880px) {
  .huimengyu-qixi-egg__card { padding: 24px 22px 22px; }
  .huimengyu-qixi-egg__title { font-size: 30px; }
}

/* ========== 聊天流七夕祝福卡片（type:"card" 气泡） ========== */
.huimengyu-message-bubble--card {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.huimengyu-qixi-card {
  width: 284px;
  max-width: 100%;
  padding: 14px 16px 12px;
  border-radius: 18px;
  background: linear-gradient(165deg, #fffdf9 0%, #faf4ec 58%, #f3e9dc 100%);
  border: 1px solid rgba(160, 130, 100, 0.16);
  box-shadow:
    0 10px 24px rgba(20, 22, 26, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.huimengyu-qixi-card__title {
  font-family: "KaiTi", "STKaiti", "Kaiti SC", "楷体", serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #3a2f26;
  text-align: center;
}

.huimengyu-qixi-card__title .huimengyu-qixi-card__heart {
  display: inline-block;
  font-size: 13px;
  color: rgba(190, 130, 130, 0.75);
  margin-right: 2px;
}

.huimengyu-qixi-card__saying {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: rgba(96, 80, 62, 0.82);
  text-align: center;
}

.huimengyu-qixi-card__foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(160, 130, 100, 0.35);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgba(120, 95, 70, 0.86);
  text-align: right;
}
