/* ============================================================================
   BLADEWORKS BOTS // 4D SOLDIER ARMORY — v7 AAA GAME-UI UPGRADE STYLESHEET
   Strict Compliance: JZ v6 Baseline Rules (t18u–t23ua0) + Max CEO Alignment
   Palette: 100% Cold Gunmetal Steel (#0A0C10 / #12151C) + 4-Class Bladeworks
     - Bladeworks Ice Cyan : #00E5FF (rgb(0, 229, 255))
     - Halo Cobalt         : #3B82F6 (rgb(59, 130, 246))
     - Tactical Emerald    : #10B981 (rgb(16, 185, 129))
     - Cortana Violet      : #8B5CF6 (rgb(139, 92, 246))
   Warm Pixels (Orange / Amber / Red): 0.0000%
   ============================================================================ */

:root, [data-theme="dark"] {
  --bw-bg-hangar: #0A0C10;
  --bw-bg-bulkhead: #12151C;
  --bw-bg-alcove: #181C26;
  --bw-bg-recess: #0D1016;
  --bw-steel-border: #3E4859;
  --bw-steel-muted: #94A3B8;
  --bw-silver-sub: #CBD5E1;
  --bw-silver-bright: #F8FAFC;

  /* Strict 4-Class Bladeworks Palette (0.0000% Warm Pixels) */
  --bw-ice-cyan: #00E5FF;
  --bw-halo-cobalt: #3B82F6;
  --bw-emerald: #10B981;
  --bw-cortana-violet: #8B5CF6;

  --bw-active-glow: #00E5FF;
  --bw-hud-glass: rgba(11, 15, 22, 0.56);
  --bw-wall-glass: rgba(11, 15, 22, 0.42);
}

[data-theme="light"] {
  --bw-bg-hangar: #E2E8F0;
  --bw-bg-bulkhead: #F1F5F9;
  --bw-bg-alcove: #FFFFFF;
  --bw-bg-recess: #E2E8F0;
  --bw-steel-border: #94A3B8;
  --bw-steel-muted: #475569;
  --bw-silver-sub: #1E293B;
  --bw-silver-bright: #0F172A;

  /* Strict 4-Class Bladeworks Palette — Titanium Daylight Calibrated */
  --bw-ice-cyan: #00E5FF;
  --bw-halo-cobalt: #3B82F6;
  --bw-emerald: #10B981;
  --bw-cortana-violet: #8B5CF6;

  --bw-active-glow: #0284C7;
  --bw-hud-glass: rgba(241, 245, 249, 0.78);
  --bw-wall-glass: rgba(241, 245, 249, 0.68);
}

/* ----------------------------------------------------------------------------
   1. LEFT SOLDIER LOADOUT HUD — MICRO-TELEMETRY & CHAMFERED RETICLE UPGRADE
   Preserves JZ Rule #3: Sits on the LEFT of the Hero Bot (x=32px, width=316px)
   with zero 2D boxes blocking the center Hero Bot or Octagonal Steel Pod.
   ---------------------------------------------------------------------------- */
.floating-loadout-hud {
  position: absolute;
  top: 56px;
  left: 32px;
  width: 316px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
  z-index: 6;
}

.hud-slot {
  position: relative;
  padding: 7px 12px;
  background: var(--bw-hud-glass);
  border: 1px solid rgba(82, 95, 115, 0.78);
  border-left: 3px solid var(--bw-ice-cyan);
  backdrop-filter: blur(4px);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.hud-slot:hover {
  border-color: var(--bw-ice-cyan);
  box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.12), 0 0 12px rgba(0, 229, 255, 0.16);
  transform: translateX(2px);
}

.hud-slot::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--bw-ice-cyan);
  border-right: 2px solid var(--bw-ice-cyan);
  opacity: 0.85;
  pointer-events: none;
}

.v7-telemetry-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.60rem;
  font-weight: 800;
  color: var(--bw-steel-muted);
  letter-spacing: 0.06em;
  padding: 3px 8px;
  background: rgba(10, 12, 16, 0.58);
  border-left: 2px solid var(--bw-halo-cobalt);
}

.v7-telemetry-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bw-emerald);
  box-shadow: 0 0 8px var(--bw-emerald);
  margin-right: 5px;
}

