/* ════════════════════════════════════════════════════
   🍎 macOS 风格 BIE 启动页 (深度仿真版本)
   ════════════════════════════════════════════════════ */

/* 重写 .boot-splash 为 macOS 毛玻璃风格 */
.boot-splash {
  padding: 48px;
  justify-content: space-between;
  gap: 0;
  background: rgba(15, 15, 18, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.boot-container {
  display: flex;
  gap: 48px;
  width: 100%;
  max-width: 1600px;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 3;
}

.boot-main {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── macOS 风格 Logo ── */
.boot-logo {
  font-size: 56px;
  font-weight: 100;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  position: relative;
  z-index: 3;
  display: flex;
  gap: 8px;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto;
  line-height: 1;
}

.boot-logo span {
  opacity: 0;
  animation: boot-letter-in-mac 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  will-change: transform, opacity, filter;
}

.bl-b { animation-delay: 0.05s; color: #388bfd; }
.bl-i { animation-delay: 0.15s; color: #00d4ff; }
.bl-e { animation-delay: 0.25s; color: #c4b5fd; }

@keyframes boot-letter-in-mac {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.boot-fullname {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  text-transform: uppercase;
  opacity: 0;
  animation: boot-text-in-mac 0.4s ease 0.3s forwards;
  position: relative;
  z-index: 2;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto;
  font-weight: 500;
}

.boot-tagline {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0;
  animation: boot-text-in-mac 0.4s ease 0.4s forwards;
  position: relative;
  z-index: 2;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto;
  font-weight: 400;
}

@keyframes boot-text-in-mac {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── macOS 风格日志 ── */
.boot-log {
  width: 100%;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  position: relative;
  z-index: 2;
  margin-top: 24px;
  padding-right: 8px;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

/* 毛玻璃滚动条 */
.boot-log::-webkit-scrollbar {
  width: 8px;
}
.boot-log::-webkit-scrollbar-track {
  background: transparent;
}
.boot-log::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.boot-log::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
  background-clip: padding-box;
}

.boot-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  animation: boot-line-in-mac 0.2s ease forwards;
  font-family: 'Menlo', monospace;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boot-line:hover {
  background: rgba(255, 255, 255, 0.04);
}

@keyframes boot-line-in-mac {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 日志元素 */
.bl-time {
  color: rgba(255, 255, 255, 0.25);
  min-width: 55px;
  font-size: 10px;
  font-family: 'Menlo', monospace;
}

.bl-module {
  color: rgba(255, 255, 255, 0.4);
  min-width: 70px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont;
}

.bl-msg {
  color: rgba(255, 255, 255, 0.65);
  flex: 1;
  font-size: 11px;
  font-family: 'Menlo', monospace;
}

.bl-status {
  font-weight: 700;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 状态样式 - 微妙的背景 */
.boot-line.bl-ok .bl-status {
  color: #34c759;
  background: rgba(52, 199, 89, 0.08);
}

.boot-line.bl-loading .bl-status {
  color: #ff9500;
  background: rgba(255, 149, 0, 0.08);
  animation: boot-loading-pulse-mac 0.8s ease-in-out infinite;
}

.boot-line.bl-ready .bl-status {
  color: #00aced;
  background: rgba(0, 172, 237, 0.08);
  font-weight: 700;
}

.boot-line.bl-info .bl-status {
  color: rgba(0, 172, 237, 0.6);
  background: rgba(0, 172, 237, 0.06);
}

@keyframes boot-loading-pulse-mac {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ── 右侧 macOS 风格面板 ── */
.boot-panel {
  width: 340px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  font-size: 11px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: boot-panel-in-mac 0.5s ease 0.2s forwards;
  opacity: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto;
}

@keyframes boot-panel-in-mac {
  to {
    opacity: 1;
  }
}

.boot-panel-title {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  letter-spacing: 0.08em;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  font-size: 10px;
}

/* 面板行 */
.boot-panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.boot-panel-label {
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 9px;
  min-width: 50px;
  font-weight: 600;
}

.boot-panel-val {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  text-align: right;
  flex: 1;
  font-family: 'Menlo', monospace;
  font-size: 12px;
}

/* 迷你进度条 - macOS 风格 */
.boot-bar-mini {
  width: 120px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1.5px;
  overflow: hidden;
  position: relative;
}

.boot-bar-mini::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(56, 139, 253, 0.7),
    rgba(0, 172, 237, 0.7));
  width: 0%;
  animation: boot-bar-mini-fill 2s ease-in-out forwards;
}

@keyframes boot-bar-mini-fill {
  to { width: 100%; }
}

/* 分隔符 */
.boot-panel-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* 实时内容区 */
.boot-panel-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boot-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 10px;
}

.boot-stat-label {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.boot-stat-val {
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Menlo', monospace;
  font-weight: 700;
  font-size: 11px;
}

/* CPU 脉冲指示 */
.boot-cpu-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #34c759;
  border-radius: 50%;
  animation: boot-cpu-pulse-anim 1.2s ease-in-out infinite;
}

@keyframes boot-cpu-pulse-anim {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* 模块加载列表 */
.boot-modules-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 100px;
  overflow-y: auto;
  padding-right: 6px;
}

.boot-modules-list::-webkit-scrollbar {
  width: 4px;
}
.boot-modules-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.boot-module-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  padding: 4px 0;
  animation: boot-module-slide 0.3s ease forwards;
}

@keyframes boot-module-slide {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.boot-module-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.boot-module-item.loaded .boot-module-dot {
  background: #34c759;
  animation: boot-module-loaded 0.6s ease-out;
}

@keyframes boot-module-loaded {
  0% {
    transform: scale(0);
    box-shadow: 0 0 8px #34c759;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 2px #34c759;
  }
}

.boot-module-item .boot-module-dot {
  transition: all 0.3s ease;
}

/* 加载中的点的脉冲效果 */
.boot-module-item .boot-module-dot::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 1px solid currentColor;
  border-radius: 50%;
  animation: boot-module-loading-pulse 1.5s ease-in-out infinite;
  opacity: 0;
}

/* ── 底部进度条 - macOS 风格 ── */
.boot-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  z-index: 3;
}

.boot-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    #388bfd 0%,
    #00d4ff 20%,
    #c4b5fd 40%,
    #f7853e 60%,
    #34c759 80%,
    #ff9500 100%);
  transform: translateX(-100%);
  animation: boot-progress-fill-mac 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes boot-progress-fill-mac {
  to { transform: translateX(0); }
}

/* ── 启动完成状态 ── */
.boot-splash.boot-complete {
  filter: drop-shadow(0 20px 60px rgba(0, 172, 237, 0.2));
}

.boot-complete-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #34c759;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: boot-complete-show 0.5s ease forwards;
}

@keyframes boot-complete-show {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 跳过提示 - macOS 风格 ── */
.boot-skip-hint {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  position: relative;
  z-index: 3;
  animation: boot-hint-fade 0.8s ease 0.8s forwards;
  opacity: 0;
  cursor: pointer;
  transition: color 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont;
  font-weight: 500;
}

.boot-skip-hint:hover {
  color: rgba(255, 255, 255, 0.5);
}

@keyframes boot-hint-fade {
  to {
    opacity: 1;
  }
}

/* 快速启动模式 */
.boot-fast-mode .boot-log {
  font-size: 9px;
}

.boot-fast-mode .boot-line {
  animation-duration: 0.1s;
}

/* ── 系统准备度条动画 ── */
@keyframes boot-readiness-fill {
  0% {
    width: 0%;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 1;
  }
}

/* ── 引擎状态徽章 ── */
.boot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 3px;
  text-transform: uppercase;
  animation: boot-badge-in 0.4s ease forwards;
  animation-delay: var(--badge-delay, 0s);
  transition: all 0.3s ease;
}

@keyframes boot-badge-in {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.boot-badge-active {
  color: #34c759;
  background: rgba(52, 199, 89, 0.15);
  border: 1px solid rgba(52, 199, 89, 0.3);
  box-shadow: inset 0 0 6px rgba(52, 199, 89, 0.1), 0 0 8px rgba(52, 199, 89, 0.25);
  animation: boot-badge-activate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes boot-badge-activate {
  0% {
    opacity: 0.5;
    transform: scale(0.9);
    box-shadow: inset 0 0 6px rgba(52, 199, 89, 0.1), 0 0 4px rgba(52, 199, 89, 0.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: inset 0 0 6px rgba(52, 199, 89, 0.1), 0 0 12px rgba(52, 199, 89, 0.35);
  }
}

.boot-badge-active::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #34c759;
  border-radius: 50%;
  margin-right: 4px;
  animation: boot-badge-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px #34c759;
}

@keyframes boot-badge-pulse {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 4px #34c759;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 10px #34c759;
  }
}

.boot-badge-inactive {
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.7;
}

/* ── 性能仪表 ── */
.boot-perf-gauge {
  width: 60px;
  height: 60px;
  position: relative;
  margin: 8px 0;
  z-index: 2;
}

.boot-perf-gauge::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    #ff5c6c 0deg,
    #f5c542 60deg,
    #34c759 120deg,
    #34c759 180deg
  );
  opacity: 0.3;
  filter: blur(0.5px);
}

.boot-perf-gauge::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgba(15, 15, 18, 0.8);
}

.boot-perf-needle {
  position: absolute;
  width: 2px;
  height: 18px;
  background: linear-gradient(to top, #00d4ff, transparent);
  bottom: 50%;
  left: 50%;
  transform-origin: center 18px;
  margin-left: -1px;
  z-index: 2;
  animation: boot-needle-sweep 3s ease-in-out forwards;
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
}

@keyframes boot-needle-sweep {
  0% {
    transform: rotate(-90deg);
  }
  100% {
    transform: rotate(45deg);
  }
}

.boot-perf-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 3;
}

.boot-perf-val {
  font-size: 14px;
  font-weight: 700;
  color: #00d4ff;
  font-family: 'Menlo', monospace;
}

.boot-perf-unit {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
}

/* ── 迷你监控指标 ── */
.boot-mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.boot-mini-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.boot-mini-val {
  font-size: 12px;
  font-weight: 700;
  font-family: 'Menlo', monospace;
  animation: boot-mini-val-pulse 2s ease-in-out infinite;
}

@keyframes boot-mini-val-pulse {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

/* ── 加载环 ── */
.boot-loading-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(0, 212, 255, 0.5);
  border-right-color: rgba(57, 211, 195, 0.5);
  border-radius: 50%;
  animation: boot-ring-spin 3s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes boot-ring-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
