body {
  background-color: #222;
  color: #fff;
  font-family: "Roboto", sans-serif;
}

h1 {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  color: #f0f0f0;
}

#clock {
  float: right;
  margin-right: 5%;
  display: block;
  font-size: 0.9rem;
}
#liveClock {
  margin-right: 0.5rem;
}
.link {
  padding: 0;
  margin: 5px 0;
}
a {
  color: #fff;
}

#chart-container.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background-color: #333;
  padding: 20px;
}

#fullscreenBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #555;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px;
  cursor: pointer;
  z-index: 10; /* Ensure it appears above the canvas */
}

#fullscreenBtn.exit {
  top: 20px;
  right: 20px;
}

.button-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 20px auto;
  width: 80%; /* Adjusted width to fit both button groups on one line */
}

button {
  background-color: #555;
  color: white;
  padding: 5px;
  border: none;
  border-radius: 5px;
}

@media (min-width: 768px) {
  /* Adjust the width as needed */
  button {
    padding: 8px;
  }
}

@media (min-width: 1024px) {
  /* For even wider screens */
  button {
    padding: 10px;
  }
}

#chart-container,
#relative-chart-container {
  width: 98%;
  margin: 10px auto;
  height: calc(
    100vh - 280px
  ); /* Adjust the value to fit the header and footer */
  min-height: 300px;
  background-color: #333;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.checkbox-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 5px;
  width: 100%;
}

.checkbox-group {
  margin-bottom: 0px; /* Reduce space between groups */
  display: flex;
  flex-wrap: wrap; /* Allow items to wrap to the next line if necessary */
  gap: 5px; /* Reduce space between checkboxes */
}

.checkbox-group label {
  display: flex;
  align-items: center;
  font-size: 0.9rem; /* Slightly smaller font */
  font-weight: normal; /* Normal weight */
  color: #ddd; /* Lighter color */
  white-space: nowrap; /* Prevent text from wrapping to the next line */
}

.checkbox-group label input {
  margin-right: 5px; /* Space between the checkbox and label text */
}

.checkbox-group h3 {
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 3px; /* Reduce space below the heading */
  margin-top: 0;
  width: 100%; /* Make sure the heading takes the full width */
}

@media (min-width: 768px) {
  .checkbox-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin: 20px auto;
    width: 80%;
  }

  .checkbox-group {
    margin-bottom: 0;
    margin-right: 20px; /* Space between groups */
    flex-wrap: wrap; /* Ensure items can wrap in wider layouts as well */
    gap: 5px; /* Reduce space between checkboxes */
  }

  .button-container {
    justify-content: space-between; /* Ensure groups are spaced out on one line */
    margin-top: 20px;
    gap: 50px; /* Increase gap between X and Y button groups */
  }
}

.explanation {
  font-size: 0.8rem;
  color: #bbb;
  text-align: center;
  margin-top: 20px;
  font-style: italic;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0.3rem;
}

.live-update-status {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: #32cd32;
  display: flex;
  align-items: center;
}

.live-indicator {
  width: 10px;
  height: 10px;
  background-color: #32cd32;
  border-radius: 50%;
  margin-right: 10px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#eventFinishedIndicator {
  background-color: red;
  animation: none;
}

#countdownTimer,
#liveClock {
  white-space: nowrap;
}
