/* ════════════════════════════════════════════════════
   🚀 PVE PrimeVenture Intelligence Boot — Premium Edition
   品驭引擎 · AI品牌生长操作系统启动序列
   ════════════════════════════════════════════════════ */

/* ── Base Container ── */
.boot-splash {
  padding: 0;
  justify-content: center;
  align-items: center;
  gap: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(16, 34, 72, 0.96) 0%, rgba(8, 16, 30, 0.98) 34%, rgba(3, 6, 12, 1) 100%),
    linear-gradient(180deg, rgba(5, 10, 18, 0.98) 0%, rgba(2, 5, 10, 1) 100%);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  overflow: hidden;
  perspective: 1800px;
  isolation: isolate;
  font-family: var(--font-text);
}

.boot-splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 720px at 50% 22%, rgba(59, 130, 246, 0.13), transparent 48%),
    radial-gradient(circle 520px at 22% 60%, rgba(56, 189, 248, 0.06), transparent 54%),
    radial-gradient(circle 520px at 84% 54%, rgba(167, 139, 250, 0.06), transparent 52%),
    linear-gradient(126deg, transparent 0%, transparent 15%, rgba(96, 165, 250, 0.06) 16%, rgba(96, 165, 250, 0.08) 17%, transparent 18%, transparent 82%, rgba(96, 165, 250, 0.06) 83%, rgba(96, 165, 250, 0.08) 84%, transparent 85%);
  pointer-events: none;
  z-index: 1;
  animation: boot-cockpit-breathe 8s ease-in-out infinite;
}

.boot-splash::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.10) 0%, transparent 34%),
    repeating-linear-gradient(90deg, transparent 0 56px, rgba(125, 211, 252, 0.04) 56px 57px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 18%, transparent 82%, rgba(8, 8, 12, 0.42) 100%);
  pointer-events: none;
  z-index: 1;
  transform: perspective(1600px) rotateX(78deg) scaleY(2.3);
  transform-origin: center 78%;
  opacity: 0.72;
  animation: boot-warp-floor 12s linear infinite;
}

.boot-container {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) 360px;
  gap: 36px;
  width: min(1480px, calc(100vw - 48px));
  height: min(780px, calc(100vh - 64px));
  min-height: 620px;
  position: relative;
  z-index: 3;
  padding: 42px 46px 34px;
  align-items: stretch;
  isolation: isolate;
}

.boot-container::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 34px;
  clip-path: polygon(4% 0, 96% 0, 100% 10%, 100% 90%, 96% 100%, 4% 100%, 0 90%, 0 10%);
  background: linear-gradient(180deg, rgba(8, 14, 26, 0.80) 0%, rgba(5, 9, 18, 0.94) 100%);
  border: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow:
    0 38px 120px rgba(2, 8, 23, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(125, 211, 252, 0.03),
    0 0 60px rgba(59, 130, 246, 0.08);
}

.boot-container::after {
  content: '';
  position: absolute;
  inset: 12% 10% 16%;
  z-index: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(96, 165, 250, 0.18) 0%, rgba(96, 165, 250, 0.08) 4%, transparent 7%),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(125, 211, 252, 0.05) 42px 43px),
    repeating-linear-gradient(180deg, rgba(96, 165, 250, 0.04) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, rgba(59, 130, 246, 0.10) 0%, transparent 34%);
  transform: perspective(1700px) rotateX(79deg) scaleY(2.35);
  transform-origin: center 18%;
  opacity: 0.78;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.94) 18%, rgba(0, 0, 0, 0.94) 76%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.94) 18%, rgba(0, 0, 0, 0.94) 76%, transparent 100%);
  animation: boot-warp-depth 12s linear infinite;
}

.boot-main {
  z-index: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  justify-content: flex-start;
  padding: 54px 50px 40px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.66) 0%, rgba(6, 11, 21, 0.86) 100%);
  border: 1px solid rgba(96, 165, 250, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -28px 48px rgba(2, 8, 23, 0.36),
    0 24px 64px rgba(2, 8, 23, 0.26);
  clip-path: polygon(4% 0, 96% 0, 100% 11%, 100% 100%, 0 100%, 0 11%);
  overflow: hidden;
}

