/* --- Modern Loading Animation CSS --- */

:root {
  /* 定义主题色，方便修改 */
  --theme-color: #839dff;
  --theme-glow: rgba(131, 157, 255, 0.6);
}

#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1a1a1a; 
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 1.5s ease; 
}

#loadingOverlay.fadeOut {
  opacity: 0;
  pointer-events: none; /* 淡出后不再响应鼠标事件 */
}

#loadingContainer {
  text-align: center;
  width: 80%;
  max-width: 400px;
}

#loadingText {
  color: #fff;
  font-size: 2.5em;
  font-family: 'Gochi Hand', "Segoe Script", "Segoe UI";
  text-shadow: 0 0 10px var(--theme-glow);
  margin-bottom: 25px;
  user-select: none;
  font-size-adjust: 0.35;
  opacity: 0;
  animation: fadeIn 1.5s ease-in-out 0.1s forwards;
}

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

#progressBar {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden; /* 确保填充条不会超出边框 */
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

#progressBarFill {
  width: 0%; /* 初始宽度为0，由JS控制 */
  height: 100%;
  background: linear-gradient(90deg, #a7b7ff, var(--theme-color)); /* 漂亮的渐变色 */
  border-radius: 4px;
 transition: width 0.7s ease-out;
}

#progressText {
  color: #ccc;
  font-size: 1em;
  font-family: "Arial", "Segoe UI", "Microsoft Yahei", "黑体", "sans-serif";
  margin-top: 15px;
  user-select: none;
  letter-spacing: 1px;
}

#progress {
  font-weight: bold;
  color: #fff;
}

/* 适配移动端 */
@media only screen and (max-width: 767px) {
  #loadingText {
    font-size: 1.8em;
  }
}

/* 加载自定义字体 */
@font-face {
  font-family: 'Gochi Hand';
  src: url('https://lib.baomitu.com/fonts/gochi-hand/gochi-hand-regular.woff2') format('woff2'),
       url('/assets/fonts/gochi-hand-regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}