/* 智能语音控台 — 首屏/刷新 Loading，模拟「通话中」声纹与接通动效（不依赖 Vue 打包） */

body.app-splash-active {
  overflow: hidden;
}

#app-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #ecfdf5;
  background:
    radial-gradient(ellipse 100% 80% at 50% -10%, rgba(45, 212, 191, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #0c1222 0%, #0f172a 40%, #0a1628 100%);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

#app-splash.app-splash--exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 42%, black 15%, transparent 70%);
  pointer-events: none;
}

/* 声波扩散涟漪（通话中向外扩散） */
.app-splash__ripples {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 100px;
  height: 100px;
  margin: -50px 0 0 -50px;
  pointer-events: none;
}

.app-splash__ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.15);
  animation: app-splash-ripple 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.app-splash__ripple:nth-child(2) {
  animation-delay: 0.85s;
}

.app-splash__ripple:nth-child(3) {
  animation-delay: 1.7s;
}

@keyframes app-splash-ripple {
  0% {
    transform: scale(0.45);
    opacity: 0.65;
  }
  100% {
    transform: scale(4.2);
    opacity: 0;
  }
}

.app-splash__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  margin-top: -4vh;
}

/* 接通状态角标 */
.app-splash__call-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  margin-bottom: 22px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #a7f3d0;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(45, 212, 191, 0.35);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.12);
  backdrop-filter: blur(8px);
}

.app-splash__call-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: app-splash-pulse-dot 1.35s ease-out infinite;
}

@keyframes app-splash-pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(52, 211, 153, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    transform: scale(1);
  }
}

/* 语音波形条（通话中能量条） */
.app-splash__wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 76px;
  margin-bottom: 28px;
  padding: 0 8px;
}

.app-splash__wave-bar {
  width: 5px;
  height: 40%;
  min-height: 8px;
  border-radius: 3px;
  transform-origin: center bottom;
  background: linear-gradient(180deg, #6ee7b7 0%, #2dd4bf 45%, #0d9488 100%);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.45);
  animation: app-splash-wave 0.85s ease-in-out infinite;
}

.app-splash__wave-bar:nth-child(1) {
  animation-delay: 0s;
}
.app-splash__wave-bar:nth-child(2) {
  animation-delay: 0.05s;
}
.app-splash__wave-bar:nth-child(3) {
  animation-delay: 0.1s;
}
.app-splash__wave-bar:nth-child(4) {
  animation-delay: 0.15s;
}
.app-splash__wave-bar:nth-child(5) {
  animation-delay: 0.2s;
}
.app-splash__wave-bar:nth-child(6) {
  animation-delay: 0.25s;
}
.app-splash__wave-bar:nth-child(7) {
  animation-delay: 0.3s;
}
.app-splash__wave-bar:nth-child(8) {
  animation-delay: 0.35s;
}
.app-splash__wave-bar:nth-child(9) {
  animation-delay: 0.4s;
}
.app-splash__wave-bar:nth-child(10) {
  animation-delay: 0.45s;
}
.app-splash__wave-bar:nth-child(11) {
  animation-delay: 0.5s;
}
.app-splash__wave-bar:nth-child(12) {
  animation-delay: 0.55s;
}
.app-splash__wave-bar:nth-child(13) {
  animation-delay: 0.5s;
}
.app-splash__wave-bar:nth-child(14) {
  animation-delay: 0.45s;
}
.app-splash__wave-bar:nth-child(15) {
  animation-delay: 0.4s;
}
.app-splash__wave-bar:nth-child(16) {
  animation-delay: 0.35s;
}
.app-splash__wave-bar:nth-child(17) {
  animation-delay: 0.3s;
}
.app-splash__wave-bar:nth-child(18) {
  animation-delay: 0.25s;
}
.app-splash__wave-bar:nth-child(19) {
  animation-delay: 0.15s;
}
.app-splash__wave-bar:nth-child(20) {
  animation-delay: 0.08s;
}

@keyframes app-splash-wave {
  0%,
  100% {
    transform: scaleY(0.35);
    opacity: 0.65;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.app-splash__title {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 3.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #f0fdfa;
  text-shadow:
    0 0 28px rgba(45, 212, 191, 0.35),
    0 2px 20px rgba(0, 0, 0, 0.5);
}

.app-splash__status {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(167, 243, 208, 0.72);
  letter-spacing: 0.06em;
}

.app-splash__dots span {
  display: inline-block;
  animation: app-splash-dot-breathe 1.1s ease-in-out infinite;
  opacity: 0.35;
}

.app-splash__dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.app-splash__dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes app-splash-dot-breathe {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

/* 底部：语音链路 / 加载进度感 */
.app-splash__footer {
  position: absolute;
  bottom: 9vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(400px, 88vw);
  z-index: 2;
}

.app-splash__progress-label {
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(153, 246, 228, 0.45);
  margin-bottom: 10px;
  text-align: center;
}

.app-splash__progress-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.app-splash__progress-fill {
  height: 100%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #2dd4bf, #5eead4, #2dd4bf, #0d9488);
  background-size: 220% 100%;
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.55);
  animation: app-splash-progress 1.85s ease-in-out infinite;
}

@keyframes app-splash-progress {
  0% {
    transform: translateX(-105%);
    background-position: 0% 50%;
  }
  55% {
    transform: translateX(40%);
    background-position: 100% 50%;
  }
  100% {
    transform: translateX(220%);
    background-position: 0% 50%;
  }
}
