* {
  box-sizing: border-box;
}

body {
  background-color: #121212;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 12px;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 420px;
}

h2 {
  text-align: center;
  margin-top: 5px;
  margin-bottom: 15px;
  color: #00e676;
}

.card {
  background: #1e1e1e;
  padding: 15px;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card h3 {
  font-size: 13px;
  color: #aaa;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard {
  background: #2a2a2a;
  text-align: center;
}

.speed-box {
  font-size: 56px;
  font-weight: bold;
  color: #00e676;
  line-height: 1;
  margin-bottom: 5px;
}

.unit {
  font-size: 18px;
  color: #aaa;
}

.battery-section {
  margin-top: 15px;
  text-align: left;
}

.battery-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #ddd;
}

.battery-bar-bg {
  width: 100%;
  height: 12px;
  background-color: #444;
  border-radius: 6px;
  overflow: hidden;
}

.battery-fill {
  height: 100%;
  background-color: #00e676;
  transition: width 0.3s ease;
}

.status {
  margin-top: 12px;
  font-size: 13px;
  color: #ff9800;
  font-weight: bold;
}

.btn-group {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.btn {
  flex: 1;
  padding: 12px 6px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.full-width {
  width: 100%;
  display: block;
}

.primary { background: #2196f3; color: #fff; }
.success { background: #4caf50; color: #fff; }
.warning { background: #ff9800; color: #fff; }
.danger { background: #f44336; color: #fff; }
.secondary { background: #333; color: #fff; border: 1px solid #444; }

.btn:active {
  opacity: 0.7;
}

.speed-slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.slider {
  flex: 1;
  accent-color: #f44336;
}

.speed-badge {
  font-weight: bold;
  font-size: 15px;
  color: #ff9800;
  min-width: 60px;
}

.console-card {
  background: #181818;
}

.console-box {
  background: #0d0d0d;
  color: #00ff66;
  font-family: monospace;
  font-size: 11px;
  padding: 10px;
  border-radius: 6px;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
