:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #0b1223;
  --accent: #2dd4bf;
  --accent-2: #60a5fa;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f87171;
  --warning: #fbbf24;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 10% 20%, #132647, #0b1223 35%),
    radial-gradient(circle at 80% 0%, #0f766e, #0f172a 40%),
    linear-gradient(180deg, #0f172a, #0b1223 50%, #0f172a);
  color: var(--text);
  min-height: 100vh;
}

.sim-shell{
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 40px;
}

.sim-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  background: rgba(12,19,36,0.7);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:14px;
  padding:16px 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.sim-hero__text h1{margin:6px 0 8px;font-size:26px}
.sim-hero__text .sub{margin:0 0 10px;color:var(--muted);line-height:1.45}
.sim-hero__status{max-width:320px}
.sim-hero__status .muted{color:var(--muted);line-height:1.45;margin-top:8px}

.pillrow{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.pill{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:999px;
  padding:6px 10px;
  color:var(--muted);
  font-size:12px;
  background: rgba(255,255,255,0.05);
}

.sim-main {
  padding: 18px 0 0;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.visuals {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
}

.card h2 {
  margin: 0 0 8px;
}

.card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 8px;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 6px;
  color: var(--muted);
}

input, select, button {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f172a;
  color: var(--text);
  padding: 10px;
  font-size: 14px;
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

button.secondary {
  background: rgba(255, 255, 255, 0.08);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 14px;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.graph {
  width: 100%;
  height: 320px;
}

.wide {
  grid-column: span 2;
}

.preset-details {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  color: var(--muted);
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7);
  animation: pulse 2s infinite;
}

.status-dot.paused {
  background: var(--warning);
  animation: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4);} 
  70% { box-shadow: 0 0 0 10px rgba(45, 212, 191, 0);} 
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);} 
}

.ml-output {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: center;
}

.prob {
  font-size: 32px;
  font-weight: 700;
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.drone-meta {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
}

.sim-footer {
  text-align: center;
  padding: 18px 12px 32px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .sim-main { grid-template-columns: 1fr; }
  .wide { grid-column: span 1; }
  .split { grid-template-columns: 1fr; }
  .sim-hero{flex-direction:column;}
}
