/* ==========================================================================
   Snack Attack
   ========================================================================== */

.timer-bar {
  max-width: 456px;
  margin: 18px auto 0;
  height: 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--frimax-amber), var(--win));
  transition: width 0.25s linear;
}

.timer-fill.low {
  background: linear-gradient(90deg, var(--frimax-green), var(--lose));
  animation: timer-pulse 0.9s ease-in-out infinite;
}

@keyframes timer-pulse {
  50% {
    opacity: 0.55;
  }
}

.stage {
  background: #14210d;
  cursor: crosshair;
}

.stage.hit {
  animation: stage-hit 0.45s ease;
}

@keyframes stage-hit {
  0%,
  100% {
    box-shadow: var(--shadow-lg);
  }
  30% {
    box-shadow:
      0 0 0 4px var(--lose),
      var(--shadow-lg);
  }
}

/* -------------------------------------------------------------- legend --- */

.legend {
  max-width: 456px;
  margin: 26px auto 0;
  padding: 18px 20px;
}

.legend h3 {
  font-size: 1rem;
  color: var(--frimax-amber);
  margin-bottom: 12px;
}

.legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.legend li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.legend b {
  color: var(--text);
}

.legend canvas {
  flex: 0 0 auto;
  margin-top: 1px;
}