.boot-main::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(125, 211, 252, 0.10) 0%, transparent 12%, transparent 88%, rgba(96, 165, 250, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 14%),
    radial-gradient(circle at 50% 18%, rgba(96, 165, 250, 0.10), transparent 28%);
}

.boot-main::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 18%;
  bottom: 18%;
  z-index: 0;
  border-radius: 24px;
  border: 1px solid rgba(96, 165, 250, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%),
    linear-gradient(132deg, transparent 0 16%, rgba(96, 165, 250, 0.10) 17%, transparent 18%, transparent 82%, rgba(96, 165, 250, 0.08) 83%, transparent 84%);
  box-shadow: inset 0 0 40px rgba(59, 130, 246, 0.08);
  clip-path: polygon(12% 0, 88% 0, 100% 34%, 100% 100%, 0 100%, 0 34%);
  opacity: 0.72;
  pointer-events: none;
}

/* ── PrimeVenture Logo ── */
.boot-logo {
  font-size: 72px;
  font-weight: 200;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  position: relative;
  z-index: 3;
  display: flex;
  gap: 6px;
  text-transform: uppercase;
  font-family: var(--font-display);
  line-height: 1;
}

.boot-logo span {
  opacity: 0;
  animation: boot-letter-emerge 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity, filter;
  display: inline-block;
  position: relative;
}

.boot-logo span::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 1px;
  opacity: 0;
  animation: boot-letter-underline 0.6s ease forwards;
  animation-delay: inherit;
}

