/* =========================================================
   星环设计 - 彩蛋样式（easter-egg.css）
   主界面连续点击 6 次页头 logo 触发：
   全屏遮罩 + SVG 线条描边动画，逐步"画"出星环设计 logo。
   ========================================================= */

/* ---------- 全屏遮罩 ---------- */
.egg-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at center, rgba(15, 28, 60, 0.94), rgba(4, 8, 20, 0.97));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.egg-overlay.show { opacity: 1; }

.egg-svg {
  width: min(440px, 80vw);
  height: auto;
  overflow: visible;
}

/* ---------- 线条描边动画（pathLength=1 统一节奏） ---------- */
.egg-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.egg-overlay.show .egg-ring {
  animation: eggDraw 1.3s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.2s;
}
.egg-overlay.show .egg-ring2 {
  animation: eggDraw 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.6s;
}
@keyframes eggDraw {
  to { stroke-dashoffset: 0; }
}

/* ---------- 轨道卫星：出现后绕轨道旋转 ---------- */
.egg-moon-g {
  opacity: 0;
  transform-origin: 180px 140px;
}
.egg-overlay.show .egg-moon-g {
  animation:
    eggMoonSpin 7s linear infinite 1.7s,
    eggMoonIn 0.5s ease forwards 1.7s;
}
@keyframes eggMoonSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes eggMoonIn {
  to { opacity: 1; }
}

/* ---------- PPT 字样：先描边"写"出轮廓，再渐变填充淡入 ---------- */
.egg-text-stroke {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}
.egg-overlay.show .egg-text-stroke {
  animation: eggWrite 1.9s cubic-bezier(0.5, 0, 0.3, 1) forwards 1.4s;
}
@keyframes eggWrite {
  to { stroke-dashoffset: 0; }
}

.egg-text-fill { opacity: 0; }
.egg-overlay.show .egg-text-fill {
  animation: eggFillIn 1.1s ease forwards 3s;
}
@keyframes eggFillIn {
  to { opacity: 1; }
}

/* ---------- 点缀星星：错峰闪烁 ---------- */
.egg-star {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.egg-overlay.show .egg-star {
  animation: eggTwinkle 2.4s ease-in-out infinite;
}
.egg-overlay.show .egg-s1 { animation-delay: 2.4s; }
.egg-overlay.show .egg-s2 { animation-delay: 3.1s; }
.egg-overlay.show .egg-s3 { animation-delay: 3.8s; }
@keyframes eggTwinkle {
  0%   { opacity: 0; transform: scale(0.2) rotate(0deg); }
  35%  { opacity: 1; transform: scale(1.15) rotate(20deg); }
  55%  { opacity: 0.55; transform: scale(0.85) rotate(30deg); }
  75%  { opacity: 1; transform: scale(1) rotate(40deg); }
  100% { opacity: 0; transform: scale(0.2) rotate(60deg); }
}

/* ---------- 底部文字与关闭提示 ---------- */
.egg-sub {
  opacity: 0;
  letter-spacing: 10px;
}
.egg-overlay.show .egg-sub {
  animation: eggFillIn 1s ease forwards 3.4s;
}
.egg-hint {
  margin-top: 26px;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.65);
  letter-spacing: 2px;
  opacity: 0;
}
.egg-overlay.show .egg-hint {
  animation: eggFillIn 0.8s ease forwards 4.2s;
}

/* ---------- 手机端微调 ---------- */
@media (max-width: 640px) {
  .egg-hint { font-size: 12px; }
}
