/* ==========================================================================
   FerriTaaS™ — White / Black / Red Electronic Device UX Components Design System
   (Inspired by High-Contrast Electronic Hardware Devices & UX Component Kits)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bp-navy: #040812;
  --bp-navy-card: #080f21;
  --bp-cyan: #00f0ff;
  --bp-cyan-glow: rgba(0, 240, 255, 0.45);
  --bp-cyan-line: rgba(0, 240, 255, 0.35);
  --bp-blue: #38bdf8;
  --bp-emerald: #10b981;
  --bp-amber: #f59e0b;
  
  /* White / Black / Red High-Contrast Hardware Palette */
  --hw-black: #050811;
  --hw-card-black: #0b1120;
  --hw-white: #ffffff;
  --hw-offwhite: #e2e8f0;
  --hw-red: #ff003c;
  --hw-red-glow: rgba(255, 0, 60, 0.5);
  --hw-red-line: rgba(255, 0, 60, 0.4);
}

/* Solid FUI Sci-Fi Deep Space Navy Background */
body, .bg-body-tertiary {
  background-color: var(--bp-navy) !important;
  background-image: radial-gradient(circle at 50% 15%, rgba(255, 0, 60, 0.05) 0%, rgba(0, 240, 255, 0.03) 50%, transparent 80%) !important;
  color: var(--hw-offwhite) !important;
  font-family: 'JetBrains Mono', monospace, sans-serif !important;
  position: relative;
}

/* Top High-Contrast Ticker Bar (White / Black / Red) */
.fui-ticker-bar {
  background: var(--hw-black);
  border-bottom: 2px solid var(--hw-red);
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--hw-white);
  padding: 5px 16px;
  overflow: hidden;
  white-space: nowrap;
}

.fui-ticker-content {
  display: inline-block;
  animation: fuiTickerScroll 35s linear infinite;
}

@keyframes fuiTickerScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* White / Black / Red Hardware Device Component Cards */
.blueprint-card, .card, .glass-card {
  background: var(--hw-card-black) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6) !important;
  position: relative;
  backdrop-filter: blur(14px);
  border-radius: 4px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Red / White Corner Hardware Brackets */
.blueprint-card::before, .card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--hw-red);
  border-left: 2px solid var(--hw-red);
  pointer-events: none;
  z-index: 5;
}

.blueprint-card::after, .card::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-bottom: 2px solid var(--hw-red);
  border-right: 2px solid var(--hw-red);
  pointer-events: none;
  z-index: 5;
}

.fui-bracket-tr {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--hw-white);
  border-right: 2px solid var(--hw-white);
  pointer-events: none;
}

.fui-bracket-bl {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 14px;
  height: 14px;
  border-bottom: 2px solid var(--hw-white);
  border-left: 2px solid var(--hw-white);
  pointer-events: none;
}

.blueprint-card:hover, .card:hover {
  border-color: var(--hw-red) !important;
  box-shadow: 0 0 35px var(--hw-red-glow) !important;
  transform: translateY(-3px);
}

/* Electronic Device Status LEDs */
.led-red-active {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--hw-red);
  box-shadow: 0 0 12px var(--hw-red);
  display: inline-block;
  animation: ledPulseRed 1s infinite alternate;
}

@keyframes ledPulseRed {
  0% { opacity: 0.5; box-shadow: 0 0 4px var(--hw-red); }
  100% { opacity: 1; box-shadow: 0 0 14px var(--hw-red); }
}

.led-white-active {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--hw-white);
  box-shadow: 0 0 10px var(--hw-white);
  display: inline-block;
}

/* Hardware Control Panel Stamps & Badges */
.blueprint-stamp {
  display: inline-block;
  border: 1.5px solid var(--hw-red);
  color: var(--hw-white);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: rgba(255, 0, 60, 0.15);
}

.blueprint-stamp-white {
  display: inline-block;
  border: 1.5px solid var(--hw-white);
  color: var(--hw-white);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: rgba(255, 255, 255, 0.1);
}

.dimension-callout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--hw-white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 2px;
}

/* Electronic Hardware Buttons (White / Black / Red) */
.btn-primary {
  background: var(--hw-red) !important;
  border: 1px solid var(--hw-red) !important;
  color: var(--hw-white) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 0 20px var(--hw-red-glow) !important;
  transition: all 0.2s ease !important;
}

.btn-primary:hover {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: var(--hw-black) !important;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6) !important;
}

.btn-outline-red {
  background: transparent !important;
  border: 1px solid var(--hw-red) !important;
  color: var(--hw-red) !important;
}

