/* 欢迎弹窗整体遮罩 */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.welcome-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* 中间卡片 */
.welcome-card {
  position: relative;
  width: 320px;
  max-width: 90%;
  padding: 24px 20px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff7ff, #f2f6ff);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
  text-align: center;
  overflow: hidden;
}

.welcome-title {
  font-size: 22px;
  font-weight: 700;
  color: #ff7aa5;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.welcome-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

/* 可爱表情头像圆圈 */
.welcome-mascot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: radial-gradient(circle at 30% 20%, #fff, #ffe3f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  animation: welcome-bounce 1.2s ease-in-out infinite;
}

/* 底部按钮 */
.welcome-btn {
  display: inline-block;
  padding: 8px 22px;
  margin-top: 4px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ff9ac2, #ff7aa5);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(255, 122, 165, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.welcome-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 18px rgba(255, 122, 165, 0.5);
}

/* 右上角关闭按钮 */
.welcome-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  font-size: 14px;
  cursor: pointer;
  color: #999;
  line-height: 22px;
  text-align: center;
}

.welcome-close:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* 背景飘动的小元素 */
.welcome-bubble {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 181, 208, 0.7);
  animation: welcome-float 4s ease-in-out infinite alternate;
}

.welcome-bubble.b1 {
  top: -8px;
  left: 18px;
  animation-delay: 0s;
}

.welcome-bubble.b2 {
  top: 10px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: rgba(162, 189, 255, 0.75);
  animation-delay: 0.6s;
}

.welcome-bubble.b3 {
  bottom: -6px;
  left: 40px;
  width: 16px;
  height: 16px;
  background: rgba(255, 223, 155, 0.8);
  animation-delay: 1.1s;
}

/* 文字打字机效果 */
.welcome-typing {
  display: inline-block;
  white-space: nowrap;
  border-right: 2px solid rgba(255, 122, 165, 0.8);
  overflow: hidden;
  animation: welcome-typing 2.4s steps(16, end), welcome-caret 0.8s step-end infinite;
}

/* 关键帧动画 */
@keyframes welcome-bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.05);
  }
}

@keyframes welcome-float {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(8px, -10px, 0) scale(1.1);
  }
}

@keyframes welcome-typing {
  from {
    width: 0;
  }
  to {
    width: 16ch;
  }
}

@keyframes welcome-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: rgba(255, 122, 165, 0.9);
  }
}

@media (max-width: 480px) {
  .welcome-card {
    width: 280px;
    padding: 20px 16px 16px;
  }

  .welcome-title {
    font-size: 20px;
  }
}

