/* ============ 载入动画独立样式 ============ */
/* 深浅模式由 JS 根据 ?mode= 参数在 body 上切换 light / dark 类 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: 'Inter', system-ui, Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 全屏遮罩：默认日间 #ededed，夜间纯黑 */
.splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #ededed;
  transition: opacity 0.3s;
}

/* 内容容器：整体略微上移 */
.splash-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4rem;
}

/* Logo：通过 ?logo=url 参数显示，无参数时隐藏 */
.splash-logo {
  width: 175px;
  height: 175px;
  object-fit: contain;
  margin-bottom: 3rem;
}

.splash-logo[hidden] {
  display: none;
}

/* 加载进度条轨道：w-32, h-1, 圆角, 灰色底 */
.progress-track {
  width: 8rem;
  height: 0.25rem;
  border-radius: 9999px;
  overflow: hidden;
  background-color: #e5e7eb; /* gray-200 */
}

/* 进度条：由 JS 控制宽度，慢速增长 */
.progress-bar {
  height: 100%;
  border-radius: 9999px;
  background-color: #1f2937; /* gray-800 */
  transition: width 0.3s ease-out;
}

/* 底部区域：状态文字，水平居中 */
.splash-footer {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  text-align: center;
}

.splash-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280; /* gray-500 */
}

/* ============ 夜间模式（body.dark） ============ */
body.dark .splash {
  background-color: #000;
}

body.dark .progress-track {
  background-color: #374151; /* gray-700 */
}

body.dark .progress-bar {
  background-color: #fff;
}

body.dark .splash-status {
  color: #d1d5db; /* gray-300 */
}