.bl-b {
  animation-delay: 0.1s;
  color: #60a5fa;
  text-shadow: 0 0 40px rgba(96,165,250,0.3);
}
.bl-b::after { background: linear-gradient(90deg, #60a5fa, transparent); animation-delay: 0.6s; }

.bl-i {
  animation-delay: 0.25s;
  color: #22d3ee;
  text-shadow: 0 0 40px rgba(34,211,238,0.3);
}
.bl-i::after { background: linear-gradient(90deg, #22d3ee, transparent); animation-delay: 0.75s; }

.bl-e {
  animation-delay: 0.4s;
  color: #a78bfa;
  text-shadow: 0 0 40px rgba(167,139,250,0.3);
}
.bl-e::after { background: linear-gradient(90deg, #a78bfa, transparent); animation-delay: 0.9s; }

@keyframes boot-letter-emerge {
  0% { opacity: 0; transform: translateY(20px) scale(0.8) rotateX(30deg); filter: blur(8px); }
  60% { opacity: 0.8; transform: translateY(-3px) scale(1.02); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); }
}

@keyframes boot-letter-underline {
  0% { opacity: 0; transform: scaleX(0); transform-origin: left; }
  100% { opacity: 0.6; transform: scaleX(1); transform-origin: left; }
}

/* ── PrimeVenture Identity Text ── */
.boot-fullname {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
  text-transform: uppercase;
  opacity: 0;
  animation: boot-text-slide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 500;
}

.boot-tagline {
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0;
  animation: boot-text-slide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.65s forwards;
  position: relative;
  z-index: 2;
  font-family: var(--font-text);
  font-weight: 400;
  padding-left: 2px;
}

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

/* ── Boot Log (Left Panel) ── */
.boot-log {
  width: 100%;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11px;
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 18px 14px 18px 18px;
  font-family: var(--font-mono);
  background: linear-gradient(180deg, rgba(4, 9, 18, 0.80) 0%, rgba(5, 10, 18, 0.94) 100%);
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -24px 42px rgba(2, 8, 23, 0.46),
    0 18px 38px rgba(2, 8, 23, 0.22);
  clip-path: polygon(3% 0, 97% 0, 100% 14%, 100% 100%, 0 100%, 0 14%);
  mask-image: linear-gradient(to bottom, transparent, black 8px, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 8px, black 92%, transparent);
}

.boot-log::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 12%),
    repeating-linear-gradient(180deg, rgba(125, 211, 252, 0.03) 0 1px, transparent 1px 22px);
  opacity: 0.8;
}

.boot-log::-webkit-scrollbar { width: 4px; }
.boot-log::-webkit-scrollbar-track { background: transparent; }
.boot-log::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
.boot-log::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.15);
}

.boot-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  opacity: 0;
  animation: boot-line-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  font-family: var(--font-mono);
  transition: background 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

@keyframes boot-line-in {
  from { opacity: 0; transform: translateX(-8px); filter: blur(2px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

/* Log Elements */
.bl-time {
  color: rgba(255,255,255,0.2);
  min-width: 50px;
  font-size: 9px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.bl-module {
  color: rgba(96,165,250,0.6);
  min-width: 65px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  font-family: var(--font-text);
}

.bl-msg {
  color: rgba(255,255,255,0.55);
  flex: 1;
  font-size: 10.5px;
  font-family: var(--font-mono);
}

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

/* Status States */
.boot-line.bl-ok .bl-status {
  color: #34d399;
  background: rgba(52,211,153,0.08);
  box-shadow: inset 0 0 8px rgba(52,211,153,0.05);
}

.boot-line.bl-loading .bl-status {
  color: #fbbf24;
  background: rgba(251,191,36,0.06);
  animation: boot-status-pulse 1s ease-in-out infinite;
}

.boot-line.bl-ready .bl-status {
  color: #60a5fa;
  background: rgba(96,165,250,0.1);
  font-weight: 800;
  box-shadow: 0 0 12px rgba(96,165,250,0.15);
}

.boot-line.bl-info .bl-status {
  color: rgba(167,139,250,0.7);
  background: rgba(167,139,250,0.06);
}

@keyframes boot-status-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ── Right Panel (PrimeVenture Intelligence Dashboard) ── */
.boot-panel {
  width: auto;
  min-width: 340px;
  max-width: 360px;
  background: linear-gradient(180deg, rgba(10, 18, 32, 0.84) 0%, rgba(6, 11, 20, 0.97) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 24px;
  padding: 28px 22px 24px;
  font-size: 11px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: boot-panel-emerge 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  opacity: 0;
  font-family: var(--font-text);
  overflow: hidden;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%, 0 10%);
  box-shadow:
    0 34px 82px rgba(2, 8, 23, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 14px 0 34px rgba(59, 130, 246, 0.04);
}

.boot-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 14%),
    linear-gradient(135deg, rgba(96, 165, 250, 0.10) 0%, transparent 28%),
    repeating-linear-gradient(180deg, transparent 0 40px, rgba(255, 255, 255, 0.02) 40px 41px);
  pointer-events: none;
}

.boot-panel::after {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 14px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(125, 211, 252, 0.26), transparent);
  pointer-events: none;
}

@keyframes boot-panel-emerge {
  from { opacity: 0; transform: translateX(18px) rotateY(-12deg); filter: blur(6px); }
  to { opacity: 1; transform: translateX(0) rotateY(-4deg); filter: blur(0); }
}

.boot-panel-title {
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  letter-spacing: 0.1em;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-transform: uppercase;
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.boot-panel-title::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: boot-cpu-pulse-anim 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(52,211,153,0.4);
}

/* Panel Rows */
.boot-panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,0.04);
}

.boot-panel-label {
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 8px;
  min-width: 48px;
  font-weight: 600;
}

.boot-panel-val {
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  text-align: right;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* Mini Progress Bar */
.boot-bar-mini {
  width: 100px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.boot-bar-mini::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  width: 0%;
  animation: boot-bar-mini-fill 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 0 6px rgba(96,165,250,0.3);
}

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

.boot-bar-mini::after {
  animation-duration: var(--boot-metric-duration, 8000ms);
}

/* Divider */
.boot-panel-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.14), rgba(167,139,250,0.10), transparent);
  margin: 2px 0;
}

/* Stat Items */
.boot-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  font-size: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}

.boot-stat-label {
  color: rgba(255,255,255,0.25);
  font-weight: 600;
  font-size: 9px;
}