/* 4-Class Bladeworks Armor Line Swatches */
.line-swatches {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.swatch-dot {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  border: 1px solid rgba(248, 250, 252, 0.55);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.swatch-dot:hover, .swatch-dot.active {
  transform: scale(1.12);
  border-color: #F8FAFC;
  box-shadow: 0 0 10px var(--bw-ice-cyan);
}

/* ----------------------------------------------------------------------------
   2. RIGHT 3D PERSPECTIVE-WARPED WALL HOLOGRAM — ZERO VERTICAL GAPS
   Preserves JZ Rule #3 (t23ua0 0:25–0:42): Single unified chamfered window,
   zero vertical gaps (gap: 0), mapped onto the angled right bulkhead wall.
   ---------------------------------------------------------------------------- */
.wall-hologram-wrap {
  position: absolute;
  top: 92px;
  right: 58px;
  width: 468px;
  perspective: 950px;
  pointer-events: auto;
  z-index: 5;
}

.wall-hologram {
  position: relative;
  padding: 11px 16px;
  background: linear-gradient(135deg, rgba(11, 15, 22, 0.52) 0%, rgba(18, 21, 28, 0.34) 100%);
  border: 1px solid rgba(148, 163, 184, 0.62);
  border-left: 3px solid var(--bw-ice-cyan);
  transform: rotateY(-24deg) skewY(-2.5deg);
  transform-origin: right center;
  backdrop-filter: blur(2px);
  box-shadow: -12px 10px 28px rgba(0, 0, 0, 0.45), inset 0 0 22px rgba(0, 229, 255, 0.08);
  overflow: hidden;
}

/* Subtle Holographic Scanline Overlay (Pure Cold Cyan, 0% Warmth) */
.wall-hologram::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 229, 255, 0.04) 0px,
    rgba(0, 229, 255, 0.04) 1px,
    transparent 1px,
    transparent 4px
  );
  pointer-events: none;
}

.rack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--bw-ice-cyan);
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 2px solid rgba(0, 229, 255, 0.72);
  letter-spacing: 0.04em;
}

/* STRICT ZERO VERTICAL GAPS between the 5 numbered tool rows */
.rack-list {
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  margin: 0;
  padding: 0;
}

.rack-item {
  position: relative;
  padding: 5px 8px 5px 10px;
  margin: 0;
  background: transparent;
  border-bottom: 1px solid rgba(100, 116, 139, 0.38);
  transition: background 0.15s ease, padding-left 0.15s ease;
}

.rack-item:last-child {
  border-bottom: none;
}

.rack-item:hover {
  background: rgba(0, 229, 255, 0.09);
  padding-left: 14px;
}

.rack-item-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.18;
}

.rack-item-desc {
  font-size: 0.72rem;
  font-weight: 700;
  color: #BAE6FD;
  line-height: 1.18;
}

/* ----------------------------------------------------------------------------
   3. VOLUMETRIC STASIS POD MIST, CONCENTRIC EMITTER RINGS & POD-RIM FASCIA
   Preserves JZ Rule #4: Tall unsquished Hero Bot + 3D Octagonal Steel Pod
   with diegetic engraved pod-rim nameplate (no 2D boxes blocking the bot).
   ---------------------------------------------------------------------------- */
.v7-pod-emitter-stage {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 520px;
  height: 240px;
  pointer-events: none;
  z-index: 3;
}

.v7-pod-mist-canvas {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  width: 440px;
  height: 210px;
  pointer-events: none;
  opacity: 0.82;
}

.v7-pod-emitter-svg {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 500px;
  height: 150px;
  pointer-events: none;
}

@keyframes v7RingPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 0.98; }
}

.v7-emitter-arc-primary {
  animation: v7RingPulse 3.2s ease-in-out infinite;
}

/* ----------------------------------------------------------------------------
   4. COMPACT HALF-HEIGHT (200px) BOTTOM SOLDIER ROSTER WITH HUGE BOT NAMES
   Preserves JZ Rule #4 (t23ua0 0:45–1:42): Half-height bottom strip (164px
   cards + 30px header = ~200px total) with oversized bold Bot Names & Prices.
   ---------------------------------------------------------------------------- */
.scrollable-bay-strip {
  position: relative;
  z-index: 6;
  padding: 0 24px 10px;
}