.btn-outline-red:hover {
  background: var(--hw-red) !important;
  color: var(--hw-white) !important;
}

.navbar {
  background: rgba(5, 8, 17, 0.98) !important;
  border-bottom: 2px solid var(--hw-red) !important;
  backdrop-filter: blur(16px);
}

.nav-link {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
}

.nav-link:hover, .nav-link.active {
  color: var(--hw-red) !important;
}

.terminal-window {
  background-color: #02040a !important;
  border: 1.5px solid var(--hw-red) !important;
  border-radius: 6px !important;
  box-shadow: 0 0 30px var(--hw-red-glow) !important;
}

.terminal-header {
  background-color: rgba(255, 0, 60, 0.12) !important;
  border-bottom: 1px solid var(--hw-red-line) !important;
}

/* FUI Rotating Radial Target Lock Reticle (White / Red) */
.swarm-anim-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 17, 0.97);
  backdrop-filter: blur(10px);
  z-index: 1050;
  border: 2px solid var(--hw-red);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
  box-shadow: 0 0 60px var(--hw-red-glow), inset 0 0 40px rgba(255, 0, 60, 0.2);
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.swarm-laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--hw-red) 50%, transparent 100%);
  box-shadow: 0 0 15px var(--hw-red), 0 0 30px var(--hw-red);
  animation: swarmLaserSweep 1.5s ease-in-out infinite alternate;
}

@keyframes swarmLaserSweep {
  0% { top: 5%; }
  100% { top: 92%; }
}

.fui-radial-radar {
  position: relative;
  width: 110px;
  height: 110px;
  border: 2px dashed var(--hw-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 30px var(--hw-red-glow);
  animation: fuiRadarRotate 6s linear infinite;
}

.fui-radial-radar::after {
  content: '';
  position: absolute;
  width: 80%;
  height: 80%;
  border: 1px solid var(--hw-white);
  border-radius: 50%;
  border-top-color: transparent;
  animation: fuiRadarRotateReverse 3s linear infinite;
}

@keyframes fuiRadarRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fuiRadarRotateReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

.swarm-node-grid {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.swarm-node-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 0, 60, 0.15);
  border: 2px solid var(--hw-red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hw-white);
  font-size: 1rem;
  box-shadow: 0 0 15px var(--hw-red-glow);
  animation: swarmNodePulse 1.2s infinite alternate;
}

.swarm-node-dot:nth-child(2) { animation-delay: 0.3s; }
.swarm-node-dot:nth-child(3) { animation-delay: 0.6s; }
.swarm-node-dot:nth-child(4) { animation-delay: 0.9s; }

@keyframes swarmNodePulse {
  0% { transform: scale(0.9); box-shadow: 0 0 10px rgba(255, 0, 60, 0.3); }
  100% { transform: scale(1.15); box-shadow: 0 0 25px var(--hw-red); background: rgba(255, 0, 60, 0.35); }
}

.swarm-progress-track {
  width: 100%;
  max-width: 480px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--hw-red);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 16px;
}

.swarm-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffffff 0%, var(--hw-red) 100%);
  width: 0%;
  box-shadow: 0 0 15px var(--hw-red);
  transition: width 0.1s linear;
}

/* HIGH-SPEED DATA FLOOD LINE-BY-LINE ANIMATION */
.syslog-data-flooding {
  border-color: var(--hw-red) !important;
  box-shadow: 0 0 35px var(--hw-red-glow), inset 0 0 20px rgba(255, 0, 60, 0.25) !important;
  background-color: #02050c !important;
  animation: dataFloodGlow 0.4s infinite alternate;
}

@keyframes dataFloodGlow {
  0% { border-color: rgba(255, 0, 60, 0.5); }
  100% { border-color: rgba(255, 0, 60, 1); }
}

/* ROBUST FORTIGATE MEMORY LEAK ANALYSIS REPORT ANIMATIONS */
.flamegraph-bar-container {
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 0, 60, 0.3);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}

.flamegraph-fill-leak {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #ff003c 100%);
  box-shadow: 0 0 15px rgba(255, 0, 60, 0.8);
  width: 0%;
  animation: flamegraphGrow 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes flamegraphGrow {
  0% { width: 0%; }
  100% { width: 89.4%; }
}

.memory-leak-pulse-box {
  animation: leakPulseBorder 1.2s infinite alternate;
}

@keyframes leakPulseBorder {
  0% { border-color: rgba(255, 0, 60, 0.4); box-shadow: 0 0 10px rgba(255, 0, 60, 0.2); }
  100% { border-color: rgba(255, 0, 60, 1); box-shadow: 0 0 30px rgba(255, 0, 60, 0.7); }
}
