/* Global Variables & Reset */
:root {
  --bg-primary: #030303;
  --bg-card: rgba(12, 12, 12, 0.65);
  --bg-inner: rgba(6, 6, 6, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  --glow-green: #10b981;
  --glow-blue: #3b82f6;
  --glow-red: #ef4444;
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --spring-transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --bezier-elastic: all 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 36px 36px;
  z-index: -1;
  pointer-events: none;
}

/* Background Glowing Orbs */
.glow-orb {
  position: fixed;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.glow-green {
  top: -10%;
  left: 20%;
  background: var(--glow-green);
  animation: floatOrb1 25s infinite alternate ease-in-out;
}

.glow-blue {
  bottom: -15%;
  right: 15%;
  background: var(--glow-blue);
  animation: floatOrb2 20s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, 10%) scale(1.15); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10%, -8%) scale(0.9); }
}

/* Dashboard Layout */
.dashboard-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1700px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  box-sizing: border-box;
  pointer-events: none; /* Clicks fall through to 3D canvas */
}

/* Floating Glass Header */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.45) 0%, rgba(3, 7, 18, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: auto; /* enable interactions */
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--glow-green);
  font-size: 20px;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.logo-area h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}

.logo-area p {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.radar-toggle-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--spring-transition);
}

.radar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.radar-toggle-btn i {
  font-size: 14px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.online {
  background: var(--glow-green);
  box-shadow: 0 0 10px var(--glow-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 15px var(--glow-green); }
  100% { transform: scale(1); opacity: 0.8; }
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.col-span-3 { grid-column: span 3; }
.col-span-6 { grid-column: span 6; }

/* Double Bezel (Doppelrand) Card Architecture */
.card-bezel {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.65) 0%, rgba(3, 7, 18, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  padding: 6px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.75), 
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 35px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  pointer-events: auto; /* enable interactions */
}

.card-inner {
  background: rgba(3, 7, 18, 0.45);
  border-radius: calc(24px - 6px);
  padding: 28px;
  height: 100%;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

/* Sections Elements */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.section-title i {
  color: var(--glow-blue);
  font-size: 16px;
}

.section-title h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 20px 0;
}

/* Scenario Preset Buttons */
.scenario-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  transition: var(--spring-transition);
}

.preset-btn i {
  font-size: 20px;
  color: var(--text-secondary);
  transition: var(--spring-transition);
}

.preset-btn .btn-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.preset-btn .btn-desc {
  display: block;
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.preset-btn.active {
  background: rgba(170, 68, 255, 0.08);
  border-color: rgba(170, 68, 255, 0.45);
  box-shadow: 
    0 0 15px rgba(170, 68, 255, 0.12),
    inset 0 1px 0 rgba(170, 68, 255, 0.1);
}

.preset-btn.active i {
  color: #c79eff;
  transform: scale(1.15);
  text-shadow: 0 0 8px rgba(170, 68, 255, 0.5);
}

/* Config Sliders */
.config-sliders {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-row label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.slider-wrapper input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px rgba(170, 68, 255, 0.6);
  transition: var(--spring-transition);
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(170, 68, 255, 0.9);
}

.slider-val {
  font-size: 12px;
  font-weight: 700;
  color: #c79eff;
  width: 48px;
  text-align: right;
}

/* Toggle Switch */
.toggle-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--glow-red);
}

input:checked + .switch-slider:before {
  transform: translateX(16px);
  background-color: white;
}

input:checked + .purple-switch {
  background-color: #aa44ff !important;
  box-shadow: 0 0 10px rgba(170, 68, 255, 0.4);
}

/* Credentials API Key Box */
.api-key-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-bezel {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  transition: var(--spring-transition);
}

.input-bezel:focus-within {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.input-bezel input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  flex: 1;
}

.toggle-pw-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--spring-transition);
}

.toggle-pw-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.key-hint {
  font-size: 9px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Central Simulation Window */
.sim-container {
  padding: 0;
  overflow: visible;
  position: relative;
  height: 100%;
  min-height: 0;
  background: transparent !important;
  pointer-events: none;
}

#sim-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0; /* behind bento cards */
  display: block;
  pointer-events: auto; /* enable Three.js mouse drag rotation */
}

/* Simulation Floating Controls */
.floating-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.floating-controls button {
  pointer-events: auto;
}

.control-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 10px 20px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: var(--spring-transition);
}

.control-toggle-btn.active {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.control-toggle-btn.active .pulse-ring {
  background: var(--glow-green);
  box-shadow: 0 0 10px var(--glow-green);
  animation: pulse-green 1.5s infinite;
}

.pulse-ring {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
}

@keyframes pulse-green {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.sim-reset-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: var(--bezier-elastic);
}

.sim-reset-btn:hover {
  transform: rotate(90deg) scale(1.1);
  border-color: var(--border-color-hover);
}

/* Floating telemetry bar at bottom of viewport */
.canvas-telemetry {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 150px);
  gap: 12px;
  pointer-events: auto; /* enable interactions */
  z-index: 15;
}

