
.container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

h1 {
  margin: 10px 0 15px;
  font-size: 2rem;
  color: #ffcc00;
}

p {
  margin-bottom: 20px;
  color: #aaa;
}

.selectors {
  display: flex;
  justify-content: center;
  gap: 15px;
  row-gap: 5px;
  margin: 20px 0;
}
@media (max-width: 768px) or (orientation: landscape) {
  .selectors {
    flex-wrap: wrap;
  }
}

select {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #1a1a2e;
  color: white;
}

.vs {
  align-self: center;
  font-weight: bold;
  color: #ff6b6b;
  font-size: 1.2em;
}

.controls {
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffcc00;
}

.controls input {
  transform: scale(1.2);
  cursor: pointer;
}

#startBtn {
  padding: 12px 24px;
  font-size: 18px;
  background: linear-gradient(135deg, #ff6b6b, #e63946);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin: 20px 0;
  font-weight: bold;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

button#startBtn:disabled {
  background: #444;
  cursor: not-allowed;
  box-shadow: none;
}

.race-track {
  position: relative;
  height: 130px;
  background: repeating-linear-gradient(
    90deg,
    #454545,
    #454545 25px,
    #555555 25px,
    #555555 50px
  );
  border: 2px solid #444;
  /*border-radius: 6px;*/
  margin: 25px 0;
  /*overflow: hidden;*/
  /*box-shadow: inset 0 0 10px rgba(0,0,0,0.5);*/
  scroll-margin-top: 100px;
}

.car-box {
  position: absolute;
  width: 65px;
  height: 35px;
  background: #1a1a2e;
  border: 1px solid #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: 4px;
}

#car1Box { background: rgba(30, 144, 255, 0.25); top: 18px;}
#car2Box { background: rgba(220, 20, 60, 0.25); top: 74px;}

.car-box .image {
    position: absolute;
    right: 0;
    z-index: 10;
    /*width: 100%;
    height: 100%;*/
}
.car-box:has(.image):is(#car1Box, #car2Box) {
  background: transparent;
  border-color: transparent;
}


.start-line {
  position: absolute;
  left: 65px;
  top: 0;
  width: 1px;
  height: 100%;
  background: white;
}
.finish-line {
  position: absolute;
  right: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    white 0px,
    white 12px,
    #ff5500 12px,
    #e63946 24px
  );
}

.spark {
  position: absolute;
  bottom: 25px;
  width: 8px;
  height: 8px;
  background: #ffcc00;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
  z-index: 10;
}

.spark.burnout {
  background: #ff5500;
  box-shadow: 0 0 8px #ff3300;
}

.result {
  margin-top: 20px;
  padding: 16px;
  background: rgba(30, 30, 50, 0.7);
  border-radius: 8px;
  font-size: 18px;
  border: 1px solid #444;
}
.distance {
    display: grid;
    justify-items: end;
    grid-template-columns: 70% auto;
}
.winner {
    font-size: 2rem;
    font-weight: 500;
    color: white;
}

.hidden {
  display: none;
}

.highlight {
  color: #ffcc00;
  font-weight: bold;
}

.result #actualTime {
    display: flex;
    flex-direction: column;
}

#autoSelCarsBtn {
    padding: 0;
    background: none;
    border: none;
}

#autoSelCarsBtn svg{
    width: 25px;
    height: 15px;
    padding: 0px;
    color: #ff6b6b;
}