body {
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #fff;
  margin: 0;
  padding: 0;
}

main {
  text-align: center;
  margin-top: 50px;
  width: 700px;
  padding: 0 10px;
  box-sizing: border-box;
}

#iconGrid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px 5px;
  max-width: 80%; 
  margin: 80px auto;
  justify-content: center;
}

.icon {
  font-size: 32px;
  text-align: center;
}

button {
  cursor: pointer;
  padding: 10px 20px;
  margin: 40px auto; 
  border: none;
  border-radius: 5px;
  display: flex; 
  align-items: center;
  justify-content: center; 
  font-family: 'Poppins', sans-serif; 
  font-size: 16px;
  background-color: #94b5ed;
  color: #000;
}

#startButton, #stopButton {
  width: 50px;
  height: 50px;
  background-color: #ADCBFD;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 5px;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#startButton .material-icons, 
#stopButton .material-icons {
  font-size: 1.9rem;
  margin: 0;
}

#startButton:hover, #stopButton:hover {
  background-color: #84A9E8;
}

#clearTimesLogButton {
  margin-top: 100px;
  width: 50px;
  height: 50px;
  font-family: 'Material Icons';
  color: #000;
  background-color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center; 
  justify-content: center;
}

#clearTimesLogButton .material-icons {
  font-size: 2rem;
}

#clearTimesLogButton:hover {
  color: #FF5757;
}

#result {
  font-size: 16px;
  display: none;
  margin-top: 20px;
}

#timesLog {
  list-style-type: none;
  padding: 0;
  margin-top: 20px;
  text-align: center;
}

#timesLog li {
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  main {
    width: 90%;
  }

  #iconGrid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px 5px; 
    max-width: 90%;
    margin: 60px auto;
  }

  button {
    padding: 8px 16px;
    margin: 20px auto;
    font-size: 14px;
  }

  #startButton, #stopButton {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  #iconGrid {
    grid-template-columns: repeat(5, 1fr); /* At least 5 columns of icons */
    gap: 10px 5px;
    max-width: 95%;
    margin: 50px auto;
  }

  button {
    padding: 6px 12px;
    margin: 15px auto;
    font-size: 12px;
  }

  #startButton, #stopButton {
    width: 35px;
    height: 35px;
  }
}