.boot-stat-val {
  color: rgba(255,255,255,0.65);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

/* CPU / GPU / Network Pulse */
.boot-cpu-pulse {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #34d399;
  border-radius: 50%;
  animation: boot-cpu-pulse-anim 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(52,211,153,0.4);
}

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

/* ── Module Loading List ── */
.boot-modules-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 90px;
  overflow-y: auto;
  padding-right: 4px;
}

.boot-modules-list::-webkit-scrollbar { width: 3px; }
.boot-modules-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 1.5px;
}

.boot-module-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: rgba(255,255,255,0.4);
  padding: 3px 0;
  animation: boot-module-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.boot-module-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.boot-module-item.loaded .boot-module-dot {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52,211,153,0.5);
  transform: scale(1.2);
}

/* ── Engine Badges ── */
.boot-engine-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}

.boot-engine-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.boot-engine-group.is-active {
  border-color: rgba(96,165,250,0.16);
  background: linear-gradient(180deg, rgba(96,165,250,0.08) 0%, rgba(255,255,255,0.02) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.boot-engine-group.is-complete {
  border-color: rgba(52,211,153,0.18);
  box-shadow: 0 0 18px rgba(52,211,153,0.06), inset 0 1px 0 rgba(255,255,255,0.05);
}

.boot-engine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.boot-engine-title {
  color: rgba(255,255,255,0.62);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 8px;
  font-weight: 700;
}

.boot-engine-caption {
  color: rgba(191,219,254,0.42);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.boot-engine-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.boot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 4px;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.boot-badge-active {
  color: #34d399;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
  box-shadow: 0 0 10px rgba(52,211,153,0.15), inset 0 0 6px rgba(52,211,153,0.05);
  animation: boot-badge-glow 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes boot-badge-glow {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

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

@keyframes boot-badge-dot-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; box-shadow: 0 0 8px #34d399; }
}

.boot-badge-inactive {
  color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  opacity: 0.6;
}

/* ── System Readiness Bars ── */
@keyframes boot-readiness-fill {
  0% { width: 0%; opacity: 0; }
  30% { opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

.boot-readiness-bar > div {
  animation-duration: var(--boot-readiness-duration, 8000ms) !important;
}

/* ── Performance Gauge ── */
.boot-perf-gauge {
  width: 56px;
  height: 56px;
  position: relative;
  margin: 6px 0;
  z-index: 2;
}

.boot-perf-gauge::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    rgba(239,68,68,0.4) 0deg,
    rgba(251,191,36,0.4) 60deg,
    rgba(52,211,153,0.4) 120deg,
    rgba(52,211,153,0.4) 180deg
  );
  opacity: 0.25;
}

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

.boot-perf-needle {
  position: absolute;
  width: 1.5px;
  height: 16px;
  background: linear-gradient(to top, #22d3ee, transparent);
  bottom: 50%;
  left: 50%;
  transform-origin: center 16px;
  margin-left: -0.75px;
  z-index: 2;
  animation: boot-needle-sweep var(--boot-gauge-duration, 9000ms) cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 0 8px rgba(34,211,238,0.5);
}

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

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

.boot-perf-val {
  font-size: 13px;
  font-weight: 800;
  color: #22d3ee;
  font-family: var(--font-mono);
  text-shadow: 0 0 12px rgba(34,211,238,0.4);
}

.boot-perf-unit {
  font-size: 8px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

/* ── Loading Ring ── */
.boot-loading-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 1.5px solid rgba(255,255,255,0.06);
  border-top-color: rgba(96,165,250,0.4);
  border-right-color: rgba(167,139,250,0.3);
  border-radius: 50%;
  animation: boot-ring-spin 4s 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); }
}

/* ── Mini Monitoring Stats ── */
.boot-mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px;
  background: rgba(255,255,255,0.015);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
}

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

.boot-mini-val {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── Bottom Progress Bar ── */
.boot-progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
  z-index: 3;
}

.boot-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    #60a5fa 0%,
    #22d3ee 25%,
    #a78bfa 50%,
    #34d399 75%,
    #60a5fa 100%);
  background-size: 200% 100%;
  transform: translateX(-100%);
  animation: boot-progress-sweep var(--boot-progress-duration, 10000ms) cubic-bezier(0.22, 1, 0.36, 1) forwards;
  box-shadow: 0 0 12px rgba(96,165,250,0.3);
}

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

/* ── Skip Hint ── */
.boot-skip-hint {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  position: relative;
  z-index: 3;
  animation: boot-hint-appear 0.6s ease 1.2s forwards;
  opacity: 0;
  cursor: pointer;
  transition: color 0.3s ease;
  font-family: var(--font-text);
  font-weight: 500;
  padding: 12px 0 8px;
}

@keyframes boot-cockpit-breathe {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}

@keyframes boot-warp-floor {
  0% {
    transform: perspective(1600px) rotateX(78deg) scaleY(2.3) translateY(0);
    background-position: 50% 0, 0 0, 0 0;
  }
  100% {
    transform: perspective(1600px) rotateX(78deg) scaleY(2.3) translateY(18px);
    background-position: 50% 0, 96px 0, 0 90px;
  }
}

@keyframes boot-warp-depth {
  0% {
    background-position: 50% 0, 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 50% 0, 0 0, 0 160px, 0 120px;
  }
}

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

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

/* ── Boot Complete State ── */
.boot-splash.boot-complete {
  filter: drop-shadow(0 0 80px rgba(96,165,250,0.1));
}

.boot-splash.boot-complete .boot-logo span {
  text-shadow: 0 0 60px currentColor;
}

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

@keyframes boot-complete-flash {
  0% { opacity: 0; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Fast Boot Mode ── */
.boot-fast-mode .boot-log { font-size: 9px; }
.boot-fast-mode .boot-line { animation-duration: 0.08s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .boot-container {
    grid-template-columns: 1fr;
    width: calc(100vw - 24px);
    height: auto;
    min-height: calc(100vh - 32px);
    padding: 28px 20px 24px;
    gap: 20px;
  }
  .boot-container::after {
    display: none;
  }
  .boot-main,
  .boot-panel {
    clip-path: none;
    border-radius: 22px;
  }
  .boot-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
    transform: none;
  }
  .boot-engine-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .boot-main {
    padding: 32px 24px 24px;
  }
  .boot-log {
    max-height: 260px;
  }
  .boot-logo { font-size: 48px; }
}

/* ── Final layout rescue: engine matrix prominence + adaptive panel ── */
.boot-container {
  grid-template-columns: minmax(0, 1.58fr) minmax(340px, 392px);
  gap: clamp(22px, 2vw, 32px);
  width: min(1540px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 18px));
  min-height: 680px;
}

.boot-main {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  align-content: stretch;
  min-height: 0;
}

.boot-main .boot-panel-section--engines {
  position: relative;
  z-index: 2;
  margin: 4px 0 14px;
  padding: 12px;
  overflow: hidden;
}

.boot-main .boot-engine-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.boot-log {
  margin-top: 0;
  max-height: none;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 5px 8px;
  overflow: hidden;
  padding: 14px 12px 14px 14px;
}

.boot-panel {
  min-width: 0;
  max-width: none;
  height: 100%;
  min-height: 0;
  padding: 18px 14px 16px 16px;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 211, 252, 0.28) transparent;
}

