body { 
  background:black; 
  color:white; 
  font-family:monospace; 
  overflow:hidden; 
}

/* Base canvas styling */
canvas {
  display: block;
  margin: auto;
}

/* Only the main Mequavis canvas is fixed and centered */
#mequavis {
  position: fixed;
  top: 50%;
  left: 50%;
  transform-origin: center center;
}

/* === Global MEQUAVIS Scrollbar Theme === */

/* Colors */
:root {
  --scroll-track: #050505;       /* dark panel background */
  --scroll-thumb: #0ff;          /* cyan like borders/buttons */
  --scroll-thumb-hover: #9ff;    /* lighter cyan on hover */
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

/* WebKit (Chrome, Edge, etc.) */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 4px;
  border: 1px solid #033;          /* subtle deep blue border */
  box-shadow: 0 0 4px #033 inset;  /* slight inner glow */
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

#layoutBtn {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  background: #111;
  color: #0ff;
  border: 2px solid #0ff;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: monospace;
}

#segmentLog {
  position: fixed;
  left: 10px;
  top: 60px;
  width: 260px;
  height: calc(100vh - 70px);
  background: #050505;
  border: 1px solid #0ff;
  padding: 8px;
  font-family: monospace;
  font-size: 11px;
  color: #0ff;
  overflow-y: auto;
  z-index: 998;
}

#segmentLog h2 {
  font-size: 12px;
  margin-bottom: 4px;
  color: #0ff;
}

#segmentLog .entry {
  border-bottom: 1px solid #222;
  padding: 2px 0;
}

#rightPanel {
  position: fixed;
  right: 10px;
  top: 60px;
  width: 260px;
  height: calc(100vh - 70px);
  background: #050505;
  border: 1px solid #0ff;
  padding: 8px;
  font-family: monospace;
  font-size: 11px;
  color: #0ff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 998;
}

/* Top section: big buttons */
#rightTop {
  flex: 0 0 30%;
}

.action-btn {
  width: 100%;
  margin-bottom: 6px;
  padding: 10px 4px;
  border: 1px solid #0ff;
  background: #111;
  color: #0ff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}
.action-btn:hover {
  background: #033;
}

/* Middle section: AI output */
#rightMiddle {
  flex: 1 1 auto;
  border: 1px solid #222;
  padding: 4px;
  overflow-y: auto;
  background: #000;
}

#aiOutput .msg {
  margin-bottom: 4px;
}
#aiOutput .sender {
  color: #0f0;
  font-weight: bold;
}

/* Bottom section: input + send */
#rightBottom {
  flex: 0 0 auto;
  border-top: 1px solid #222;
  padding-top: 4px;
}

#aiInput {
  width: 100%;
  box-sizing: border-box;
  background: #000;
  border: 1px solid #0ff;
  color: #0ff;
  font-family: monospace;
  font-size: 11px;
  padding: 4px;
  resize: none;
  height: 50px;
}

#aiSend {
  margin-top: 4px;
  width: 100%;
  padding: 6px 4px;
  background: #0ff;
  color: #000;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

#aiSend:hover {
  background: #9ff;
}
