body {
  background: #0f172a;
  margin: 0;
  font-family: "Aldrich";
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: white;
}

.wrapper {
  text-align: center;
}

.digit {
  display: inline-block;
  font-size: 700px;
  color: white;
  height: 180px;
  line-height: 1;
}

/* KLUCZ DO ANIMACJI */
.digit-wrapper {
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.time-part-wrapper {
  display: inline-block;
  margin-right: 50px;
  position: relative;
}

.time-part-wrapper:not(:last-child):after {
  content: ":";
  position: absolute;
  right: -30px;
  top: 0;
  font-size: 200px;
}

.time-part {
  width: 140px;
  height: 180px;
  overflow: hidden;
  display: inline-block;
}

/* UI */

.controls {
  margin-top: 30px;
}

button {
  padding: 10px 20px;
  margin: 5px;
  font-size: 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

#pauseBtn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: red;
  color: white;
}

.hidden {
  display: none;
}

#message {
  margin-top: 20px;
  font-size: 24px;
}

#timer {
  font-size: 15vw;
  font-weight: bold;
  letter-spacing: 5px;
  text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

/* pulsowanie */
.pulse .digit {
  color: red;
  animation: pulse 1s infinite;
}

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


.hiddenPage {
  display: none;
}

#timerTitle {
  font-size: 3vw;
  margin-bottom: 20px;
  letter-spacing: 3px;
}

.settingsPage {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  transition: opacity 0.3s;
}

.hiddenFade {
  opacity: 0;
  pointer-events: none;
}

.settingsCard {
  background: #1e293b;
  padding: 40px;
  border-radius: 20px;
  width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.settingsCard h1 {
  text-align: center;
  margin-bottom: 30px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: #94a3b8;
}

.field input[type="text"],
.field input[type="number"] {
  width: 90%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
}

.soundBox {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.soundBox button {
  width: 100%;
}

.checkboxRow {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: #cbd5f5;
}

.primary {
  width: 100%;
  padding: 12px;
  background: #22c55e;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
}

.danger {
  background: #ef4444;
  color: white;
}

.fullscreenBtn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1e293b;
  color: white;
  border: none;
  font-size: 20px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.progressBar {
  position: fixed;
  left: 0;
  height: 6px;
  background: #0044ff;
  width: 100%;
  top: 0;
  transform-origin: left;

  transition: transform 1s linear; /* 🔥 TO JEST KLUCZ */
}

.progressBar.bottom {
  top: auto;
  bottom: 0;
}

@keyframes flash {
  0% { color: yellow; }
  50% { color: white; }
  100% { color: yellow; }
}

.flash {
  animation: flash 0.8s infinite;
}

#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}