Simple LED project, need some tips

Greetings.
I’m trying to build a “Power crystal” to a cosplay, and the idea is pretty simple:
-You flip a switch and turn the power on;
-Blue LED charges from 0 to 255, sets boot state;
-when idle, the blue LED will “pulsate” slowly;
-when trigger is pressed, the blue LED will diminish and a red LED will increase power. (HEATING)
-when trigger is released, the blue LED will once again increase and the red LED will decrease power. (COOLDOWN)

here is a youtube demo https://youtu.be/oxrKm0gMkaU

My problem: when it’s “heating”, if you release the trigger midway it will start a cool-down, just as intended… BUT if I press the trigger again after the cool-down started, it will not : heat up again". It need to cool all the way until blue LED is at peak power to start another cycle…

The code is a bit messy, since I added some conditionals over conditionals to try to fix the problems with it…
I’d really appreciate any help into fixing this!

Thanks!
DM

here’s the circuits.io draft: http://circuits.io/circuits/2897211-sp-gauntlet

and here’s my almighty code:

/*Code By Mord 10/2016
 *This is my first code ever, the idea is to use an Arduino Micro Pro to control
 *the inner working of a steampunk gauntlet (SPG for short) I'm working on.
*/

//Output Pins
const int blueled = 3; //analog output pin, blue led
const int redled = 5; //analog output pin, red led
const int gunled = 9; //digital, gun led
const int coil1 = 10; //digital, low power relay
const int coil2 = 11; //digital, high power relay
const int pump = 13; //digital, pump
const int switch1 = 8; //on/off switch
const int fire = 12;//fire button
const int rotary = 7;//gatling motor relay


//variables
int bluebright = 0;//var blue led brightness
int redbright = 0;//var red led brightness
int boot = 0; //var system started and charged
int redstate = 0; //var red led state
int firestate = 0;//var fire button state
int switchstate1 = 0;//var switch on/off state
int switchstate2 = 0;//var switch on/off state
int bluestep=0; //using steps to subtract from the brightness so I don't mess up with the bright value and the conditionals.
int redstep=0; 



void setup() {
  //define pinModes
  pinMode(blueled, OUTPUT);
  pinMode(redled, OUTPUT);

  pinMode(gunled, OUTPUT);
  pinMode(coil1, OUTPUT);
  pinMode(coil2, OUTPUT);
  pinMode(pump, OUTPUT);
  pinMode(rotary, OUTPUT);

  pinMode(switch1, INPUT);
  pinMode(fire, INPUT);
  analogWrite(redled, 1);
  analogWrite(blueled, 1);
  Serial.begin(9600);
  
}



  
void loop() {

firestate=digitalRead(fire);
switchstate1=digitalRead(switch1);

//Did you try to turn it on and off again?
   if (boot == 0 && firestate == LOW && switchstate1==HIGH)
   {
    while (bluebright < 250)
        {
        analogWrite(blueled, bluebright);
        delay(50);
        bluebright++;
        bluebright++;
        Serial.print("blue:");
        Serial.println(bluebright);
        }
      bluebright=255;
      boot = 1;
      Serial.print("boot:");
      Serial.println(boot);
      analogWrite(blueled, 255);
    }

   
   else if (firestate == HIGH && boot == 1 && switchstate1==HIGH)
{
      digitalWrite(pump, HIGH);

      
      if (redbright<250 && switchstate1==HIGH){
      if(bluebright <5){ bluebright =5;}
      analogWrite(blueled, bluebright);
      analogWrite(redled, redbright);
      delay(100);
      bluebright--;
      bluebright--;
      bluebright--;
      bluebright--;
      redbright++;
      redbright++;
      redbright++;
      redbright++;            

      Serial.print("charge:");
      Serial.print(" blue ");
      Serial.print(bluebright);
      Serial.print(" red ");
      Serial.println(redbright);
   }} 
   
  

  else if (boot==1 && firestate == LOW && switchstate1==HIGH)
  { 
      digitalWrite(pump, LOW);
      while (bluebright < 250 && firestate == LOW && switchstate1==HIGH)
  { 
      analogWrite(blueled, bluebright);
      analogWrite(redled, redbright);
      delay(100);
      if(bluebright <= 250){
       bluebright++;
       bluebright++;
       bluebright++;
       bluebright++;} 
      if (redbright >5){
      redbright--;
      redbright--;
      redbright--;
      redbright--;} 
      Serial.print("charge:");
      Serial.print(" blue ");
      Serial.print(bluebright);
      Serial.print(" red ");
      Serial.println(redbright);
      switchstate1=digitalRead(switch1);
    }
      while (bluebright >= 250 && bluestep<150 && switchstate1==HIGH){
      analogWrite(blueled, bluebright - bluestep);
      delay(25);
      bluestep++;
      bluestep++;
      bluestep++;
      bluestep++;
      bluestep++;
      Serial.print("bluestep:");
      Serial.println(bluestep);
      }
      while (bluebright >= 250 && bluestep>00 && switchstate1==HIGH){
      analogWrite(blueled, bluebright - bluestep);
      delay(25);
      bluestep--;
      bluestep--;
      bluestep--;
      bluestep--;
      bluestep--;
      Serial.print("bluestep:");
      Serial.println(bluestep);
      }
      Serial.println("blue idle: cycle");
      switchstate1=digitalRead(switch1);
}

switchstate1=digitalRead(switch1);
//shutdown
if(switchstate1==LOW){
  boot=0;
  while (bluebright > 3){
      analogWrite(blueled, bluebright);
      delay(25);
      bluebright--;
      bluebright--;
      Serial.print("cooldown Blue:");
      Serial.println(bluebright);
      }
  while (redbright > 3){
      analogWrite(redled, redbright);
      delay(25);
      redbright--;
      redbright--;
      Serial.print("cooldown Red:");
      Serial.println(redbright);
      }
     
}

  
}
        bluebright++;
        bluebright++;
// Some more RDC
      bluebright--;
      bluebright--;
      bluebright--;
      bluebright--;
      redbright++;
      redbright++;
      redbright++;
      redbright++;

Why not:

        bluebright += 2;
// more code...
       bluebright -= 4;
       redbright += 4;

This won't fix your code, but it does shorten it a bit.

econjack: Why not:

        bluebright += 2;
// more code...
       bluebright -= 4;
       redbright += 4;

This won't fix your code, but it does shorten it a bit.

Ah, I was hoping that could be simplified! Thanks

//variables
int bluebright = 0;//var blue led brightness
int redbright = 0;//var red led brightness
int boot = 0; //var system started and charged
int redstate = 0; //var red led state
int firestate = 0;//var fire button state
int switchstate1 = 0;//var switch on/off state
int switchstate2 = 0;//var switch on/off state
int bluestep=0; //using steps to subtract from the brightness so I don't mess up with the bright value and the conditionals.
int redstep=0;

The comments are useless. It is perfectly clear what the code does.

None of these variables will ever hold a value greater than 255, so none of them needs to be an int.