/* ============================================ */
/* ============ 开机启动动画 ================= */
/* ============================================ */

/* ---------- BIOS 屏 ---------- */
.boot-bios {
  position: fixed;
  inset: 0;
  background: #000;
  color: #c0c0c0;
  font-family: 'SF Mono', 'Courier New', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 40px 50px;
  z-index: 99999;
  overflow: hidden;
  user-select: none;
}
.boot-bios::before {
  /* CRT 扫描线 */
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,.03) 0px,
    rgba(255,255,255,.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 10;
}
.boot-bios::after {
  /* 屏幕泛光 */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.6) 100%);
  pointer-events: none;
  z-index: 11;
}
.bios-header {
  color: #fff;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-size: 15px;
}
.bios-header::before {
  content: '█ ';
  color: #0f0;
}
.bios-logo {
  color: #0f0;
  font-weight: bold;
  font-size: 20px;
  letter-spacing: 4px;
  margin-bottom: 6px;
  text-shadow: 0 0 10px rgba(0,255,0,.7);
}
.bios-sub {
  color: #888;
  font-size: 12px;
  margin-bottom: 24px;
}
.bios-info {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 40px;
  margin-bottom: 20px;
  max-width: 600px;
}
.bios-info span:nth-child(odd) { color: #888; }
.bios-info span:nth-child(even) { color: #ccc; }
.bios-log {
  color: #aaa;
  font-size: 13px;
  max-height: 200px;
  overflow: hidden;
}
.bios-log div {
  animation: biosLineIn .1s ease-out;
}
.bios-log .ok { color: #0f0; }
.bios-log .warn { color: #ff0; }
.bios-log .err { color: #f44; }
@keyframes biosLineIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: none; }
}
.bios-cursor {
  display: inline-block;
  width: 9px;
  height: 14px;
  background: #0f0;
  animation: blink 1s infinite;
  vertical-align: middle;
  margin-left: 4px;
}
.bios-bottom {
  position: absolute;
  bottom: 30px;
  left: 50px;
  right: 50px;
  display: flex;
  justify-content: space-between;
  color: #666;
  font-size: 12px;
  border-top: 1px solid #333;
  padding-top: 10px;
}

/* ---------- 引导加载屏 ---------- */
.boot-loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, #0d1219 0%, #03060a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  z-index: 99998;
  color: #cbd5e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}
.boot-logo-big {
  width: 100px;
  height: 100px;
  border-radius: 26px;
  background: linear-gradient(145deg, #3b82f6, #1e40af);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(59,130,246,.5), 0 0 80px rgba(59,130,246,.3);
  animation: logoIn 1.2s cubic-bezier(.2,.9,.3,1.4);
}
.boot-logo-big svg {
  width: 52px;
  height: 52px;
  stroke: white;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes logoIn {
  0% { opacity: 0; transform: scale(.3) rotate(-30deg); }
  60% { transform: scale(1.15) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.boot-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  opacity: 0;
  animation: fadeUp .8s .6s ease-out forwards;
  text-shadow: 0 0 30px rgba(59,130,246,.5);
}
.boot-subtitle {
  font-size: 13px;
  color: #6b7d99;
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeUp .8s .9s ease-out forwards;
  margin-top: -18px;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.boot-progress-wrap {
  width: 300px;
  max-width: 70vw;
  opacity: 0;
  animation: fadeUp .8s 1.2s ease-out forwards;
  margin-top: 10px;
}
.boot-progress-bar {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.boot-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
  border-radius: 2px;
  transition: width .3s ease;
  box-shadow: 0 0 12px rgba(59,130,246,.7);
}
.boot-progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: #6b7d99;
  font-family: 'SF Mono', monospace;
}
.boot-progress-text .status { color: #8899b0; }
.boot-progress-text .percent { color: #93c5fd; }

/* 转圈 spinner */
.boot-spinner {
  position: absolute;
  bottom: 60px;
  width: 40px;
  height: 40px;
  opacity: 0;
  animation: fadeUp .5s 2s ease-out forwards;
}
.boot-spinner::before,
.boot-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}
.boot-spinner::before {
  border-top-color: #3b82f6;
  border-right-color: #3b82f6;
  animation: spin 1s linear infinite;
}
.boot-spinner::after {
  inset: 6px;
  border-top-color: #93c5fd;
  border-left-color: #93c5fd;
  animation: spin .8s linear infinite reverse;
}

/* ---------- 登录后加载中 ---------- */
.login-loading {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0a0e14 0%, #101828 50%, #0a0e14 100%);
  z-index: 99997;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  animation: fadeIn .5s ease-out;
}
.login-loading .user-badge {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b82f6, #1e40af);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: white;
  box-shadow: 0 12px 40px rgba(59,130,246,.5), 0 0 60px rgba(59,130,246,.25);
  animation: pulseUser 2s ease-in-out infinite;
}
@keyframes pulseUser {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 40px rgba(59,130,246,.5); }
  50% { transform: scale(1.05); box-shadow: 0 16px 50px rgba(59,130,246,.7); }
}
.login-loading .welcome-text {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  animation: fadeUp .6s .3s ease-out forwards;
}
.login-loading .loading-tip {
  font-size: 13px;
  color: #6b7d99;
  opacity: 0;
  animation: fadeUp .6s .6s ease-out forwards;
}
.login-loading .loader-spinner {
  margin-top: 10px;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(59,130,246,.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.login-loading .progress-steps {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #6b7d99;
  font-family: 'SF Mono', monospace;
  min-width: 220px;
}
.login-loading .progress-steps .step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp .4s ease-out forwards;
}
.login-loading .progress-steps .step.done { color: #68d391; }
.login-loading .progress-steps .step.active { color: #93c5fd; }
.login-loading .progress-steps .step .icon {
  width: 12px;
  display: inline-block;
  text-align: center;
}

/* ---------- 关机 / 重启 ---------- */
.boot-shutdown {
  position: fixed;
  inset: 0;
  background: #000;
  color: #0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 100000;
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 15px;
  animation: fadeIn .3s;
}
.boot-shutdown .spin {
  width: 36px;
  height: 36px;
  border: 3px solid #0f0;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.boot-shutdown .msg {
  color: #ccc;
  font-size: 14px;
}

/* 通用动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 淡出 */
.boot-fade-out {
  animation: fadeOut .6s ease-in forwards;
}