.boot-panel > * {
  position: relative;
  z-index: 1;
}

.boot-panel::-webkit-scrollbar {
  width: 5px;
}

.boot-panel::-webkit-scrollbar-track {
  background: transparent;
}

.boot-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.38), rgba(34, 211, 238, 0.24));
  border-radius: 999px;
}

.boot-panel-section {
  position: relative;
  padding: 12px 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.015) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.boot-panel-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.boot-panel-kicker {
  color: rgba(191, 219, 254, 0.58);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 8px;
  font-weight: 700;
  margin-bottom: 4px;
}

.boot-panel-section-title {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.boot-panel-pill {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  color: rgba(199, 235, 255, 0.86);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.16), rgba(34, 211, 238, 0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 18px rgba(59,130,246,0.12);
  transition: all 0.3s ease;
}

.boot-panel-pill.is-active {
  color: #e0f7ff;
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 0 20px rgba(34,211,238,0.14);
}

.boot-panel-pill.is-ready {
  color: #dcfce7;
  border-color: rgba(52, 211, 153, 0.34);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(34, 211, 238, 0.10));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 24px rgba(52,211,153,0.18);
}

.boot-panel-section--engines {
  padding: 12px;
  border-color: rgba(96, 165, 250, 0.18);
  background:
    radial-gradient(circle at 100% 0, rgba(56, 189, 248, 0.12) 0%, transparent 38%),
    linear-gradient(180deg, rgba(14, 24, 42, 0.74) 0%, rgba(8, 14, 26, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 18px 42px rgba(2, 8, 23, 0.18),
    0 0 0 1px rgba(125, 211, 252, 0.04);
}

.boot-panel-section--engines::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.08), transparent 26%, transparent 72%, rgba(167, 139, 250, 0.06));
  opacity: 0.85;
}

