@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

#timer-container {
  position: relative;
  width: 100vw;
  min-width: 390px;
  height: clamp(8rem, 30vw, 12rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 4rem;
}

#session-time,
#break-time {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateY(0);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    font-size 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  width: clamp(6ch, 8vw, 8ch);
  min-width: clamp(6ch, 8vw, 8ch);
  max-width: clamp(6ch, 8vw, 8ch);
  margin: 0 auto;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  font-family: 'Roboto Mono';
  font-size: clamp(1.2rem, 6vw, 2rem);
  opacity: 0.6;
  z-index: 1;
  pointer-events: auto;
  text-shadow: 0 4px 24px #a3d8ef88, 0 1px 0 #2228;
}

#session-time {
  color: #a3d8ef;
}

#break-time {
  color: #ffb480;
  text-shadow: 0 4px 24px #ffb48088, 0 1px 0 #2228;
}

#session-time.slide-in,
#break-time.slide-in {
  font-size: clamp(3rem, 18vw, 8rem);
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0);
  z-index: 2;
}

#session-time.slide-out {
  font-size: clamp(1.2rem, 6vw, 2rem);
  opacity: 0.6;
  transform: translate(-50%, -50%) translateY(-5rem);
  z-index: 1;
}

#break-time.slide-out {
  font-size: clamp(1.2rem, 6vw, 2rem);
  opacity: 0.6;
  transform: translate(-50%, -50%) translateY(5rem);
  z-index: 1;
}

.timer-active {
  font-size: 8rem;
  top: 50%;
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.timer-inactive {
  font-size: 2rem;
  top: 10%;
  opacity: 0.7;
  z-index: 1;
  pointer-events: none;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  height: 100vh;
  min-width: 390px;
  margin: 0;
  background: #181c25;
  color: #e0e6ed;
  font-family: 'Roboto Mono';
  overflow: hidden;
  animation: none;
}

h1 {
  color: #88c0d0; /* Nord Frost */
}

/* Nord accent example for buttons or highlights */
button,
.accent {
  background: #5e81ac;
  color: #eceff4;
  border: none;
  border-radius: 4px;
  padding: 0.5em 1em;
  cursor: pointer;
}

#button-glow {
  position: fixed;
  left: 50%;
  bottom: 4vh;
  transform: translateX(-50%);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #a3d8ef33;
  box-shadow: 0 0 12px 4px #a3d8ef88, 0 1px 6px #a3d8ef44;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 1.5s, box-shadow 0.5s;
  border: 1px solid #a3d8ef;
  animation: strangeGlow 16s infinite linear;
}

@keyframes strangeGlow {
  0% {
    box-shadow: 0 0 12px 4px #a3d8ef88, 0 0 24px 0 #a3d8ef44, 0 0 0 0 #a3d8ef;
    filter: blur(0.5px);
  }
  15% {
    box-shadow: 6px 6px 24px 8px #a3d8efcc, -4px -4px 12px 4px #a3d8ef44,
      0 0 16px 4px #a3d8efcc;
    filter: blur(1.2px);
  }
  35% {
    box-shadow: -8px 8px 32px 12px #a3d8efcc, 4px -4px 16px 6px #a3d8ef44,
      0 0 8px 2px #a3d8efcc;
    filter: blur(2px);
  }
  55% {
    box-shadow: 8px -8px 16px 12px #a3d8efcc, -6px 6px 24px 8px #a3d8ef44,
      0 0 32px 8px #a3d8efcc;
    filter: blur(1.2px);
  }
  75% {
    box-shadow: -6px -6px 24px 8px #a3d8efcc, 8px 8px 16px 4px #a3d8ef44,
      0 0 12px 4px #a3d8efcc;
    filter: blur(1.5px);
  }
  100% {
    box-shadow: 0 0 12px 4px #a3d8ef88, 0 0 24px 0 #a3d8ef44, 0 0 0 0 #a3d8ef;
    filter: blur(0.5px);
  }
}

#button-glow.visible {
  opacity: 0.85;
  transition: opacity 1.5s, box-shadow 0.5s;
}

#initialize-btn {
  position: fixed;
  left: 50%;
  bottom: 4vh;
  transform: translateX(-50%);
  font-size: clamp(1rem, 5vw, 2rem);
  color: #a3d8ef;
  border: 1px solid #a3d8ef44;
  border-radius: 2rem;
  background: transparent;
  padding: clamp(0.3em, 1vw, 0.5em) clamp(1em, 4vw, 1.5em);
  width: clamp(6ch, 8vw, 8ch);
  min-width: clamp(6ch, 8vw, 8ch);
  max-width: clamp(6ch, 8vw, 8ch);
  text-align: center;
  box-shadow: 0 0 24px 4px #a3d8ef22, 0 2px 12px #b8f2e611;
  cursor: pointer;
  transition: background 0.2s, border-color 1.5s cubic-bezier(0.4, 0, 0.2, 1),
    color 1.5s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 2.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  z-index: 10;
  overflow: visible;
  animation: pulseGlow 3.5s ease-in-out infinite;
}

#initialize-btn.fade {
  opacity: 0;
}

#initialize-btn.break-active {
  color: #ffb480;
  border: 1px solid #ffb480cc;
  box-shadow: 0 0 24px 4px #ffb48033, 0 2px 12px #ffb48022;
  animation: pulseGlowBreak 3.5s ease-in-out infinite;
}

#initialize-btn.hide-btn {
  transform: translateX(-50%) translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 2.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 1.5s;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 16px 2px #a3d8ef22, 0 2px 8px #b8f2e611;
  }
  50% {
    box-shadow: 0 0 36px 10px #a3d8ef55, 0 2px 24px 8px #b8f2e622;
  }
  100% {
    box-shadow: 0 0 16px 2px #a3d8ef22, 0 2px 8px #b8f2e611;
  }
}

@keyframes pulseGlowBreak {
  0% {
    box-shadow: 0 0 16px 2px #ffb48022, 0 2px 8px #ffb48011;
  }
  50% {
    box-shadow: 0 0 36px 10px #ffb48077, 0 2px 24px 8px #ffb48033;
  }
  100% {
    box-shadow: 0 0 16px 2px #ffb48022, 0 2px 8px #ffb48011;
  }
}

#initialize-btn:hover,
#initialize-btn:focus {
  border-color: #a3d8efcc;
  background: #2a3a4a22;
  outline: none;
}

#initialize-btn.break-active:hover {
  border-color: #ffb480;
}

/* Sound toggle button styles */
#sound-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  background: #23293aee;
  border: 1.5px solid #a3d8ef44;
  border-radius: 50%;
  box-shadow: 0 2px 8px #2226, 0 0 0 0 #a3d8ef22;
  padding: 0.4rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.3s, box-shadow 0.3s;
  outline: none;
}
#sound-toggle:hover,
#sound-toggle:focus {
  background: #2a3a4a;
  border-color: #a3d8efcc;
  box-shadow: 0 4px 16px #a3d8ef44, 0 0 0 2px #a3d8ef33;
}
#sound-toggle svg {
  display: block;
  width: 1.6rem;
  height: 1.6rem;
  color: #a3d8ef;
  pointer-events: none;
}
@media (max-width: 500px) {
  #sound-toggle {
    top: 0.7rem;
    right: 0.7rem;
    width: 2rem;
    height: 2rem;
    padding: 0.2rem;
  }
  #sound-toggle svg {
    width: 1.2rem;
    height: 1.2rem;
  }
}
