@font-face {
  font-family: 'LeBeauneNew';
  src: url("https://db.onlinewebfonts.com/t/9f4965a37ac189de7844a4c13c7108f5.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/9f4965a37ac189de7844a4c13c7108f5.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem;
  font-family: 'LeBeauneNew', sans-serif;
  color: white;
  text-align: center;
  position: relative;
  min-height: 100vh;
  background-image: url('images/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(22, 34, 55, 0.8);
  z-index: -1;
  pointer-events: none;
}

.challenge-title {
  font-family: 'LeBeauneNew', sans-serif;
  color: #f15f24;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

#grid-area {
  position: relative;
  width: 100%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background-image: linear-gradient(#86dabd 1px, transparent 1px),
                    linear-gradient(90deg, #86dabd 1px, transparent 1px);
  background-size: 40px 40px;
  border: 2px solid #86dabd;
  border-radius: 10px;
  overflow: hidden;
}

#ball {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #f15f24;
  border-radius: 50%;
  left: 0;
  bottom: 0;
  transform: translate(-50%, 0);
}

#bucket {
  position: absolute;
  width: 40px;
  height: 40px;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 5;
}

#bucketLabel {
  position: absolute;
  bottom: 45px;
  left: 0;
  transform: translateX(-50%);
  background-color: rgba(22, 34, 55, 0.75);
  color: #86dabd;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.9rem;
  padding: 2px 8px;
  border-radius: 5px;
  pointer-events: none;
  z-index: 10;
}

#controls {
  position: absolute;
  bottom: 380px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(22, 34, 55, 0.85);
  border: 2px dashed #f15f24;
  padding: 1rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10;
  width: 90%;
  max-width: 410px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
}

.slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #86dabd;
}

.slider-row span:first-child {
  width: 80px;
  text-align: left;
}

.slider-row input[type="range"] {
  width: 60%;
  vertical-align: middle;
  margin: 0.2em 0;
}

.slider-row span[id$="Value"] {
  display: inline-block;
  min-width: 2.5ch;
  text-align: right;
}

.buttons {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 0.5rem;
}

button {
  background-color: #f15f24;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

#timer {
  color: white;
  font-size: 1.2rem;
}

#trail-container {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.trail-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: rgba(241, 95, 36, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