.boot-modules-list {
  max-height: 84px;
  overflow: hidden;
}

.boot-engine-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 8px;
  padding-bottom: 0;
  align-items: stretch;
}

.boot-engine-group {
  position: relative;
  min-height: 74px;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 12px;
  overflow: hidden;
  border-color: rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.boot-engine-group::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.05), transparent 40%, transparent 75%, rgba(34, 211, 238, 0.04));
  opacity: 0.85;
}

.boot-engine-group.is-active {
  border-color: rgba(96,165,250,0.18);
  background: linear-gradient(180deg, rgba(96,165,250,0.11) 0%, rgba(255,255,255,0.025) 100%);
  box-shadow: 0 12px 24px rgba(2, 8, 23, 0.16), inset 0 1px 0 rgba(255,255,255,0.05);
  transform: translateY(-1px);
}

.boot-engine-group.is-complete {
  border-color: rgba(52,211,153,0.24);
  box-shadow: 0 14px 30px rgba(52,211,153,0.10), inset 0 1px 0 rgba(255,255,255,0.07);
}

.boot-engine-head {
  display: grid;
  gap: 4px;
  align-items: start;
  justify-content: start;
}

.boot-engine-title {
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.08em;
  font-size: 8px;
}

.boot-engine-caption {
  color: rgba(191,219,254,0.52);
  font-size: 7.5px;
  line-height: 1.25;
  white-space: normal;
}

.boot-engine-badges {
  gap: 5px;
}

.boot-badge {
  padding: 3px 7px;
  font-size: 7px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.boot-badge-active::before {
  width: 4px;
  height: 4px;
  margin-right: 5px;
}

@media (max-width: 1180px) {
  .boot-container {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
    width: calc(100vw - 28px);
    height: min(820px, calc(100vh - 28px));
    padding: 28px 24px 24px;
  }

  .boot-engine-groups {
    grid-template-columns: 1fr;
  }
}

/* ── Right side independent column for engine matrix + status panel ── */
.boot-side-column {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.boot-side-column > * {
  min-width: 0;
}

.boot-side-column .boot-panel {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

@media (max-width: 1180px) {
  .boot-side-column {
    gap: 0;
  }

  .boot-main .boot-engine-groups {
    grid-template-columns: 1fr;
  }

  .boot-log {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .boot-side-column {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 16px;
  }

  .boot-side-column .boot-panel,
  .boot-side-column .boot-panel-section--engines {
    width: 100%;
  }

  .boot-main {
    grid-template-rows: auto auto auto auto auto;
  }

  .boot-main .boot-panel-section--engines {
    margin: 10px 0 16px;
  }

  .boot-log {
    max-height: 260px;
    height: auto;
    display: flex;
  }
}

@media (max-width: 1024px) {
  .boot-container {
    grid-template-columns: 1fr;
    width: calc(100vw - 24px);
    height: auto;
    min-height: calc(100vh - 32px);
    padding: 28px 20px 24px;
    gap: 20px;
  }

  .boot-panel {
    width: 100%;
    height: auto;
    max-height: none;
    padding: 22px 16px 18px;
  }

  .boot-panel-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .boot-engine-groups {
    grid-template-columns: 1fr;
  }
}
