/* CEMANI COMMAND CENTER - STYLES */

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: linear-gradient(135deg, #1a2332 0%, #2d3e5f 100%);
  font-family: 'Segoe UI', 'Roboto', -apple-system, sans-serif;
  color: #00ff88;
  overflow-x: hidden;
  height: 100vh;
}
.glass {
  background: rgba(40, 60, 90, 0.5);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(0, 255, 136, 0.4);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), inset 0 3px 0 rgba(255, 255, 255, 0.3), 0 0 30px rgba(0, 255, 136, 0.2);
}
.container {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 320px) minmax(260px, 300px);
  grid-template-rows: 50px minmax(0, 1fr) minmax(200px, 280px);
  grid-template-areas:
    "header header header"
    "cams middle sidebar"
    "cams lightcam lightcam";
  gap: 8px;
  padding: 8px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
.cameras-column {
  grid-area: cams;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.middle-column {
  grid-area: middle;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}
.sidebar {
  grid-area: sidebar;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}
.light-cam-wide {
  grid-area: lightcam;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}
.light-cam-wide .section-header {
  display: none;
}
.header {
  grid-area: header;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(40, 60, 90, 0.7), rgba(20, 40, 70, 0.7));
}
h1 { font-size: 18px; letter-spacing: 2px; text-shadow: 0 0 20px rgba(0,255,136,0.5); }

