/* FORMULA-GP / styles/boot.css — 引擎引导覆盖层（独立于 UI 层，类前缀 fgpb-） */

#fgp-viewport {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #05070a;
}

#fgp-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

#fgp-fx-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#fgp-ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
#fgp-ui > * { pointer-events: auto; }

/* ---------------------------------------------------------------- 引导层 */
#fgp-boot {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 90% at 50% 40%, #10151d 0%, #070a0e 55%, #030507 100%);
  color: #e8edf4;
  font-family: 'Rajdhani', 'Titillium Web', 'Segoe UI', system-ui, -apple-system, sans-serif;
  opacity: 1;
  transition: opacity .7s cubic-bezier(.2,.8,.2,1), visibility .7s;
  overflow: hidden;
}
#fgp-boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
#fgp-boot.is-error { background: radial-gradient(120% 90% at 50% 40%, #2a0d10 0%, #0a0406 60%, #030102 100%); }

.fgpb-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 45%, transparent 40%, rgba(0,0,0,.75) 100%);
}
.fgpb-scan {
  position: absolute; inset: -10%;
  pointer-events: none;
  opacity: .055;
  background-image: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px);
  animation: fgpb-scan 8s linear infinite;
}
@keyframes fgpb-scan { from { transform: translateY(0); } to { transform: translateY(3px); } }

.fgpb-inner {
  position: relative;
  width: min(760px, 88vw);
  text-align: center;
  padding: 0 8px;
}

.fgpb-logo {
  font-size: clamp(42px, 8.4vmin, 96px);
  font-weight: 800;
  letter-spacing: clamp(1px, .7vmin, 8px);
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .06em;
  filter: drop-shadow(0 6px 30px rgba(225, 6, 0, .28));
}
.fgpb-logo-a {
  background: linear-gradient(180deg, #ffffff 0%, #cfd8e4 42%, #8b97a8 60%, #ffffff 78%, #b9c4d2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fgpb-logo-b {
  background: linear-gradient(180deg, #ff5a45 0%, #e10600 45%, #8e0300 70%, #ff8a76 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fgpb-tagline {
  margin-top: 10px;
  font-size: clamp(9px, 1.35vmin, 13px);
  letter-spacing: .58em;
  text-indent: .58em;
  color: #6f7c8e;
  text-transform: uppercase;
}

.fgpb-barwrap { margin-top: clamp(26px, 6vmin, 54px); }

.fgpb-bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.fgpb-bar-fill {
  position: absolute; inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: 999px;
  background: linear-gradient(90deg, #e10600 0%, #ff5a45 55%, #ffd400 100%);
  box-shadow: 0 0 18px rgba(225,6,0,.55);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
}

.fgpb-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  font-size: clamp(10px, 1.5vmin, 14px);
  color: #8b97a8;
  letter-spacing: .12em;
}
#fgp-boot-pct { font-variant-numeric: tabular-nums; color: #cfd8e4; font-weight: 600; }

.fgpb-log {
  margin-top: 20px;
  min-height: 8.4em;
  text-align: left;
  font-family: 'Cascadia Mono', 'Consolas', ui-monospace, monospace;
  font-size: clamp(10px, 1.35vmin, 12.5px);
  line-height: 1.6;
  color: #6f7c8e;
}
.fgpb-logline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .55; }
.fgpb-logline:last-child { opacity: 1; color: #a9b6c7; }

.fgpb-foot {
  position: absolute;
  bottom: 22px;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: .34em;
  color: #3f4956;
}

/* ---------------------------------------------------------------- 致命错误 */
#fgp-fatal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 9, .93);
  backdrop-filter: blur(10px);
  color: #e8edf4;
  font-family: 'Cascadia Mono', 'Consolas', ui-monospace, monospace;
  padding: 24px;
}
#fgp-fatal[hidden] { display: none; }
.fgpb-fatal-box {
  max-width: min(900px, 92vw);
  max-height: 84vh;
  overflow: auto;
  padding: 26px 30px;
  border: 1px solid rgba(225, 6, 0, .5);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(28,10,12,.94), rgba(10,6,8,.94));
  box-shadow: 0 24px 80px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.04);
}
.fgpb-fatal-box h1 { font-size: 18px; letter-spacing: .18em; color: #ff5a45; margin-bottom: 12px; }
.fgpb-fatal-box p { font-size: 14px; color: #ffd7d2; margin-bottom: 14px; line-height: 1.6; }
.fgpb-fatal-box pre {
  font-size: 11.5px; line-height: 1.55; color: #9fb0c2;
  white-space: pre-wrap; word-break: break-word;
  max-height: 40vh; overflow: auto;
  background: rgba(0,0,0,.35);
  border-radius: 8px; padding: 12px 14px;
}
.fgpb-fatal-hint { margin-top: 16px; font-size: 11.5px; line-height: 1.7; color: #7d8b9c; }
.fgpb-fatal-hint code { color: #ffd400; }
