/* ============================================
   科幻启动页样式
   ============================================ */

/* 启动页遮罩层 */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  /* 深邃银河背景 */
  background:
    radial-gradient(ellipse at 25% 20%, rgba(124, 58, 237, 0.32), transparent 55%),
    radial-gradient(ellipse at 75% 30%, rgba(56, 189, 248, 0.18), transparent 50%),
    radial-gradient(ellipse at 60% 85%, rgba(79, 110, 247, 0.24), transparent 55%),
    radial-gradient(ellipse at 40% 60%, rgba(168, 85, 247, 0.14), transparent 50%),
    linear-gradient(180deg, #0b1030 0%, #070b22 50%, #030512 100%);
  color: #eafcff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* 深邃渐变层：爆炸后背景变得更深邃 */
.splash-deep {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(88, 28, 135, 0.35), transparent 55%),
    radial-gradient(ellipse at 70% 70%, rgba(30, 58, 138, 0.30), transparent 55%),
    radial-gradient(ellipse at 50% 45%, rgba(49, 46, 129, 0.22), transparent 60%),
    linear-gradient(180deg, #050814 0%, #03040c 55%, #01020a 100%);
  opacity: 0;
  transition: opacity 2.2s ease;
  pointer-events: none;
}

.splash.bursting .splash-deep {
  opacity: 1;
}

/* 银河光带 */
.splash::before {
  content: "";
  position: absolute;
  inset: -25%;
  background: linear-gradient(
    115deg,
    transparent 34%,
    rgba(148, 163, 255, 0.10) 44%,
    rgba(125, 249, 255, 0.06) 50%,
    rgba(216, 180, 254, 0.08) 56%,
    transparent 66%
  );
  transform: rotate(-12deg);
  pointer-events: none;
}

/* 离开动画 */
.splash.leaving {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

/* 粒子画布 */
#splashCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 科幻网格背景（CSS 绘制 + 视差） */
.splash-grid {
  position: absolute;
  inset: -60px;
  background-image:
    linear-gradient(rgba(79, 110, 247, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 110, 247, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  transition: transform 0.2s ease-out, opacity 1.2s ease;
  will-change: transform;
  opacity: 0.75;
}

/* 引爆后网格淡出 */
.splash.bursting .splash-grid {
  opacity: 0;
}

/* 中央内容 */
.splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
}

.splash-status {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  letter-spacing: 0.35em;
  color: #7df9ff;
  opacity: 0.8;
  margin-bottom: 28px;
  animation: blink 1.6s steps(1) infinite;
}

.splash-title {
  font-size: clamp(44px, 9vw, 96px);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #eafcff;
  text-shadow:
    0 0 10px rgba(125, 249, 255, 0.9),
    0 0 32px rgba(79, 110, 247, 0.8),
    0 0 80px rgba(124, 58, 237, 0.6);
  margin-bottom: 10px;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { text-shadow: 0 0 10px rgba(125, 249, 255, 0.7), 0 0 32px rgba(79, 110, 247, 0.6), 0 0 80px rgba(124, 58, 237, 0.4); }
  to   { text-shadow: 0 0 14px rgba(125, 249, 255, 1), 0 0 48px rgba(79, 110, 247, 1), 0 0 110px rgba(124, 58, 237, 0.8); }
}

.splash-sub {
  font-size: clamp(14px, 2.4vw, 20px);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: #9fb6ff;
  margin-bottom: 56px;
}

.splash-enter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border: 1px solid rgba(125, 249, 255, 0.6);
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: #7df9ff;
  background: rgba(79, 110, 247, 0.08);
  box-shadow: 0 0 24px rgba(79, 110, 247, 0.35), inset 0 0 18px rgba(79, 110, 247, 0.15);
  animation: blink 2s ease-in-out infinite;
  transition: background 0.3s, box-shadow 0.3s;
}

.splash-enter:hover {
  background: rgba(79, 110, 247, 0.2);
  box-shadow: 0 0 36px rgba(79, 110, 247, 0.6), inset 0 0 24px rgba(79, 110, 247, 0.25);
}

.splash-hint {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: #5a6c9e;
  z-index: 2;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* 进入时的内容动画 */
.splash-content > * {
  opacity: 0;
  transform: translateY(18px);
  animation: splashIn 0.9s ease forwards;
}

.splash-status { animation-delay: 0.15s; }
.splash-title  { animation-delay: 0.35s; }
.splash-sub    { animation-delay: 0.55s; }
.splash-enter  { animation-delay: 0.75s; }

@keyframes splashIn {
  to { opacity: 1; transform: translateY(0); }
}

/* 锁定页面滚动（JS 添加/移除） */
body.splash-lock {
  overflow: hidden;
}