.strip-card {
  position: relative;
  min-width: 344px;
  max-width: 344px;
  height: 164px;
  background: radial-gradient(circle at 50% 36%, #1A202C 0%, #0A0C10 100%);
  border: 2px solid rgba(64, 75, 92, 0.88);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.strip-card.active, .strip-card:hover {
  border-color: var(--bw-ice-cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.22);
  transform: translateY(-2px);
}

.strip-pod-name {
  font-size: 1.24rem;
  font-weight: 900;
  color: #F8FAFC;
  letter-spacing: 0.015em;
  line-height: 1.08;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.strip-price-pill {
  position: absolute;
  top: 5px;
  right: 7px;
  padding: 2px 10px;
  background: rgba(10, 14, 22, 0.88);
  border: 2px solid var(--bw-ice-cyan);
  font-size: 0.98rem;
  font-weight: 900;
  color: #F8FAFC;
}

/* ----------------------------------------------------------------------------
   5. [ 03 COMMAND SUITES ] & 6-PILLAR FULL-STACK ECOSYSTEM UPGRADE COMPONENTS
   Per Max (CEO of Blade Works) Alignment #2:
   Concrete CSS/SVG/Canvas component upgrades for the 6-Pillar Ecosystem &
   Executive Multi-Bot Command Suites routed via #1 Chief of Staff ($39).
   ---------------------------------------------------------------------------- */
.v7-ecosystem-conduit-wrap {
  margin: 12px 0 16px;
  padding: 12px 16px;
  background: var(--bw-bg-recess);
  border: 1px solid var(--bw-steel-border);
  border-left: 3px solid var(--bw-ice-cyan);
}

.v7-conduit-svg {
  width: 100%;
  height: 68px;
  display: block;
}

.pillar-card {
  position: relative;
  padding: 15px 16px;
  background: var(--bw-bg-alcove);
  border: 1px solid var(--bw-steel-border);
  border-top: 2px solid var(--bw-ice-cyan);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.pillar-card:hover {
  border-color: var(--bw-ice-cyan);
  transform: translateY(-2px);
}

.v7-pillar-index {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  margin-bottom: 6px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid var(--bw-ice-cyan);
  color: var(--bw-ice-cyan);
}

/* Executive Multi-Bot Command Suites — Tactical Fleet Formation Cards */
.v7-suite-card {
  position: relative;
  padding: 18px 20px;
  background: var(--bw-bg-alcove);
  border: 1px solid var(--bw-steel-border);
  border-top: 3px solid var(--bw-halo-cobalt);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v7-suite-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.35);
}

.v7-suite-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  font-weight: 900;
  padding: 3px 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--bw-halo-cobalt);
  color: var(--bw-ice-cyan);
}

.v7-suite-topology-svg {
  width: 100%;
  height: 64px;
  display: block;
  background: var(--bw-bg-recess);
  border: 1px solid rgba(82, 95, 115, 0.45);
}

.v7-suite-unit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v7-suite-unit-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  background: var(--bw-bg-recess);
  border: 1px solid var(--bw-steel-border);
  color: var(--bw-silver-bright);
}

/* ----------------------------------------------------------------------------
   6. [ 04 BUILDER BUYBACK ] — TRADE-IN INTAKE BAY & SANDBOX SCANNER AESTHETIC
   Per Max (CEO of Blade Works) Alignment #2:
   Concrete CSS/SVG/Canvas component upgrades for Builder Buyback & Partner Bay.
   ---------------------------------------------------------------------------- */
.v7-buyback-scanner-banner {
  margin: 10px 0 16px;
  padding: 14px 18px;
  background: var(--bw-bg-recess);
  border: 1px solid var(--bw-steel-border);
  border-left: 3px solid var(--bw-emerald);
}

.v7-buyback-pipeline-svg {
  width: 100%;
  height: 74px;
  display: block;
}

.v7-buyback-card {
  position: relative;
  padding: 18px 20px;
  background: var(--bw-bg-alcove);
  border: 1px solid var(--bw-steel-border);
  border-left: 3px solid var(--bw-ice-cyan);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v7-buyback-option-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 900;
  color: var(--bw-emerald);
  letter-spacing: 0.05em;
}


/* Mobile Responsive Preservation for v7 Upgrades (Zero Head Cutoff, Portrait Right Column, Single Bottom Strip) */
@media (max-width: 960px) {
  .floating-loadout-hud {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .v7-telemetry-subbar {
    grid-column: 1 / -1 !important;
  }
  .wall-hologram-wrap {
    position: absolute !important;
    top: 44px !important;
    right: 8px !important;
    width: 44% !important;
    max-width: 205px !important;
  }
  .wall-hologram {
    transform: rotateY(-14deg) skewY(-2deg) !important;
    padding: 7px 9px !important;
  }
  .v7-pod-emitter-stage {
    width: 320px !important;
    height: 160px !important;
    bottom: 185px !important;
  }
  .v7-pod-mist-canvas {
    width: 280px !important;
    height: 140px !important;
  }
  .v7-pod-emitter-svg {
    width: 310px !important;
    height: 95px !important;
  }
  .scrollable-bay-strip {
    padding: 0 10px 12px !important;
  }
  .strip-card {
    flex: 0 0 155px !important;
    min-width: 155px !important;
    max-width: 155px !important;
    height: 195px !important;
  }
  .strip-pod-name {
    font-size: 0.88rem !important;
  }
  .strip-price-pill {
    font-size: 0.76rem !important;
    padding: 1px 6px !important;
  }
}
