/* ═══════════════════════════════════════════════════════════════════════════
   PARKING SIM — Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* -- Reset & Base -- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: #0a0a1a;
  color: #ccc;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  overflow: hidden;
}

/* -- Header -- */
#header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  gap: 8px;
}
#header .title { font-size: 15px; font-weight: bold; color: #60a5fa; }
#header .sub   { font-size: 11px; color: #6b7280; }

/* -- Badges -- */
.badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; }

/* -- Gamepad badge states -- */
.gp-warn  { background: #78350f66; color: #fbbf24; }
.gp-ok    { background: #14532d66; color: #86efac; }

/* -- Canvas -- */
#canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px;
}
canvas {
  border-radius: 6px;
  border: 1px solid #333;
  cursor: crosshair;
  display: block;
}

/* -- Controls panel -- */
#controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 12px;
  background: #111827;
  border-top: 1px solid #1f2937;
}
.ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.ctrl-group .lbl { font-size: 10px; color: #6b7280; margin-bottom: 2px; }

/* -- Buttons -- */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  font-weight: bold;
}
button:hover { filter: brightness(1.2); }

.btn-lock   { background: #1e2a4a; color: #fff; padding: 3px 6px;  font-size: 10px; border-radius: 3px; }
.btn-center { background: #374151; color: #9ca3af; padding: 2px 8px; font-size: 10px; border-radius: 3px; }
.btn-pos    { background: #1f2937; color: #6b7280; padding: 2px 6px; font-size: 10px; border-radius: 3px; }
.btn-reset  { background: #854d0e; color: #fff; padding: 4px 12px; font-size: 11px; font-weight: bold; }

/* -- Steering bar -- */
.steer-bar {
  width: 112px;
  height: 10px;
  background: #1f2937;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}
.steer-bar .center {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: #4b5563;
  left: 50%;
}
.steer-bar .dot {
  position: absolute;
  top: 0; bottom: 0;
  width: 10px;
  border-radius: 5px;
}

/* -- Info & labels -- */
.info { font-size: 10px; }
.info .val { font-weight: bold; }

label {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #9ca3af;
}
input[type=checkbox] { accent-color: #3b82f6; }
input[type=range]    { width: 80px; accent-color: #3b82f6; }

/* -- Footer -- */
#footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 4px 12px;
  border-top: 1px solid #1f2937;
  font-size: 10px;
  color: #4b5563;
  background: #0a0a1a;
}

/* -- Gamepad legend -- */
.gp-legend {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 10px;
  color: #6b7280;
  border-left: 1px solid #374151;
  padding-left: 12px;
}
.gp-legend .head { color: #4ade80; font-weight: bold; margin-bottom: 2px; }

/* -- Fullscreen -- */
body:fullscreen #canvas-wrap { flex: 1; }
body:fullscreen canvas { width: 100% !important; height: 100% !important; }
body:fullscreen { display: flex; flex-direction: column; }

/* -- Utilities -- */
.hidden   { display: none !important; }
.dist-grn { color: #4ade80; }
.dist-ylw { color: #facc15; }
.dist-red { color: #f87171; }