/* Header Left - Status indicator and info chips */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 20px;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(60, 80, 100, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6b6b;
  box-shadow: 0 0 8px #ff6b6b;
}
.status-dot.online {
  background: #51cf66;
  box-shadow: 0 0 10px #51cf66;
  animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 8px #51cf66; }
  50% { box-shadow: 0 0 15px #51cf66, 0 0 25px rgba(81, 207, 102, 0.5); }
}
.status-text {
  font-size: 11px;
  font-weight: 700;
  color: #ff6b6b;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.status-text.online { color: #51cf66; }

/* Large status indicator for header */
.status-indicator-large {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 25px;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(60, 80, 100, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.status-text-large {
  font-size: 16px;
  font-weight: 700;
  color: #ff6b6b;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.status-text-large.online { color: #51cf66; }

/* Small status indicator - just the dot */
.status-indicator-small {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 50%;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(60, 80, 100, 0.1);
}
.status-indicator-small .status-dot {
  width: 14px;
  height: 14px;
}

.header-info {
  display: flex;
  gap: 6px;
}
.info-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  font-size: 10px;
}
.chip-label { color: #74c0fc; font-weight: 500; }
.chip-value { color: #51cf66; font-weight: 600; }

/* Header Devices - Connection status chips */
.header-devices {
  display: flex;
  gap: 12px;
}
.device-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-width: 90px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 10px;
  border-left: 4px solid #ff6b6b;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.device-chip.online {
  border-left-color: #51cf66;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(81, 207, 102, 0.2);
}
.dev-icon { font-size: 20px; }
.dev-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dev-label {
  font-size: 10px;
  color: #74c0fc;
  text-transform: uppercase;
  font-weight: 600;
}
.dev-status {
  font-size: 14px;
  font-weight: 700;
  color: #ff6b6b;
}
.device-chip.online .dev-status { color: #51cf66; }
.dev-version {
  font-size: 9px;
  color: #888;
}

/* Header Right - Quick controls and mini status */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header Battery */
.header-battery {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 8px;
  border: 1px solid rgba(255, 200, 50, 0.3);
}
.header-batt-icon { font-size: 16px; }
.header-batt-bar {
  width: 50px;
  height: 14px;
  background: #1a1a1a;
  border-radius: 3px;
  border: 1px solid #444;
  overflow: hidden;
}
.header-batt-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff6b6b, #ffc107, #51cf66);
  transition: width 0.3s ease;
}
.header-batt-text {
  font-size: 13px;
  font-weight: 700;
  color: #ffc107;
  min-width: 35px;
}

.header-controls {
  display: flex;
  gap: 4px;
}
.header-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.15s;
}
.header-btn.go {
  background: linear-gradient(145deg, #5dd96e, #3cb550);
  color: #000;
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(100, 255, 150, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}
.header-btn.go:hover {
  transform: translateY(-1px);
  box-shadow:
    5px 5px 10px rgba(0, 0, 0, 0.5),
    -2px -2px 5px rgba(100, 255, 150, 0.2),
    0 0 15px rgba(0, 255, 136, 0.4);
}
.header-btn.go:active {
  transform: translateY(1px);
  box-shadow:
    inset 3px 3px 6px rgba(0, 0, 0, 0.3),
    inset -1px -1px 3px rgba(255, 255, 255, 0.1);
}
.header-btn.stop {
  background: linear-gradient(145deg, #ff7777, #cc4455);
  color: #fff;
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(255, 100, 100, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}
.header-btn.stop:hover {
  transform: translateY(-1px);
  box-shadow:
    5px 5px 10px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 100, 100, 0.4);
}
.header-btn.stop:active {
  transform: translateY(1px);
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.3);
}
.header-btn.clear {
  background: linear-gradient(145deg, #3a5070, #253550);
  color: #74c0fc;
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(60, 90, 120, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}
.header-btn.clear:hover {
  transform: translateY(-1px);
  box-shadow:
    5px 5px 10px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(116, 192, 252, 0.3);
}
.header-btn.clear:active {
  transform: translateY(1px);
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.3);
}
.header-status-cards {
  display: flex;
  gap: 4px;
}
.mini-status-card {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 6px;
  font-size: 9px;
  box-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.3),
    -1px -1px 2px rgba(60, 80, 100, 0.08);
}
.mini-icon { font-size: 10px; }
.mini-label { color: #74c0fc; font-weight: 500; }
.mini-value { color: #51cf66; font-weight: 600; }

/* Legacy status classes for JS compatibility */
.status { color: #ff6b6b; font-size: 11px; font-weight: bold; display: none; }
.status.online { color: #51cf66; }
.info { display: none; }
.info-item { display: none; }
.info-label { display: none; }
.info-value { display: none; }

/* Left column - Cameras stacked with space */
.cameras-column {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
}

/* Camera wrapper - 3D embossed frame - shrunk 35% from original */
.cam-wrapper {
  display: flex;
  flex-direction: column;
  flex: 0.65;
  min-height: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
/* Camera labels - 3D embossed centered */
.cam-label-centered {
  font-size: 11px;
  font-weight: 700;
  color: #00ff88;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 6px 12px;
  text-align: center;
  background: linear-gradient(145deg, #0d1520, #1a2535);
  border-radius: 10px 10px 0 0;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
  box-shadow:
    inset 2px 2px 4px rgba(0, 0, 0, 0.4),
    inset -1px -1px 2px rgba(60, 80, 100, 0.1);
}

/* Camera containers - 3D inset video screen */
.cam-container {
  flex: 1;
  min-height: 0;
  background: #000;
  border-radius: 0 0 10px 10px;
  border: none;
  overflow: hidden;
  position: relative;
  display: flex;
  box-shadow:
    inset 4px 4px 10px rgba(0, 0, 0, 0.8),
    inset -2px -2px 6px rgba(40, 60, 80, 0.2),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
}
.cam-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
}
.cam-video video, .cam-video img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 0 0 8px 8px;
}

/* Overlay controls */
.cam-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
/* Speaker button - very subtle */
.speaker-btn {
  position: absolute;
  top: 8px;
  right: 50px;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.25;
  transition: all 0.2s;
  z-index: 10;
  color: rgba(100, 255, 100, 0.6);
  pointer-events: auto;
}
.speaker-btn:hover { opacity: 0.6; transform: scale(1.1); }
.speaker-btn.muted { opacity: 0.2; color: rgba(255, 100, 100, 0.5); }

/* Camera status badge - very subtle/transparent */
.cam-status-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 80, 80, 0.15);
  color: rgba(255, 150, 150, 0.6);
  font-weight: bold;
  pointer-events: auto;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 107, 107, 0.2);
}
.cam-status-badge.live {
  background: rgba(80, 200, 100, 0.15);
  color: rgba(150, 255, 150, 0.6);
  border-color: rgba(81, 207, 102, 0.2);
}

/* PTZ D-pad overlay - Cross pattern, very subtle/transparent */
.ptz-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: grid;
  grid-template-areas:
    ". up ."
    "left . right"
    ". down .";
  grid-template-columns: 34px 34px 34px;
  grid-template-rows: 34px 34px 34px;
  gap: 2px;
  pointer-events: auto;
}
.ptz-btn {
  background: rgba(60, 80, 100, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(150, 180, 210, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.ptz-btn:hover {
  background: rgba(80, 100, 120, 0.4);
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 255, 136, 0.3);
}
.ptz-btn:active {
  background: rgba(0, 200, 100, 0.4);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 255, 136, 0.5);
}
/* Hide empty corner buttons completely */
.ptz-btn.empty { display: none; }
/* Grid area assignments for cross pattern */
.ptz-btn[data-ptz="up"], .ptz-btn[data-ptz2="up"] { grid-area: up; }
.ptz-btn[data-ptz="down"], .ptz-btn[data-ptz2="down"] { grid-area: down; }
.ptz-btn[data-ptz="left"], .ptz-btn[data-ptz2="left"] { grid-area: left; }
.ptz-btn[data-ptz="right"], .ptz-btn[data-ptz2="right"] { grid-area: right; }

/* Middle column */
.middle-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.robot-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(0, 170, 255, 0.2);
}

/* Section headers with emoji */
.section-header {
  font-size: 14px;
  font-weight: bold;
  color: #e0f7ff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.section-header .emoji { font-size: 18px; }

/* COMPASS DIAL - Deep 3D Embossed Joystick */
.compass-container {
  position: relative;
  width: 170px;
  height: 170px;
}
.compass-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, #0a1018, #182030);
  border: 5px solid #00ff88;
  position: relative;
  box-shadow:
    12px 12px 30px rgba(0, 0, 0, 0.7),
    -6px -6px 15px rgba(60, 80, 100, 0.12),
    inset 0 6px 15px rgba(0, 0, 0, 0.6),
    inset 0 -3px 8px rgba(0, 255, 136, 0.15),
    0 0 40px rgba(0, 255, 136, 0.25);
}
.compass-dir {
  position: absolute;
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, #3a5a48, #1e3828);
  border: 2px solid rgba(0, 255, 136, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #00ff88;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow:
    6px 6px 12px rgba(0, 0, 0, 0.6),
    -3px -3px 6px rgba(0, 255, 136, 0.08),
    inset 0 3px 0 rgba(255, 255, 255, 0.15),
    inset 0 -3px 0 rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}
.compass-dir:hover {
  transform: scale(1.1);
  background: linear-gradient(145deg, #4a7058, #2a4838);
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow:
    8px 8px 16px rgba(0, 0, 0, 0.7),
    -4px -4px 8px rgba(0, 255, 136, 0.1),
    0 0 25px rgba(0, 255, 136, 0.5);
}
.compass-dir:active {
  transform: scale(0.92);
  background: linear-gradient(145deg, #00ff88, #00cc6a);
  color: #000;
  text-shadow: none;
  border-color: #00ff88;
  box-shadow:
    inset 5px 5px 12px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(0, 255, 136, 0.7);
}
.compass-dir.n { top: 2px; left: 50%; transform: translateX(-50%); }
.compass-dir.e { top: 50%; right: 2px; transform: translateY(-50%); }
.compass-dir.s { bottom: 2px; left: 50%; transform: translateX(-50%); }
.compass-dir.w { top: 50%; left: 2px; transform: translateY(-50%); }
.compass-dir.n:hover { transform: translateX(-50%) scale(1.1); }
.compass-dir.e:hover { transform: translateY(-50%) scale(1.1); }
.compass-dir.s:hover { transform: translateX(-50%) scale(1.1); }
.compass-dir.w:hover { transform: translateY(-50%) scale(1.1); }
.compass-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55px;
  height: 55px;
  background: radial-gradient(circle, #1a2838 0%, #080c12 100%);
  border: 3px solid #51cf66;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow:
    6px 6px 15px rgba(0, 0, 0, 0.6),
    -3px -3px 8px rgba(81, 207, 102, 0.08),
    inset 0 0 20px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(81, 207, 102, 0.2);
}
.compass-center-label { font-size: 8px; color: #74c0fc; font-weight: bold; letter-spacing: 1px; }
.compass-center-value { font-size: 13px; color: #51cf66; font-weight: bold; text-shadow: 0 0 10px rgba(81, 207, 102, 0.7); }

/* CONTROL TANK VIEW - Robot Control with Tank Chassis */
.ctrl-tank-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}
.ctrl-middle-row {
  display: flex;
  align-items: center;
  gap: 2px;
}
.ctrl-round-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1a3a5a, #0d2840);
  border: 3px solid #00aaff;
  color: #00aaff;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  text-align: center;
  box-shadow:
    6px 6px 12px rgba(0, 0, 0, 0.6),
    -3px -3px 6px rgba(0, 170, 255, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 8px rgba(0, 170, 255, 0.6);
  transition: all 0.15s;
  z-index: 10;
}
/* L button overlaps to touch chassis edge */
#dirL {
  margin-right: -60px;
}
/* R button overlaps to touch chassis edge */
#dirR {
  margin-left: -60px;
}
.ctrl-round-btn:hover {
  background: linear-gradient(145deg, #2a4a6a, #1a3a50);
  box-shadow:
    8px 8px 16px rgba(0, 0, 0, 0.7),
    -4px -4px 8px rgba(0, 170, 255, 0.15),
    0 0 20px rgba(0, 170, 255, 0.4);
  transform: scale(1.05);
}
.ctrl-round-btn:active, .ctrl-round-btn.active {
  background: linear-gradient(145deg, #00aaff, #0088cc);
  color: #000;
  text-shadow: none;
  box-shadow:
    inset 4px 4px 8px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(0, 170, 255, 0.7);
  transform: scale(0.95);
}
.ctrl-round-btn.small {
  width: 62px;
  height: 35px;
  border-radius: 17px;
  font-size: 11px;
  border-width: 2px;
  flex-direction: row;
  gap: 3px;
}
.ctrl-track {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 200px;
}
.ctrl-temps-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 200px;
  align-items: center;
  margin: 0 6px;
}
.ctrl-wheel-temp {
  font-size: 14px;
  font-weight: bold;
  color: #ffc107;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(255, 193, 7, 0.5);
}
.ctrl-wheel {
  width: 28px;
  height: 40px;
  background: linear-gradient(90deg, #222 0%, #444 30%, #333 50%, #444 70%, #222 100%);
  border-radius: 4px;
  border: 1px solid #555;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
}
.ctrl-arrow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 2;
  color: #51cf66;
  text-shadow: 0 0 4px rgba(81, 207, 102, 0.8);
}
.ctrl-wheel.forward {
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
  border-color: #00ff88;
  animation: wheelGlowForward 0.3s ease infinite;
}
.ctrl-wheel.backward {
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
  border-color: #ff6b6b;
  animation: wheelGlowBackward 0.3s ease infinite;
}
.ctrl-wheel.backward .ctrl-arrow {
  color: #ff6b6b;
  text-shadow: 0 0 4px rgba(255, 107, 107, 0.8);
}
.ctrl-body {
  width: 90px;   /* Bigger than drive system */
  height: 180px; /* Bigger than drive system */
  background: linear-gradient(180deg, #1a5a3a 0%, #0d3d25 50%, #1a5a3a 100%);
  border: 2px solid #00ff88;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px;
}
.ctrl-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.ctrl-label {
  font-size: 10px;
  font-weight: bold;
  color: #00ff88;
  letter-spacing: 2px;
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}
.ctrl-queue {
  font-size: 8px;
  font-weight: bold;
  color: #ffc107;
  text-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  max-height: 50px;
  overflow: hidden;
}
.ctrl-queue-item {
  font-size: 7px;
  padding: 1px 4px;
  background: rgba(255, 193, 7, 0.2);
  border-radius: 3px;
  white-space: nowrap;
}
.ctrl-dir-btn {
  padding: 8px 6px;
  background: linear-gradient(145deg, #3a5a48, #1e3828);
  border: 2px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  color: #00ff88;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5), -2px -2px 4px rgba(0, 255, 136, 0.05);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
  white-space: nowrap;
}
.ctrl-dir-btn:hover {
  background: linear-gradient(145deg, #4a7058, #2a4838);
  border-color: rgba(0, 255, 136, 0.7);
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 255, 136, 0.4);
  transform: scale(1.05);
}
.ctrl-dir-btn:active, .ctrl-dir-btn.active {
  background: linear-gradient(145deg, #00ff88, #00cc6a);
  color: #000;
  text-shadow: none;
  border-color: #00ff88;
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 136, 0.6);
  transform: scale(0.95);
}
.ctrl-dir-btn.fwd, .ctrl-dir-btn.back {
  padding: 6px 12px;
  font-size: 10px;
}

/* DISTANCE BUTTONS - Deep 3D Embossed */
.dist-row {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
}
.dist-btn {
  flex: 1;
  padding: 14px 8px;
  background: linear-gradient(145deg, #3a5a48, #1e3828);
  border: 2px solid rgba(81, 207, 102, 0.3);
  border-radius: 10px;
  font-size: 16px;
  color: #51cf66;
  cursor: pointer;
  text-align: center;
  font-weight: 700;
  transition: all 0.15s;
  box-shadow:
    6px 6px 12px rgba(0, 0, 0, 0.5),
    -3px -3px 6px rgba(81, 207, 102, 0.08),
    inset 0 3px 0 rgba(255, 255, 255, 0.1),
    inset 0 -3px 0 rgba(0, 0, 0, 0.2);
  text-shadow: 0 0 8px rgba(81, 207, 102, 0.6);
}
.dist-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, #4a6a58, #2a4838);
  border-color: rgba(81, 207, 102, 0.5);
  box-shadow:
    8px 8px 16px rgba(0, 0, 0, 0.6),
    -4px -4px 8px rgba(81, 207, 102, 0.12),
    0 0 20px rgba(81, 207, 102, 0.4);
}
.dist-btn:active, .dist-btn.selected {
  transform: translateY(1px);
  background: linear-gradient(145deg, #51cf66, #3cb550);
  color: #000;
  text-shadow: none;
  border-color: #51cf66;
  box-shadow:
    inset 4px 4px 8px rgba(0, 0, 0, 0.35),
    inset -2px -2px 4px rgba(255, 255, 255, 0.25),
    0 0 15px rgba(81, 207, 102, 0.5);
}

/* COMMAND QUEUE */
.cmd-queue {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 6px;
  margin-top: 6px;
}
.cmd-queue-label { font-size: 9px; color: #74c0fc; margin-bottom: 4px; }
.cmd-queue-display {
  min-height: 22px;
  background: #0a0a0a;
  border: 1px solid #00ff88;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 9px;
  color: #51cf66;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.cmd-chip {
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid #00ff88;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cmd-chip .remove { cursor: pointer; color: #ff6b6b; }

/* STATUS */
.move-status {
  width: 100%;
  text-align: center;
  padding: 5px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: bold;
  margin-top: 4px;
}
.move-status.idle { background: rgba(116, 192, 252, 0.2); color: #74c0fc; }
.move-status.moving { background: rgba(81, 207, 102, 0.3); color: #51cf66; animation: pulse 1s infinite; }
.move-status.error { background: rgba(255, 107, 107, 0.3); color: #ff6b6b; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* EXECUTE CONTROLS - Deep 3D Embossed */
.exec-row {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}
.exec-btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.15s;
}
.exec-btn.go {
  background: linear-gradient(145deg, #5dd96e, #3cb550);
  color: #000;
  border-color: rgba(100, 255, 150, 0.4);
  box-shadow:
    6px 6px 14px rgba(0, 0, 0, 0.5),
    -4px -4px 8px rgba(100, 255, 150, 0.15),
    inset 0 4px 0 rgba(255, 255, 255, 0.35),
    inset 0 -4px 0 rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.exec-btn.go:hover {
  transform: translateY(-3px);
  box-shadow:
    8px 8px 18px rgba(0, 0, 0, 0.6),
    -4px -4px 10px rgba(100, 255, 150, 0.2),
    0 0 30px rgba(0, 255, 136, 0.6);
}
.exec-btn.go:active {
  transform: translateY(2px);
  box-shadow:
    inset 5px 5px 10px rgba(0, 0, 0, 0.35),
    inset -3px -3px 6px rgba(255, 255, 255, 0.15);
}
.exec-btn.stop {
  background: linear-gradient(145deg, #ff7777, #cc4455);
  color: #fff;
  border-color: rgba(255, 100, 100, 0.4);
  box-shadow:
    6px 6px 14px rgba(0, 0, 0, 0.5),
    -4px -4px 8px rgba(255, 100, 100, 0.1),
    inset 0 4px 0 rgba(255, 255, 255, 0.25),
    inset 0 -4px 0 rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.exec-btn.stop:hover {
  transform: translateY(-3px);
  box-shadow:
    8px 8px 18px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(255, 100, 100, 0.6);
}
.exec-btn.stop:active {
  transform: translateY(2px);
  box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.45);
}
.exec-btn.clear {
  background: linear-gradient(145deg, #4a6080, #303f58);
  color: #74c0fc;
  border-color: rgba(116, 192, 252, 0.3);
  box-shadow:
    6px 6px 14px rgba(0, 0, 0, 0.5),
    -4px -4px 8px rgba(60, 90, 120, 0.08),
    inset 0 4px 0 rgba(255, 255, 255, 0.08),
    inset 0 -4px 0 rgba(0, 0, 0, 0.15);
  text-shadow: 0 0 8px rgba(116, 192, 252, 0.5);
}
.exec-btn.clear:hover {
  transform: translateY(-3px);
  box-shadow:
    8px 8px 18px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(116, 192, 252, 0.4);
}
.exec-btn.clear:active {
  transform: translateY(2px);
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.3);
}

/* POSITION TRACKER - Middle Column */
.position-tracker {
  background: linear-gradient(145deg, #0a1520, #05101a);
  border: 2px solid rgba(0, 255, 136, 0.4);
  border-radius: 10px;
  padding: 8px;
  margin-top: 4px;
  margin-bottom: 0;
}
.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.tracker-title {
  font-size: 10px;
  font-weight: bold;
  color: #00ff88;
  letter-spacing: 1px;
}
.tracker-reset-btn {
  padding: 3px 8px;
  font-size: 9px;
  font-weight: bold;
  background: linear-gradient(145deg, #3a5070, #253550);
  border: none;
  border-radius: 4px;
  color: #74c0fc;
  cursor: pointer;
}
.tracker-reset-btn:hover {
  background: linear-gradient(145deg, #4a6080, #354560);
}
.tracker-map-container {
  position: relative;
  width: 100%;
  height: 140px;
  background: rgba(0, 10, 20, 0.95);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  overflow: hidden;
}
.tracker-canvas {
  width: 100%;
  height: 100%;
}
.tracker-scale {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 8px;
  color: rgba(0, 255, 136, 0.6);
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 5px;
  border-radius: 3px;
}
.tracker-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 4px;
  margin-top: 6px;
}
.tracker-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  background: rgba(0, 255, 136, 0.08);
  border-radius: 6px;
}
.tracker-stat .stat-label {
  font-size: 8px;
  color: #74c0fc;
  font-weight: bold;
}
.tracker-stat .stat-value {
  font-size: 11px;
  color: #51cf66;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}

/* Legacy radar styles for compatibility */
.radar-container { display: none; }
.robot-wheels {
  position: absolute;
  bottom: 2px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1px;
}
.robot-wheel {
  width: 4px;
  height: 8px;
  background: #1a1a2e;
  border-radius: 2px;
}
.radar-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 1px dashed rgba(0, 255, 136, 0.3);
  border-radius: 50%;
  pointer-events: none;
}

/* Serial monitor */
.serial-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 8px;
  min-height: 100px;
}
.serial-section.cam-serial {
  margin-top: 0;
  min-height: 0;
  height: 100%;
}
.serial {
  flex: 1;
  background: #0a0a0a;
  padding: 6px;
  overflow-y: auto;
  font-size: 9px;
  border-radius: 6px;
  border: 2px solid #00ff88;
  min-height: 60px;
  max-height: 100px;
  font-family: 'Courier New', monospace;
}
input[type="text"] {
  padding: 6px;
  background: #0a0a0a;
  border: 2px solid #00ff88;
  color: #51cf66;
  border-radius: 6px;
  width: 100%;
  font-size: 10px;
  margin-top: 5px;
}

/* RIGHT SIDEBAR - REDESIGNED */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  overflow-y: auto;
}

/* LIGHT CAM - Round camera in sidebar */
.light-cam-section {
  display: flex;
  justify-content: center;
  padding: 8px;
}
.light-cam-container {
  position: relative;
  width: 120px;
  height: 120px;
}
.light-cam-video {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #0a0a0a;
  border: 3px solid rgba(255, 200, 50, 0.6);
  box-shadow:
    0 0 20px rgba(255, 200, 50, 0.3),
    inset 0 0 25px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.light-cam-video video, .light-cam-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.light-cam-status {
  display: none;
}
.light-cam-status.live {
  background: rgba(80, 200, 100, 0.15);
  color: rgba(150, 255, 150, 0.6);
  border-color: rgba(81, 207, 102, 0.2);
}
/* Hide the light toggle button until we decode the light control */
.light-toggle-btn {
  display: none;
}
/* Large Light Cam variant - compact inline layout */
.light-cam-section.large {
  padding: 0;
  margin: 0;
}
.light-cam-section.large.top {
  padding: 0;
}
.light-cam-container.large {
  width: auto;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 1;
  flex-shrink: 0;
}
.light-cam-container.large .light-cam-video {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.light-cam-container.large .light-cam-video video,
.light-cam-container.large .light-cam-video img {
  border-radius: 50%;
}
.light-toggle-btn {
  position: static;
  background: linear-gradient(145deg, #3a3a1a, #2a2a10);
  border: 2px solid #ffc107;
  color: #ffc107;
  font-size: 10px;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
  transition: all 0.15s;
  white-space: nowrap;
}
.light-toggle-btn:hover {
  background: linear-gradient(145deg, #4a4a2a, #3a3a20);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
}
.light-toggle-btn.on {
  background: linear-gradient(145deg, #ffc107, #e6ac00);
  color: #1a1a0a;
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.7);
}

/* TWO-COLUMN STATUS GRID */
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.status-card {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(20, 30, 50, 0.4));
  padding: 8px 10px;
  border-radius: 10px;
  border-left: 3px solid #51cf66;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-card .icon { font-size: 18px; }
.status-card .info { display: flex; flex-direction: column; }
.status-card .label { font-size: 9px; color: #74c0fc; text-transform: uppercase; }
.status-card .value { font-size: 13px; color: #51cf66; font-weight: bold; }
.status-card.offline { border-left-color: #ff6b6b; }
.status-card.offline .value { color: #ff6b6b; }
.status-card.warning { border-left-color: #ffd43b; }
.status-card.warning .value { color: #ffd43b; }

/* ROBOT DIAGRAM PANEL - EV-style display */
.robot-diagram-panel {
  background: linear-gradient(135deg, rgba(0, 30, 60, 0.6), rgba(0, 15, 30, 0.8));
  border-radius: 12px;
  padding: 10px;
  border: 2px solid rgba(0, 200, 255, 0.3);
}

/* Battery Bar */
.battery-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  margin-bottom: 10px;
}
.battery-icon { font-size: 24px; }
.battery-info { flex: 1; }
.battery-level {
  height: 12px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  border: 1px solid rgba(81, 207, 102, 0.5);
  overflow: hidden;
}
.battery-fill {
  height: 100%;
  background: linear-gradient(90deg, #51cf66, #00ff88);
  border-radius: 5px;
  transition: width 0.5s ease;
}
.battery-text {
  font-size: 11px;
  color: #51cf66;
  margin-top: 4px;
  font-weight: bold;
}
.battery-bar.warning .battery-fill { background: linear-gradient(90deg, #ffd43b, #fab005); }
.battery-bar.warning .battery-text { color: #ffd43b; }
.battery-bar.critical .battery-fill { background: linear-gradient(90deg, #ff6b6b, #e94560); }
.battery-bar.critical .battery-text { color: #ff6b6b; }

/* DRIVER BOARDS ROW - Separate section at top */
.drivers-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.driver-board {
  flex: 1;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(20, 30, 50, 0.5));
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.driver-board.left { border-left: 3px solid #74c0fc; }
.driver-board.right { border-right: 3px solid #00ff88; }
.driver-board-label {
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.driver-board.left .driver-board-label { color: #74c0fc; }
.driver-board.right .driver-board-label { color: #00ff88; }
.driver-board-temp {
  font-size: 12px;
  color: #ffd43b;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
}
.driver-board-temp .temp-icon { font-size: 14px; }
.driver-board-temp .temp-val { font-size: 14px; }
.driver-board-temp.warning { color: #ff6b6b; }

/* SECTION DIVIDER */
.section-divider {
  display: flex;
  align-items: center;
  margin: 6px 0;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.4), transparent);
}
.divider-label {
  font-size: 9px;
  color: #888;
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Robot Top-Down View - WHEELS SECTION */
.robot-topdown {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

/* Wheel Side Panels */
.wheel-side {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.wheel-side.left { border-left: 3px solid #74c0fc; }
.wheel-side.right { border-right: 3px solid #00ff88; }

/* Speed display at bottom of wheel section */
.wheel-speed {
  background: rgba(0, 200, 255, 0.15);
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 6px;
  padding: 4px 10px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: auto;
}
.wheel-speed .speed-val {
  font-size: 16px;
  font-weight: bold;
  color: #00d4ff;
}
.wheel-speed .speed-unit {
  font-size: 9px;
  color: #888;
  text-transform: uppercase;
}

/* Legacy driver-side support (hidden but keep for compatibility) */
.driver-side {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.driver-side.left { border-left: 3px solid #74c0fc; }
.driver-side.right { border-right: 3px solid #00ff88; }
.driver-label {
  font-size: 9px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 150, 255, 0.4), rgba(0, 100, 200, 0.4));
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.driver-side.right .driver-label {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.4), rgba(0, 180, 100, 0.4));
}
.driver-temp {
  font-size: 11px;
  color: #ffd43b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.driver-temp .temp-icon { font-size: 14px; }
.driver-temp .temp-val { font-weight: bold; font-size: 13px; }
.driver-temp.warning { color: #ff6b6b; }

/* Wheel Group */
.wheel-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.wheel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}
.wheel-visual {
  width: 22px;
  height: 40px;
  background: linear-gradient(180deg, #444 0%, #222 50%, #444 100%);
  border: 2px solid #555;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Center hub */
.wheel-visual::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #333;
  border-radius: 50%;
  border: 1px solid #666;
  z-index: 1;
}
/* Direction arrow */
.wheel-visual::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
/* Stopped state */
.wheel-visual.stopped {
  border-color: #555;
}
.wheel-visual.stopped::after {
  content: '—';
  font-size: 10px;
  color: #666;
  opacity: 1;
  border: none;
  width: auto;
  height: auto;
}
/* Forward spinning - arrow pointing UP */
.wheel-visual.spinning-forward {
  border-color: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
  animation: wheelGlowForward 0.3s ease infinite;
}
.wheel-visual.spinning-forward::after {
  content: '▲';
  font-size: 12px;
  color: #00ff88;
  opacity: 1;
  border: none;
  width: auto;
  height: auto;
  text-shadow: 0 0 5px #00ff88;
  animation: arrowPulseUp 0.4s ease infinite;
}
/* Backward spinning - arrow pointing DOWN */
.wheel-visual.spinning-backward {
  border-color: #ff6b6b;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
  animation: wheelGlowBackward 0.3s ease infinite;
}
.wheel-visual.spinning-backward::after {
  content: '▼';
  font-size: 12px;
  color: #ff6b6b;
  opacity: 1;
  border: none;
  width: auto;
  height: auto;
  text-shadow: 0 0 5px #ff6b6b;
  animation: arrowPulseDown 0.4s ease infinite;
}
@keyframes wheelGlowForward {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 136, 0.5); }
  50% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.8); }
}
@keyframes wheelGlowBackward {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 107, 107, 0.5); }
  50% { box-shadow: 0 0 15px rgba(255, 107, 107, 0.8); }
}
@keyframes arrowPulseUp {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-2px); opacity: 0.7; }
}
@keyframes arrowPulseDown {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(2px); opacity: 0.7; }
}
.wheel-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.wheel-label { font-size: 8px; color: #aaa; font-weight: bold; }
.wheel-temp { font-size: 10px; color: #ffd43b; font-weight: bold; }
.wheel-temp.warning { color: #ff6b6b; }

/* Driver Stats */
.driver-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.driver-stats .stat {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.driver-stats .lbl { color: #888; text-transform: uppercase; }
.driver-stats .val { color: #00d4ff; font-weight: bold; }
.driver-stats .unit { color: #666; font-size: 8px; margin-left: 2px; }

/* Robot Body (center) */
.robot-body-topdown {
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.robot-front-indicator {
  font-size: 10px;
  color: #51cf66;
  font-weight: bold;
  text-align: center;
}
.robot-chassis {
  flex: 1;
  width: 100%;
  min-height: 100px;
  background: linear-gradient(180deg, rgba(0, 100, 50, 0.4) 0%, rgba(0, 60, 30, 0.6) 100%);
  border: 2px solid #00ff88;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}
.chassis-inner {
  width: 80%;
  height: 80%;
  border: 1px dashed rgba(0, 255, 136, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chassis-label {
  font-size: 8px;
  color: rgba(0, 255, 136, 0.6);
  font-weight: bold;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* DRIVE SYSTEM PANEL - 3D Embossed */
.drive-panel {
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 12px;
  padding: 10px;
  box-shadow:
    inset 3px 3px 6px rgba(0, 0, 0, 0.4),
    inset -1px -1px 3px rgba(60, 80, 100, 0.1);
}

/* Battery Row */
.battery-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: linear-gradient(145deg, #0d1520, #1a2535);
  border-radius: 8px;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.3),
    -2px -2px 4px rgba(60, 80, 100, 0.08);
}
.batt-icon { font-size: 18px; }
.batt-bar {
  flex: 1;
  height: 14px;
  background: #1a1a1a;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #333;
  box-shadow: inset 2px 2px 4px rgba(0,0,0,0.5);
}
.batt-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff6b6b 0%, #ffd43b 30%, #51cf66 60%, #51cf66 100%);
  border-radius: 6px;
  transition: width 0.5s;
  box-shadow: 0 0 10px rgba(81, 207, 102, 0.5);
}
.batt-text {
  font-size: 11px;
  font-weight: bold;
  color: #51cf66;
  min-width: 70px;
  text-align: right;
}

/* ===== EV-STYLE DRIVE SYSTEM ===== */

/* Driver Temps Row - Above Robot */
.driver-temps-row {
  display: flex;
  justify-content: space-around;
  gap: 10px;
  margin-bottom: 10px;
}
.driver-temp-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow:
    3px 3px 8px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(60, 80, 100, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.driver-icon {
  font-size: 14px;
  color: #74c0fc;
}
.driver-name {
  font-size: 9px;
  color: #74c0fc;
  font-weight: 600;
}
.driver-temp-val {
  font-size: 14px;
  font-weight: bold;
  color: #51cf66;
}
.temp-unit {
  font-size: 10px;
  color: #51cf66;
}

/* ===== TANK ROBOT TOP-DOWN VIEW ===== */
/* Layout: [Arrows] [Left Wheels] [Body] [Right Wheels] [Arrows] */
.tank-robot-view {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 0;
  margin: 0 auto;
}

/* Direction Arrows - inside wheels */
.tank-arrow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
/* Arrow states - reuse existing classes */
.tank-arrow.arrow-forward {
  opacity: 1;
  color: #00ff88;
  text-shadow: 0 0 8px #00ff88;
}
.tank-arrow.arrow-forward::before {
  content: '▲';
  animation: externalArrowUp 0.35s ease-in-out infinite;
}
.tank-arrow.arrow-forward::after {
  content: '▲';
  animation: externalArrowUp 0.35s ease-in-out infinite 0.15s;
  opacity: 0.5;
}
.tank-arrow.arrow-backward {
  opacity: 1;
  color: #ff6b6b;
  text-shadow: 0 0 8px #ff6b6b;
}
.tank-arrow.arrow-backward::before {
  content: '▼';
  animation: externalArrowDown 0.35s ease-in-out infinite;
}
.tank-arrow.arrow-backward::after {
  content: '▼';
  animation: externalArrowDown 0.35s ease-in-out infinite 0.15s;
  opacity: 0.5;
}
.tank-arrow.arrow-stopped {
  opacity: 0.4;
  color: #666;
}
.tank-arrow.arrow-stopped::before {
  content: '—';
}

/* Track (column of 2 wheels along the length) */
.tank-track {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 160px;  /* Taller than chassis (130px) so wheels extend past */
}
.tank-wheel-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.tank-wheel {
  width: 28px;
  height: 40px;
  background: linear-gradient(90deg, #222 0%, #444 30%, #333 50%, #444 70%, #222 100%);
  border-radius: 4px;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.6),
    -1px -1px 3px rgba(100, 100, 100, 0.2),
    inset 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #555;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
/* Tread pattern */
.tank-wheel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.3) 3px, rgba(0,0,0,0.3) 4px
  );
}
/* Wheel states */
.tank-wheel.spinning-forward {
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(0, 255, 136, 0.7),
    inset 0 0 10px rgba(0, 255, 136, 0.3);
  border-color: #00ff88;
  border-width: 2px;
}
.tank-wheel.spinning-forward::before {
  animation: treadScrollUp 0.2s linear infinite;
}
.tank-wheel.spinning-backward {
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(255, 107, 107, 0.7),
    inset 0 0 10px rgba(255, 107, 107, 0.3);
  border-color: #ff6b6b;
  border-width: 2px;
}
.tank-wheel.spinning-backward::before {
  animation: treadScrollDown 0.2s linear infinite;
}
.tank-wheel.stopped {
  opacity: 0.7;
}
.tank-wheel-temp {
  font-size: 14px;
  font-weight: bold;
  color: #ffd43b;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
/* Wheel boxes already ordered correctly in HTML */
.tank-track.left .tank-wheel-box,
.tank-track.right .tank-wheel-box {
  flex-direction: row;
}

/* Robot Body/Chassis - Rectangular (longer than wide) */
.tank-body {
  width: 80px;
  height: 150px;
  background: linear-gradient(180deg, #1a5a3a 0%, #0d3d25 50%, #1a5a3a 100%);
  border: 2px solid #00ff88;
  border-radius: 8px;
  box-shadow:
    0 0 15px rgba(0, 255, 136, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px 6px;
}
/* Steering buttons (L/R) - round neon blue */
.tank-steer-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1a3a5a, #0d2840);
  border: 3px solid #00aaff;
  color: #00aaff;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.1);
  transition: all 0.15s;
  z-index: 10;
  margin: 0 -15px;
}
.tank-steer-btn:hover {
  background: linear-gradient(145deg, #245580, #1a4060);
  box-shadow: 0 6px 18px rgba(0, 170, 255, 0.5);
}
.tank-steer-btn:active, .tank-steer-btn.active {
  background: linear-gradient(145deg, #00aaff, #0088cc);
  color: #0a1520;
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 170, 255, 0.7);
  transform: scale(0.95);
}
/* Direction buttons (FWD/BACK) - pill shaped inside chassis */
.tank-dir-btn {
  width: 60px;
  height: 28px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1a3a5a, #0d2840);
  border: 2px solid #00aaff;
  color: #00aaff;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
  transition: all 0.15s;
}
.tank-dir-btn:hover {
  background: linear-gradient(145deg, #245580, #1a4060);
}
.tank-dir-btn:active, .tank-dir-btn.active {
  background: linear-gradient(145deg, #00aaff, #0088cc);
  color: #0a1520;
  transform: scale(0.95);
}
/* Queue display inside chassis */
.tank-queue {
  font-size: 8px;
  font-weight: bold;
  color: #ffc107;
  text-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
  text-align: center;
  min-height: 12px;
}
.tank-label {
  font-size: 10px;
  font-weight: bold;
  color: #00ff88;
  letter-spacing: 2px;
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

/* Legacy EV styles (keep for compatibility) */
.ev-robot-view { display: none; }
@keyframes fwdPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Wheel Groups - Positioned closer to body */
.ev-wheel-group {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.ev-wheel-group.lf { left: 40px; top: 8px; }
.ev-wheel-group.lr { left: 40px; bottom: 8px; }
.ev-wheel-group.rf { right: 40px; top: 8px; }
.ev-wheel-group.rr { right: 40px; bottom: 8px; }

/* Wheels - 3D Embossed Look with Animation */
.ev-wheel {
  width: 18px;
  height: 32px;
  background: linear-gradient(90deg, #222 0%, #444 30%, #333 50%, #444 70%, #222 100%);
  border-radius: 4px;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.6),
    -1px -1px 3px rgba(100, 100, 100, 0.2),
    inset 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid #555;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
/* Tread pattern */
.ev-wheel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.3) 3px,
    rgba(0,0,0,0.3) 4px
  );
}
/* Forward spinning - green glow */
.ev-wheel.spinning-forward {
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(0, 255, 136, 0.7),
    inset 0 0 10px rgba(0, 255, 136, 0.3);
  border-color: #00ff88;
  border-width: 2px;
}
.ev-wheel.spinning-forward::before {
  animation: treadScrollUp 0.2s linear infinite;
}
/* Backward spinning - red glow */
.ev-wheel.spinning-backward {
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(255, 107, 107, 0.7),
    inset 0 0 10px rgba(255, 107, 107, 0.3);
  border-color: #ff6b6b;
  border-width: 2px;
}
.ev-wheel.spinning-backward::before {
  animation: treadScrollDown 0.2s linear infinite;
}
/* Stopped wheel - dim, no animation */
.ev-wheel.stopped {
  opacity: 0.7;
}
/* Tread scroll animations */
@keyframes treadScrollUp {
  0% { background-position: 0 0; }
  100% { background-position: 0 -8px; }
}
@keyframes treadScrollDown {
  0% { background-position: 0 0; }
  100% { background-position: 0 8px; }
}

/* Wheel Temps - Right next to wheels */
.ev-wheel-temp {
  font-size: 9px;
  font-weight: bold;
  color: #ffd43b;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

/* Wheel Row - contains wheel and direction arrow */
.ev-wheel-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Direction arrows NEXT TO wheels */
.ev-wheel-arrow {
  width: 14px;
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}

/* Forward spinning - show up arrows */
.ev-wheel-arrow.arrow-forward {
  opacity: 1;
  color: #00ff88;
  text-shadow: 0 0 8px #00ff88;
}
.ev-wheel-arrow.arrow-forward::before {
  content: '▲';
  animation: externalArrowUp 0.35s ease-in-out infinite;
}
.ev-wheel-arrow.arrow-forward::after {
  content: '▲';
  animation: externalArrowUp 0.35s ease-in-out infinite 0.15s;
  opacity: 0.5;
}

/* Backward spinning - show down arrows */
.ev-wheel-arrow.arrow-backward {
  opacity: 1;
  color: #ff6b6b;
  text-shadow: 0 0 8px #ff6b6b;
}
.ev-wheel-arrow.arrow-backward::before {
  content: '▼';
  animation: externalArrowDown 0.35s ease-in-out infinite;
}
.ev-wheel-arrow.arrow-backward::after {
  content: '▼';
  animation: externalArrowDown 0.35s ease-in-out infinite 0.15s;
  opacity: 0.5;
}

/* Stopped - show dash */
.ev-wheel-arrow.arrow-stopped {
  opacity: 0.4;
  color: #666;
}
.ev-wheel-arrow.arrow-stopped::before {
  content: '—';
}

/* External arrow animations */
@keyframes externalArrowUp {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-4px);
    opacity: 0.6;
  }
}
@keyframes externalArrowDown {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(4px);
    opacity: 0.6;
  }
}

.robot-frame-compact {
  width: 100px;
  height: 140px;
  background: linear-gradient(180deg, rgba(200, 200, 200, 0.1) 0%, rgba(150, 150, 150, 0.15) 100%);
  border: 2px solid #888;
  border-radius: 6px;
  position: relative;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}
.robot-frame-compact .fwd-arrow {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: bold;
  color: #51cf66;
  text-shadow: 0 0 6px rgba(81, 207, 102, 0.8);
}
.robot-frame-compact .rear-arrow {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: bold;
  color: #ff6b6b;
  text-shadow: 0 0 6px rgba(255, 107, 107, 0.8);
}
.robot-frame-compact .frame-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 45%;
  border: 1px dashed rgba(136, 136, 136, 0.4);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.robot-frame-compact .frame-label {
  font-size: 9px;
  font-weight: bold;
  color: rgba(200, 200, 200, 0.5);
  letter-spacing: 2px;
}
.robot-frame-compact .zlac-wheel {
  width: 20px;
  height: 36px;
}
.robot-frame-compact .zlac-wheel.left-front { top: 18px; left: -8px; }
.robot-frame-compact .zlac-wheel.left-rear { bottom: 18px; left: -8px; }
.robot-frame-compact .zlac-wheel.right-front { top: 18px; right: -8px; }
.robot-frame-compact .zlac-wheel.right-rear { bottom: 18px; right: -8px; }
.robot-frame-compact .zlac-wheel .hub {
  width: 14px;
  height: 14px;
}
.robot-frame {
  width: 160px;
  height: 200px;
  background: linear-gradient(180deg, rgba(200, 200, 200, 0.1) 0%, rgba(150, 150, 150, 0.15) 100%);
  border: 3px solid #888;
  border-radius: 8px;
  position: relative;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

/* Cameras on corners */
.cam-icon {
  position: absolute;
  font-size: 14px;
  top: 8px;
  opacity: 0.7;
}
.cam-icon.front-left { left: 10px; }
.cam-icon.front-right { right: 10px; }

/* Direction arrows */
.fwd-arrow {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: bold;
  color: #51cf66;
  text-shadow: 0 0 8px rgba(81, 207, 102, 0.8);
}
.rear-arrow {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: bold;
  color: #ff6b6b;
  text-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
}

/* ZLAC Wheels with Blue Hub */
.zlac-wheel {
  position: absolute;
  width: 28px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.6),
    -2px -2px 4px rgba(100, 100, 100, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.2s;
}
.zlac-wheel .tire {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
    #444 0%, #222 20%, #333 40%, #222 60%, #333 80%, #444 100%);
  border: 2px solid #555;
  border-radius: 6px;
  box-sizing: border-box;
}
.zlac-wheel .hub {
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #4da6ff 0%, #1a7acc 60%, #0d4d80 100%);
  border-radius: 50%;
  border: 2px solid #66b3ff;
  z-index: 2;
  box-shadow:
    0 0 8px rgba(77, 166, 255, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Wheel positions */
.zlac-wheel.left-front { top: 25px; left: -12px; }
.zlac-wheel.left-rear { bottom: 25px; left: -12px; }
.zlac-wheel.right-front { top: 25px; right: -12px; }
.zlac-wheel.right-rear { bottom: 25px; right: -12px; }

/* Wheel spinning animations */
.zlac-wheel.spinning-forward {
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(0, 255, 136, 0.6);
}
.zlac-wheel.spinning-forward .hub {
  background: radial-gradient(circle, #66ff88 0%, #33cc55 60%, #1a8033 100%);
  border-color: #88ffaa;
  animation: hubPulseForward 0.3s ease infinite;
}
.zlac-wheel.spinning-forward .tire {
  animation: tireSpinForward 0.2s linear infinite;
}

.zlac-wheel.spinning-backward {
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(255, 107, 107, 0.6);
}
.zlac-wheel.spinning-backward .hub {
  background: radial-gradient(circle, #ff8888 0%, #cc5555 60%, #802222 100%);
  border-color: #ffaaaa;
  animation: hubPulseBackward 0.3s ease infinite;
}
.zlac-wheel.spinning-backward .tire {
  animation: tireSpinBackward 0.2s linear infinite;
}

@keyframes hubPulseForward {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 136, 0.6); }
  50% { box-shadow: 0 0 15px rgba(0, 255, 136, 1); }
}
@keyframes hubPulseBackward {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 107, 107, 0.6); }
  50% { box-shadow: 0 0 15px rgba(255, 107, 107, 1); }
}
@keyframes tireSpinForward {
  0% { background-position: 0 0; }
  100% { background-position: 0 10px; }
}
@keyframes tireSpinBackward {
  0% { background-position: 0 0; }
  100% { background-position: 0 -10px; }
}

/* Center frame */
.frame-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 50%;
  border: 2px dashed rgba(136, 136, 136, 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame-label {
  font-size: 11px;
  font-weight: bold;
  color: rgba(200, 200, 200, 0.5);
  letter-spacing: 3px;
}

/* Motor Temps Grid - 3D embossed */
.motor-temps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.motor-temp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 8px;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.3),
    -2px -2px 4px rgba(60, 80, 100, 0.08);
}
.mt-label {
  font-size: 10px;
  font-weight: bold;
  color: #74c0fc;
}
.mt-value {
  font-size: 14px;
  font-weight: bold;
  color: #ffd43b;
}
.mt-unit {
  font-size: 10px;
  color: #888;
}

/* Speed Row - 3D embossed */
.speed-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.speed-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: linear-gradient(145deg, #0a1520, #152030);
  border-radius: 10px;
  border: 1px solid rgba(0, 200, 255, 0.3);
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(60, 80, 100, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.spd-label {
  font-size: 10px;
  font-weight: bold;
  color: #888;
}
.spd-val {
  font-size: 18px;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.spd-unit {
  font-size: 9px;
  color: #666;
}

/* POSITION TRACKER - Bigger map */
.position-tracker-panel {
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 10px;
  padding: 10px;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.odom-canvas {
  width: 100%;
  height: 140px;
  background: rgba(0, 10, 20, 0.95);
  border-radius: 8px;
  border: 2px solid rgba(0, 255, 136, 0.3);
  margin-bottom: 8px;
}
.odom-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 4px;
  margin-bottom: 6px;
}
.odom-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  background: rgba(0, 255, 136, 0.08);
  border-radius: 6px;
}
.odom-label {
  font-size: 8px;
  color: #74c0fc;
  font-weight: bold;
}
.odom-value {
  font-size: 11px;
  font-weight: bold;
  color: #51cf66;
}
.encoder-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.enc-item {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
}
.enc-label {
  font-size: 8px;
  color: #888;
  font-weight: bold;
}
.enc-value {
  font-size: 11px;
  color: #74c0fc;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}
.reset-odom-btn {
  width: 100%;
  padding: 8px;
  background: linear-gradient(145deg, #3a5070, #253550);
  border: none;
  border-radius: 8px;
  color: #74c0fc;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(60, 80, 100, 0.1);
}
.reset-odom-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(116, 192, 252, 0.4);
}
.reset-odom-btn:active {
  transform: translateY(1px);
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.3);
}

/* FUTURE SENSORS - Brighter, more readable */
.future-sensors {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.future-sensors.horizontal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
/* Coming Soon row with Serial trigger */
.coming-soon-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  flex-shrink: 0;
  padding: 4px;
  align-items: center;
  align-content: flex-start;
}
.serial-trigger {
  padding: 6px 12px;
  background: linear-gradient(145deg, #2a4a3a, #1a3028);
  border: 2px solid rgba(0, 255, 136, 0.5);
  border-radius: 8px;
  color: #00ff88;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(0, 255, 136, 0.2);
}
.serial-trigger:hover {
  background: linear-gradient(145deg, #3a5a4a, #2a4038);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.4);
  transform: translateY(-1px);
}
.coming-soon-row > .coming-soon-cams {
  flex: 1;
  padding: 4px;
  background: linear-gradient(145deg, rgba(40, 60, 90, 0.3), rgba(20, 40, 70, 0.3));
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 4px;
}

/* Serial Monitor Popup */
.serial-popup {
  display: none;
  position: fixed;
  top: 100px;
  left: 100px;
  width: 350px;
  height: 200px;
  background: rgba(20, 35, 55, 0.95);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(0, 255, 136, 0.5);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 255, 136, 0.2);
  z-index: 1000;
  flex-direction: column;
  overflow: hidden;
}
.serial-popup.open {
  display: flex;
}
.serial-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(145deg, #1a3028, #0d1a14);
  color: #00ff88;
  font-size: 12px;
  font-weight: 700;
  cursor: move;
  user-select: none;
  border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}
.serial-popup-close {
  font-size: 20px;
  cursor: pointer;
  color: #ff6b6b;
  line-height: 1;
  padding: 0 4px;
  transition: all 0.15s;
}
.serial-popup-close:hover {
  color: #ff4444;
  transform: scale(1.2);
}
.serial-popup .serial {
  flex: 1;
  background: #0a0a0a;
  margin: 8px;
  margin-bottom: 4px;
  padding: 6px;
  border-radius: 6px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 10px;
  color: #51cf66;
}
.serial-popup input {
  margin: 0 8px 8px 8px;
  padding: 8px;
  background: #0a0a0a;
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  color: #51cf66;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
}
.serial-popup input:focus {
  outline: none;
  border-color: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}
.coming-soon-cams .section-header {
  margin-bottom: 0;
  font-size: 9px;
  flex-shrink: 0;
}
.coming-soon-cams .future-sensors.horizontal {
  display: contents;
}
.coming-soon-cams .future-chip {
  font-size: 9px;
  padding: 3px 5px;
}
.future-chip {
  background: linear-gradient(145deg, rgba(60, 80, 100, 0.4), rgba(40, 60, 80, 0.4));
  border: 1px solid rgba(116, 192, 252, 0.3);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #aaccff;
}
.future-chip .icon { font-size: 14px; }

/* CODE EDITOR - 3D Embossed */
.code-section { margin-top: 6px; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.tab {
  padding: 6px 12px;
  background: linear-gradient(145deg, #2a3a4a, #1a252f);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  color: #e0f7ff;
  font-weight: 600;
  transition: all 0.15s;
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.3),
    -1px -1px 3px rgba(60, 80, 100, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.tab:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, #3a4a5a, #2a353f);
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(0, 255, 136, 0.2);
}
.tab.active {
  background: linear-gradient(145deg, #2a4a3a, #1a3028);
  color: #00ff88;
  box-shadow:
    inset 2px 2px 4px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(0, 255, 136, 0.3);
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}
.editor {
  flex: 1;
  min-height: 0;
  display: flex;
}
.editor textarea {
  width: 100%;
  min-height: 60px;
  flex: 1;
  background: #0a0a0a;
  color: #51cf66;
  border: 2px solid rgba(0, 255, 136, 0.4);
  border-radius: 8px;
  padding: 6px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 10px;
  resize: vertical;
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.4);
}
.btn {
  background: linear-gradient(145deg, #5dd96e, #3cb550);
  color: #0a0a0a;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 10px;
  cursor: pointer;
  margin-top: 4px;
  border: none;
  transition: all 0.15s;
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.4),
    -2px -2px 4px rgba(100, 255, 150, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow:
    5px 5px 10px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(0, 255, 136, 0.4);
}
.btn:active {
  transform: translateY(1px);
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.3);
}

/* RESPONSIVE */

/* Large screens 1600px+ */
@media (min-width: 1600px) {
  .container {
    grid-template-columns: minmax(400px, 1fr) 400px 380px;
  }
}

/* Extra large screens 1920px+ */
@media (min-width: 1920px) {
  .container {
    grid-template-columns: minmax(500px, 1fr) 440px 420px;
    gap: 12px;
    padding: 12px;
  }
}

/* Ultra wide / 4K screens 2400px+ */
@media (min-width: 2400px) {
  .container {
    grid-template-columns: minmax(600px, 1fr) 520px 500px;
    gap: 15px;
    padding: 15px;
  }
}

/* Tablet landscape 1024px-1279px */
@media (max-width: 1279px) {
  .container {
    grid-template-columns: minmax(280px, 1fr) 260px 240px;
    grid-template-rows: 50px auto 1fr;
    gap: 6px;
    padding: 6px;
  }
}

/* Tablet portrait 768px-1023px - allow scrolling */
@media (max-width: 1023px) {
  .container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "header header"
      "cams cams"
      "middle sidebar"
      "lightcam lightcam";
    gap: 10px;
    padding: 10px;
    height: auto;
    min-height: 100vh;
    max-height: none;
    overflow: visible;
  }
  .cameras-column {
    flex-direction: row;
    gap: 10px;
  }
  .cam-wrapper {
    transform: scale(1);
    margin-bottom: 0;
    flex: 1;
  }
  .header-devices { display: none; }
}

/* Phone landscape / small tablet 600px-767px */
@media (max-width: 767px) {
  .container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding: 8px;
    gap: 8px;
  }
  .header {
    flex-wrap: wrap;
    padding: 8px;
    gap: 8px;
  }
  .header h1 {
    font-size: 14px;
    width: 100%;
    text-align: center;
    order: -1;
  }
  .header-devices { display: none; }
  .header-right { font-size: 10px; }
  .cameras-column {
    flex-direction: column;
    gap: 8px;
    padding: 0;
  }
  .cam-wrapper {
    transform: scale(1);
    margin-bottom: 0;
  }
  .light-cam-wide {
    flex-direction: column;
    gap: 0;
  }
  .middle-column, .sidebar {
    width: 100%;
  }
  .tank-robot-view {
    transform: scale(0.85);
  }
}

/* Phone portrait max 480px */
@media (max-width: 480px) {
  .container {
    padding: 5px;
    gap: 6px;
  }
  .header {
    padding: 6px;
    gap: 6px;
  }
  .header h1 {
    font-size: 12px;
  }
  .header-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .info-chip {
    font-size: 9px;
    padding: 2px 6px;
  }
  .cameras-column {
    padding: 0;
    gap: 4px;
  }
  .cam-wrapper {
    transform: scale(0.9);
  }
  .section-header {
    font-size: 11px;
  }
  .tank-robot-view {
    transform: scale(0.7);
  }
  .future-sensors.horizontal {
    gap: 4px;
  }
  .future-chip {
    font-size: 9px;
    padding: 4px 6px;
  }
}

/* XBOX CONTROLLER STATUS */
.xbox-section {
  margin-top: 8px;
}
.xbox-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(145deg, #1a2535, #0d1520);
  border-radius: 10px;
  box-shadow:
    4px 4px 10px rgba(0, 0, 0, 0.4),
    -2px -2px 5px rgba(60, 80, 100, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.xbox-status.connected {
  border: 2px solid rgba(81, 207, 102, 0.5);
  box-shadow:
    4px 4px 10px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(81, 207, 102, 0.3);
}
.xbox-icon {
  font-size: 24px;
  opacity: 0.5;
}
.xbox-status.connected .xbox-icon {
  opacity: 1;
}
.xbox-label {
  font-size: 12px;
  font-weight: 600;
  color: #74c0fc;
  flex: 1;
}
.xbox-state {
  font-size: 11px;
  font-weight: 700;
  color: #ff6b6b;
  text-transform: uppercase;
}
.xbox-status.connected .xbox-state {
  color: #51cf66;
  text-shadow: 0 0 8px rgba(81, 207, 102, 0.6);
}
