:root,
  :root.zenika-colors {
    --blue: #4CA8E7;
    --green: #00EB84;
    --yellow: #F4C042;
    --red: #EE2238;
  }

  :root.colorblind-colors {
    --blue: #648FFF;
    --green: #FFB000;
    --yellow: #FE6100;
    --red: #DC267F;
  }

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #333333;
  font-family: "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

#expandingDiv {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;

  -moz-transition: background-color 1s ease-in;
  -webkit-transition: background-color 1s ease-in;
  -o-transition: background-color 1s ease-in;
  transition: background-color 1s ease-in;

  &.start {
    background-color: var(--blue);
  }

  &.critical {
    background-color: var(--green);
  }

  &.very-critical {
    background-color: var(--yellow);
  }

  &.ending {
    background-color: var(--red);
  }
}

#timer {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20em;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
  z-index: 10;
  user-select: none;
  pointer-events: none;
}

#startMessage {
  position: fixed;
  bottom: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  animation: pulse 1.2s infinite alternate;
  transition: opacity 0.6s ease;
  user-select: none;

}

#settingsForm {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  align-items: center;
  max-width: 700px;
  margin: 24px auto;

  label {
    justify-self: end;
    font-weight: 600;
    white-space: nowrap;
  }

  div {
    width: 100%;
  }

  #durationMinutes, #durationSeconds {
    width: 5em;
  }
}

#settingsModal {
  color: white;
  min-width: 20%;
  font-size: 2em;
  background-color: #333333;
  z-index: 50;

  h3 {
    margin-top: 0;
    text-align: center;
  }

  #closeSettings {
    position: absolute;
    top: 0;
    right: 0;
    line-height: 0.1em; /* ugly fix */
  }

  div.buttons {
    display: flex;
    gap: 12px;
  }

  button.action {
    border: 1px solid white;
    background-color: var(--blue);
    cursor: pointer;
    display: inline-block;
    color: white;
    text-align: center;
    padding: 0.4em;
    font-size: 1em;
    border-radius: 6px;
    flex: 1;
  }

}

#settingsModal::backdrop {
  background-color: #333333;
  opacity: 0.75;
}

#toggleSettings {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 20;
}



/* Animation de pulsation */
@keyframes pulse {
  0% {transform: translate(-50%, -50%) scale(1);}
  100% {transform: translate(-50%, -50%) scale(1.1);}
}

/* Animation de clignotement */
@keyframes blink {
  0%, 50%, 100% { opacity: 1;}
  25%, 75% { opacity: 0;}
}

.blinking {
  animation: blink 1s infinite;
}

#credits {
  color: white;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  z-index: 10;
}

.btn {
  border: none;
  background-color: inherit;
  cursor: pointer;
  display: inline-block;
  color: white;
  font-size: 3em;
  font-weight: bold;
  text-align: center;
  padding: 0.2em;
}
