.ui-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
}

.topbar{
  position:absolute;
  left:16px; right:16px; top:16px;
  display:flex;
  justify-content:space-between;
  gap:8px;
  pointer-events:none;
}
.topbar-left, .topbar-right{
  display:flex;
  align-items:center;
  gap:6px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 6px;
  border:1px solid rgba(127,194,255,0.35);
  background:rgba(15,22,48,0.82);
  border-radius:6px;
  font-size:12px;
  letter-spacing:0.4px;
}

.bar{
  width:120px;
  height:12px;
  border:1px solid rgba(255,255,255,0.22);
  border-radius:6px;
  overflow:hidden;
  background:rgba(0,0,0,0.25);
}
.bar-fill{
  height:100%;
  width:0%;
  background:rgba(255,209,102,0.9);
}

.leftpanel{
  position:absolute;
  left:16px;
  top:88px;
  width:208px;
  padding:10px;
  border:1px solid rgba(127,194,255,0.25);
  background:rgba(15,22,48,0.82);
  border-radius:8px;
  pointer-events:auto;
}

.panel-title{
  font-size:11px;
  color:var(--muted);
  margin:2px 0 4px;
}
.panel-title.mt{ margin-top:8px; }

.tool-btn, .small-btn, .action-btn{
  width:100%;
  text-align:left;
  padding:8px 10px;
  margin:2px 0;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(0,0,0,0.25);
  color:var(--text);
  font-size:13px;
  cursor:pointer;
}

.tool-btn.is-selected, .small-btn.is-selected{
  border-color:rgba(127,194,255,0.7);
  background:rgba(127,194,255,0.12);
}

.tool-btn:hover, .small-btn:hover, .action-btn:hover{
  border-color:rgba(127,194,255,0.6);
}

.toggle{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--text);
  margin:3px 0;
}
.toggle input{ transform:translateY(1px); }

.speed-row{
  display:flex;
  gap:4px;
}
.speed-row .small-btn{
  width:auto;
  flex:1;
  text-align:center;
  padding:4px 0;
  font-size:11px;
}

.small-btn.wide{ text-align:center; }

.bottompanel{
  position:absolute;
  left:240px;
  right:16px;
  bottom:180px;
  height:110px;
  display:flex;
  gap:8px;
  padding:10px;
  border:1px solid rgba(127,194,255,0.25);
  background:rgba(15,22,48,0.82);
  border-radius:8px;
  pointer-events:auto;
}

.stats{
  display:flex;
  gap:18px;
  align-items:center;
  flex:1;
  flex-wrap:wrap;
}
.stat{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:120px;
}
.label{
  font-size:11px;
  color:var(--muted);
}
.value{ font-size:18px; }
.value.good{ color:var(--good); }
.value.bad{ color:var(--bad); }

.charts{
  display:flex;
  gap:6px;
  align-items:center;
}
.charts canvas{
  border:1px solid rgba(255,255,255,0.16);
  border-radius:6px;
  background:rgba(0,0,0,0.22);
}

.actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
.action-btn{
  width:auto;
  text-align:center;
  padding:12px 14px;
  font-weight:700;
  letter-spacing:0.4px;
  border-color:rgba(255,209,102,0.45);
  background:rgba(255,209,102,0.12);
}

.help-overlay, .modal{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:auto;
}

.help-card{
  width:300px;
  border:1px solid rgba(127,194,255,0.35);
  background:rgba(15,22,48,0.94);
  border-radius:10px;
  padding:10px;
}
.help-title{
  font-weight:800;
  font-size:12px;
  margin-bottom:8px;
}
.help-body{
  font-size:11px;
  line-height:1.35;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.muted{ color:var(--muted); }
.tiny{ font-size:10px; margin-top:6px; }
.help-actions{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
}

.modal-card{
  width:320px;
  border:1px solid rgba(127,194,255,0.35);
  background:rgba(15,22,48,0.96);
  border-radius:10px;
  padding:10px;
}
.modal-title{
  font-weight:800;
  font-size:12px;
  margin-bottom:6px;
}
.modal-text{
  width:100%;
  height:120px;
  resize:none;
  border-radius:8px;
  padding:8px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(0,0,0,0.25);
  color:var(--text);
  font-size:10px;
  outline:none;
}
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:8px;
}
.modal-actions .small-btn, .modal-actions .action-btn{ width:auto; }
