:root {
  --background: hsl(0 0% 98%);
  --foreground: hsl(0 0% 0%);
  --accent-1: hsl(0 0% 100%);
  --accent-2: hsl(0 0% 96%);
  --border: hsl(0 0% 0% / 0.1);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  color: var(--foreground);
  background: var(--background);
  font-family: "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;
  overflow: hidden;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

header {
  display: block;
  margin: auto;
  top: 2rem;
  gap: 0.5rem;
  display: flex;
  flex-direction: column;
  left: 0;
  right: 0;
  text-align: center;
  position: absolute;
}

h1 {
  margin: 0;
}

.overlay {
  z-index: 1;
}

.car {
  position: absolute;
  width: 20px;
  height: 40px;
  will-change: transform;
  margin: 1px;
}

.car-img {
  transform: rotate(-90deg);
  transform-origin: bottom;
  width: 40px;
  height: 20px;
}

.mobile-controls {
  padding: 0 0.5rem;
  display: flex;
  justify-content: space-between;
  position: absolute;
  width: 100%;
  bottom: 0.5rem;
  display: none;
}

.controls-right,
.controls-left {
  display: flex;
  gap: 0.5rem;
}

.control-button {
  border: 1px solid var(--border);
  background: var(--accent-1);
  width: 5rem;
  height: 5rem;
  border-radius: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-button img {
  opacity: 0.5;
  width: 3rem;
}

.clear-tire-marks {
  cursor: pointer;
  font-family: inherit;
  height: 2.25rem;
  border: 1px solid var(--border);
  background: var(--accent-1);
  border-radius: 2.25rem;
  font-size: 1rem;
  padding: 0 1rem;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: none;
  color: var(--foreground);
  z-index: 1;
}
