/* loading.css - 温暖自然文字版（亮背景优化 + hover交互） */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a1a; /* 初始深色底 */
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 1.5s ease-out 0.8s; /* 背景晚点淡出 */
  overflow: hidden;
  cursor: default; /* 默认指针 */
}

#loading-overlay.fade-out {
  opacity: 0;
}

/* 文字容器：白色半透底 + 毛玻璃（适合亮背景） */
.loading-content {
  background: rgba(255, 255, 255, 0.85); /* 白底半透，温暖突出 */
  backdrop-filter: blur(10px); /* 轻毛玻璃 */
  border-radius: 28px;
  padding: 3.5rem 4.5rem;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4); /* 柔和阴影 */
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out; /* hover 平滑 */
  cursor: pointer; /* 鼠标放上变手指针，提示交互 */
}

#loading-overlay.bg-loaded .loading-content {
  opacity: 1;
  transform: translateY(0);
}

/* 出场：文字先淡出 */
#loading-overlay.fade-out .loading-content {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

/* hover 交互动画（鼠标放上） */
.loading-content:hover {
  transform: translateY(-8px) scale(1.03); /* 轻微上浮 + 放大 */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); /* 阴影增强 */
}

/* 光晕（hover 时加速） */
.pulse-glow {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(100, 150, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 4s ease-in-out infinite;
  position: relative;
  margin-bottom: 2rem;
  transition: animation-duration 0.6s;
}

.loading-content:hover .pulse-glow {
  animation-duration: 2s; /* hover 时脉冲加速 */
}

.pulse-glow::after {
  content: '';
  position: absolute;
  inset: 30px;
  background: radial-gradient(circle, rgba(150, 200, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 4s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* 主文字：深灰 + 自然字体 */
#loading-text {
  font-size: 2.8rem;
  font-weight: 500;
  letter-spacing: 3px;
  margin: 0 0 1.4rem;
  color: #222222; /* 深灰，自然不刺眼 */
  text-shadow: 0 2px 8px rgba(0,0,0,0.3); /* 轻影，防冲突 */
}

/* 子文字：稍浅深灰 + 更大 */
#loading-subtext {
  font-size: 1.45rem;
  color: #444444;
  opacity: 0.95;
  line-height: 1.9;
  text-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

#main-content {
  display: none;
}

/* 手机版适配 */
@media (max-width: 768px) {
  #loading-overlay {
    padding: 1rem; /* 小屏减少 padding */
    font-size: 16px; /* 基础字体 */
  }

  .loading-content {
    padding: 1.5rem 1rem; /* 缩小内边距 */
    max-width: 95%; /* 几乎全宽 */
    border-radius: 16px;
  }

  #loading-text {
    font-size: 2rem; /* 主标题缩小但仍醒目 */
    letter-spacing: 2px; /* 别太挤 */
    line-height: 1.3;
  }

  #loading-subtext {
    font-size: 1.1rem; /* 子文字适中 */
    line-height: 1.6;
  }

  /* 强制文字居中 + 垂直居中优化 */
  .loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center !important; /* 强制居中 */
  }

  .pulse-glow {
    width: 140px;
    height: 140px; /* 小屏光晕缩小 */
    margin-bottom: 1rem;
  }
}

/* 超小屏（如 iPhone SE） */
@media (max-width: 480px) {
  #loading-text {
    font-size: 1.8rem;
  }
  #loading-subtext {
    font-size: 1rem;
  }
}