.timer {
  --progress: 360deg;
  --tail-start: 285deg;
  --head-start: 344deg;
  position: relative;
  isolation: isolate;
  width: 92px;
  height: 92px;
  margin: 4px auto 16px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--lime);
  font: initial;
}

.timer-track,
.timer-comet {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.timer-track {
  border: 6px solid rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 8px rgba(124, 41, 230, 0.04);
}

.timer-comet {
  background: conic-gradient(
    from -90deg,
    #421876 0deg,
    #7c29e6 var(--tail-start),
    #a6ff35 var(--head-start),
    #a6ff35 var(--progress),
    transparent var(--progress) 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  filter: drop-shadow(0 0 5px rgba(124, 41, 230, 0.65));
  transition: filter 0.25s ease;
}

.timer-comet::after {
  content: none;
}

.timer-value {
  position: relative;
  z-index: 1;
  color: var(--lime);
  font: 48px/1 Akrobat, sans-serif;
  transform-origin: center;
  text-shadow: 0 0 14px rgba(166, 255, 53, 0.2);
}

.timer.urgent .timer-track {
  border-color: rgba(230, 47, 41, 0.07);
}

.timer.urgent {
  animation: none;
}

.timer.urgent .timer-comet {
  background: conic-gradient(
    from -90deg,
    #561412 0deg,
    #9e1916 var(--tail-start),
    #e62f29 var(--head-start),
    #e62f29 var(--progress),
    transparent var(--progress) 360deg
  );
  filter: drop-shadow(0 0 6px rgba(230, 47, 41, 0.75));
}

.timer.urgent .timer-comet::after {
  background: #e62f29;
  box-shadow: 0 0 7px rgba(230, 47, 41, 1), 0 0 13px rgba(230, 47, 41, 0.72);
}

.timer.urgent .timer-value {
  color: #e62f29;
  text-shadow: 0 0 14px rgba(230, 47, 41, 0.34);
}

.timer.critical .timer-value {
  animation: timer-number-pulse 1s cubic-bezier(.4, 0, .2, 1) infinite;
}

@keyframes timer-number-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  .timer-comet { transition: none; }
  .timer.critical .timer-value { animation: none; }
}