.tel-box {
  background: rgba(3, 7, 18, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}

.tel-label {
  display: block;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.tel-value {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Performance Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.m-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.m-val.green { color: var(--glow-green); }
.m-val.blue { color: var(--glow-blue); }

/* System Console Logs */
.console-panel {
  display: flex;
  flex-direction: column;
}

.console-panel .card-inner {
  display: flex;
  flex-direction: column;
}

.console-output {
  flex: 1;
  background: rgba(2, 4, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 14px;
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 10px;
  line-height: 1.5;
  overflow-y: auto;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.7);
}

.console-output::-webkit-scrollbar {
  width: 4px;
}
.console-output::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
.console-output::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.console-output::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.console-line {
  color: var(--text-secondary);
}

.console-line.system {
  color: var(--text-primary);
  opacity: 0.7;
}

.console-line.command {
  color: var(--glow-blue);
}

.console-line.success {
  color: var(--glow-green);
}

.console-line.warning {
  color: var(--glow-red);
}

/* Strategic Reasoning box */
.reasoning-box {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
}

.reasoning-title {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--glow-blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.reasoning-content {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-primary);
  opacity: 0.85;
}

/* Bento Grid Column Wrappers (Left / Right Column Heights) */
.bento-column-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  grid-column: span 3;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: thin;  /* Firefox */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.bento-column-left::-webkit-scrollbar {
  width: 4px;
}
.bento-column-left::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.bento-column-left::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}
.bento-column-left::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.bento-column-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  grid-column: span 3;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: thin;  /* Firefox */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.bento-column-right::-webkit-scrollbar {
  width: 4px;
}
.bento-column-right::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.bento-column-right::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}
.bento-column-right::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Speed Metrics Bar */
.speed-metrics-bar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(3, 7, 18, 0.9) 100%);
  border: 1px solid rgba(170, 68, 255, 0.35);
  border-radius: 12px;
  padding: 6px 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  pointer-events: auto;
  z-index: 12;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(170, 68, 255, 0.15);
}

.metrics-label {
  color: #10b981;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.metrics-content {
  color: var(--text-primary);
  opacity: 0.9;
}

/* Agent Network Panel Elements */
.agent-command-panel {
  flex: 1; /* allow expansion */
}

.agent-network-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.agent-network-list::-webkit-scrollbar {
  width: 4px;
}
.agent-network-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
.agent-network-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}
.agent-network-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.agent-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.agent-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.agent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.agent-name {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-name i {
  font-size: 13px;
}

.agent-role {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.role-cyan {
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.1);
}

.role-magenta {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
}

.role-yellow {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.agent-body {
  font-size: 10px;
  color: var(--text-secondary);
}

.agent-tactic {
  font-family: monospace;
  color: var(--text-primary);
  opacity: 0.9;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-vals {
  font-size: 9px;
  opacity: 0.7;
}

/* Threat Badge Levels */
.threat-badge {
  font-size: 8px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.threat-badge.low {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.threat-badge.medium {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.threat-badge.high {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
  border: 1px solid #f97316;
}

.threat-badge.critical {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
  border: 1px solid #ef4444;
  animation: blinkRed 1s infinite alternate;
}

@keyframes blinkRed {
  0% { opacity: 0.4; box-shadow: 0 0 4px rgba(239,68,68,0.3); }
  100% { opacity: 1.0; box-shadow: 0 0 12px rgba(239,68,68,0.7); }
}

.oracle-situation {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.oracle-command {
  font-weight: 500;
  color: #10b981;
}

/* Agent Net Sync Success Flash Animation */
.sync-flash {
  animation: borderFlash 0.5s ease-out;
}

@keyframes borderFlash {
  0% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.6);
  }
  100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

.pulse-think {
  transform: scale(2.2);
  filter: brightness(2.0);
  box-shadow: 0 0 15px currentColor;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .bento-grid {
    display: flex;
    flex-direction: column;
  }
  .col-span-3, .col-span-6 {
    width: 100%;
  }
  .bento-column-left, .bento-column-right {
    width: 100%;
  }
  .sim-container {
    min-height: 400px;
  }
  .speed-metrics-bar {
    width: calc(100% - 40px);
    justify-content: center;
  }
}

/* Full Screen Radar Mode */
body.radar-mode .bento-column-left {
  display: none !important;
}

body.radar-mode .bento-column-right {
  display: none !important;
}

body.radar-mode .simulation-view {
  grid-column: span 12 !important;
}

body.radar-mode .dashboard-wrapper {
  max-width: 100% !important;
  padding: 24px !important;
}

body.radar-mode .sim-container {
  min-height: calc(100vh - 120px) !important;
}

body.radar-mode .header-bar {
  background: transparent !important;
  border-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.simulation-view {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), width 0.6s, height 0.6s, border-radius 0.6s;
}

.simulation-view .card-inner {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.header-bar {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tactical HUD Overlays for Full Screen Radar View */
.radar-hud-overlay {
  display: none; /* hidden by default */
  position: absolute;
  background: rgba(3, 7, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  width: 200px;
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 10px;
  line-height: 1.6;
  color: var(--text-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  z-index: 10;
  pointer-events: auto; /* allow interaction */
}

/* Display only in radar mode */
body.radar-mode .radar-hud-overlay {
  display: block;
}

.hud-top-left {
  top: 95px; /* placed below transparent header */
  left: 24px;
  border-left: 3px solid #aa44ff;
}

.hud-top-right {
  top: 95px;
  right: 24px;
  border-right: 3px solid #ef4444;
}

.hud-bottom-left {
  bottom: 95px; /* placed above telemetry bar */
  left: 24px;
  border-left: 3px solid #3b82f6;
}

.hud-bottom-right {
  bottom: 95px;
  right: 24px;
  border-right: 3px solid #10b981;
}

.hud-header {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hud-row span:first-child {
  color: var(--text-secondary);
}

.hud-green { color: #10b981 !important; text-shadow: 0 0 5px rgba(16, 185, 129, 0.3); }
.hud-purple { color: #c79eff !important; text-shadow: 0 0 5px rgba(170, 68, 255, 0.3); }
.hud-red { color: #ef4444 !important; text-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }
.hud-blue { color: #3b82f6 !important; text-shadow: 0 0 5px rgba(59, 130, 246, 0.3); }
