/**
 * 蛋挞云 Eggtart Cloud (B03) - 金色 3D 蛋挞入场动画样式
 * Golden Conversion Intro Styles
 */

/* 默认入场层覆盖在页面上方，但绝不阻止搜索引擎抓取与底层正文渲染 */
#golden-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at center, #FFF8EC 0%, #F5E8D8 50%, #ECE0D0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
  pointer-events: auto;
}

#golden-intro-overlay.intro-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 跳过按钮 */
.intro-skip-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #E8BE79;
  color: #593A29;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(89, 58, 41, 0.08);
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.intro-skip-btn:hover {
  background: #FF8A35;
  color: #FFFFFF;
  border-color: #FF8A35;
  transform: translateY(-1px);
}

/* 舞台容器 */
.intro-stage {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

/* 金色 3D 蛋挞模型容器 */
.golden-tart-3d {
  position: relative;
  width: 140px;
  height: 140px;
  transform-style: preserve-3d;
  animation: tartSpin3D 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes tartSpin3D {
  0% {
    transform: scale(0.4) rotateX(45deg) rotateY(0deg) rotateZ(0deg);
    opacity: 0;
  }
  25% {
    transform: scale(1.05) rotateX(25deg) rotateY(180deg) rotateZ(10deg);
    opacity: 1;
    filter: drop-shadow(0 0 25px rgba(232, 190, 121, 0.8));
  }
  60% {
    transform: scale(1) rotateX(15deg) rotateY(540deg) rotateZ(-5deg);
    opacity: 1;
  }
  85% {
    transform: scale(0.85) rotateX(0deg) rotateY(720deg) rotateZ(0deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(0) rotateX(0deg) rotateY(720deg);
    opacity: 0;
  }
}

/* 蛋挞 SVG 造型与分层焦糖光泽 */
.tart-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 24px rgba(185, 93, 24, 0.25));
}

/* 四个流量数据标签与分解模块 */
.traffic-modules-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.traffic-module-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 36px;
  margin-top: -18px;
  margin-left: -34px;
  background: #FFFFFF;
  border: 1.5px solid #FF8A35;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 6px 16px rgba(255, 138, 53, 0.2);
  opacity: 0;
}

.traffic-module-node .val {
  font-size: 13px;
  font-weight: 800;
  color: #B95D18;
  line-height: 1;
}

.traffic-module-node .lbl {
  font-size: 9px;
  color: #806C5B;
  transform: scale(0.9);
}

/* 四个模块分解与扩散动画 */
.node-99gb {
  animation: burstNode1 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.node-168gb {
  animation: burstNode2 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.node-388gb {
  animation: burstNode3 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.node-888gb {
  animation: burstNode4 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes burstNode1 {
  0%, 25% { transform: translate(0, 0) scale(0.2); opacity: 0; }
  50% { transform: translate(-100px, -60px) scale(1); opacity: 1; }
  80% { transform: translate(-40px, 40px) scale(0.9); opacity: 0.9; }
  100% { transform: translate(0, 50px) scale(0); opacity: 0; }
}

@keyframes burstNode2 {
  0%, 25% { transform: translate(0, 0) scale(0.2); opacity: 0; }
  50% { transform: translate(100px, -60px) scale(1); opacity: 1; }
  80% { transform: translate(40px, 40px) scale(0.9); opacity: 0.9; }
  100% { transform: translate(0, 50px) scale(0); opacity: 0; }
}

@keyframes burstNode3 {
  0%, 25% { transform: translate(0, 0) scale(0.2); opacity: 0; }
  50% { transform: translate(-100px, 60px) scale(1); opacity: 1; }
  80% { transform: translate(-20px, 20px) scale(0.9); opacity: 0.9; }
  100% { transform: translate(0, 50px) scale(0); opacity: 0; }
}

@keyframes burstNode4 {
  0%, 25% { transform: translate(0, 0) scale(0.2); opacity: 0; }
  50% { transform: translate(100px, 60px) scale(1); opacity: 1; }
  80% { transform: translate(20px, 20px) scale(0.9); opacity: 0.9; }
  100% { transform: translate(0, 50px) scale(0); opacity: 0; }
}

/* 第四阶段：品牌重组文字淡入与组合 */
.intro-brand-recombine {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  animation: brandRecombineFade 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  pointer-events: none;
  width: 320px;
}

@keyframes brandRecombineFade {
  0%, 75% { opacity: 0; transform: translate(-50%, -40%) scale(0.8); }
  90% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.intro-brand-en {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Montserrat, sans-serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #593A29;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}

.intro-brand-zh {
  font-size: 28px;
  font-weight: 800;
  color: #B95D18;
  letter-spacing: 4px;
  margin: 4px 0 6px;
}

.intro-brand-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #806C5B;
  text-transform: uppercase;
}

/* 金色科技环路连线 */
.golden-circuits {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
}

/* 针对减弱动画或无障碍配置 */
@media (prefers-reduced-motion: reduce) {
  #golden-intro-overlay {
    display: none !important;
  }
}

/* 针对移动端优化（加快动画时间约 0.9s） */
@media (max-width: 768px) {
  .golden-tart-3d {
    animation-duration: 1.0s;
  }
  .node-99gb, .node-168gb, .node-388gb, .node-888gb {
    animation-duration: 1.0s;
  }
  .intro-brand-recombine {
    animation-duration: 1.0s;
  }
}
