@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');

* {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
}

html, body {
  min-height: 100dvh;
}

body {
  margin: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

h1 {
  display: inline-block;
  font-size: 4rem;
}

#time {
  font-size: 3rem;

  & > span {
    display: inline-block;
    &:not(.colon) {
      min-width: 65px;
    }

    text-align: center;
  }
}

button {
  all: unset;
  display: inline-block;
  cursor: pointer;
  font-weight: bold;
  min-width: 4rem;
  height: 2rem;
  padding: 8px 16px;
  border: 2px solid #333;
  border-radius: 6px;
  background-color: #f0f0f0;
  font-size: 1rem;
  text-align: center;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #e0e0e0;
}

button:active {
  background-color: #d0d0d0;
}

button:focus-visible {
  outline: 2px solid #007acc;
  outline-offset: 2px;
}

button:focus:not(:focus-visible) {
  outline: none;
}

.toggle-container {
  margin-top: 1rem;
}

.toggle-container label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
}

.toggle-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Hide hours, minutes, and colons in seconds-only mode */
#time.seconds-only .hours,
#time.seconds-only .minutes,
#time.seconds-only .colon {
  display: none;
}
