adafruit 7 segment countdown timer issue

Hi everyone. I'm new to Arduino and have a question that I'm hoping someone can help with.

I am writing a countdown timer using the adafruit 7 segment Display w/I2C Backpack.

I have the code working so that when I press the start button it will start the countdown and when I press the pause button it will pause the counter. I can reset the timer by wiring a button to the reset input on my UNO.

Where I'm struggling is I have assigned 5 outputs (8-12) that will trigger during various points of the countdown. They are being triggered for 5 seconds but when they are triggered the countdown stops and then resumes where it stopped from when the output turns off.

I would like the countdown to continue while the output is on.

My code is below. This is my first post so please let me know if you need more information. Thanks in advance.

#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"

Adafruit_7segment matrix = Adafruit_7segment();
//Number of seconds to start with
int seconds = 00;
//Number of minutes to start with
int minutes = 02;
int num = 0;
//Starts the countdown timer
int startButton = 1;
//Pauses the countdown timer
int pauseButton = 4;
//Beeps during button presses
int speaker = 6;
int buttonPresses = 0;
long time = 0;

void setup() {
  pinMode(startButton, INPUT);
  pinMode(pauseButton, INPUT);
  pinMode(speaker, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  digitalWrite(startButton, HIGH);
  digitalWrite(pauseButton, HIGH);
  matrix.begin(0x70);

  //Set brightness (Dimmest = 0 Brightest = 15)
  matrix.setBrightness (15);

  beforeTime();
}

void loop() {
  if (digitalRead(startButton) == LOW) {
    beep();
    time = millis();
    digitalWrite(7, HIGH);
    buttonPresses = 1;
  }
  if (digitalRead(pauseButton) == LOW) {
    beep();
    time = millis();
    buttonPresses = 2;
  }
  
  switch (buttonPresses) {
    case 1:
      UpdateTime();
      timeRun();
      break;
    case 2:
      timePause();
      break;
    
    default:
      beforeTime();
      time = millis();
  }
}

void beforeTime() {
  matrix.print(10000, DEC); //Print "----" on display
  matrix.writeDisplay();
  digitalWrite(7, LOW);
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);
  digitalWrite(10, LOW);
  digitalWrite(11, LOW);
  digitalWrite(12, LOW);
}

void timeRun() {
  num = minutes * 100 + seconds;
  matrix.print(num);

  //Draw the colon
  matrix.drawColon(true);

  matrix.writeDisplay();

  if (seconds + minutes == 0) {
    digitalWrite(12, HIGH);
    delay(5000);
    buttonPresses = 0;
    beforeTime();
  }

  //Set time for 1st output trigger
  if (minutes == 1 && seconds == 30) {
    //Turn the output on by making the voltage HIGH
    digitalWrite(8, HIGH);
    //Wait for 5 seconds
    delay (5000);
    //Turn the power off by making the voltage LOW
    digitalWrite(8, LOW);
  }

  //Set time for 2nd output trigger
  if (minutes == 1 && seconds == 0) {
    //Turn the output on by making the voltage HIGH
    digitalWrite(9, HIGH);
    //Wait for 5 seconds
    delay (5000);
    //Turn the power off by making the voltage LOW
    digitalWrite(9, LOW);
  }

  //Set time for 3rd output trigger
  if (minutes == 0 && seconds == 30) {
    //Turn the output on by making the voltage HIGH
    digitalWrite(10, HIGH);
    //Wait for 5 seconds
    delay (5000);
    //Turn the power off by making the voltage LOW
    digitalWrite(10, LOW);
  }

  //Set time for 4th output trigger
  if (minutes == 0 && seconds == 10) {
    //Turn the output on by making the voltage HIGH
    digitalWrite(11, HIGH);
    //Wait for 5 seconds
    delay (5000);
    //Turn the power off by making the voltage LOW
    digitalWrite(11, LOW);
  }

  UpdateTime();
}

void timePause() {
  time = millis();
}

void UpdateTime() {
  if ((millis() - time) >= 1000) {
    seconds--;
    time = millis();
    if (seconds == -1) {
      minutes--;
      seconds = 59;
    }
  }
}

void beep() {
  digitalWrite(speaker, HIGH);
  delay(100);
  digitalWrite(speaker, LOW);
  delay(1000);
}

you appear to be using delay(5000) for the 5 second delay which in effect stops processing (except interrupts)
you can use millis() to check for an elapsed time at the same time as carrying out other processing