
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); /* Importing retro arcade font */

body {
    background: #000000 url('images/stardust_Background.png') repeat; /* Starry background*/
    text-align: center;
    margin: 0;
    padding: 20px;
  }
  
  /* Animation colors switching SIMON headline*/
  h1 { 
    font-family: 'Press Start 2P', sans-serif;
    font-size: 2.5em;
    margin-top: 30px;
    animation: colorChange 14s infinite alternate; /* change color animation*/
  }
  /* Animation for h1 (SIMON) colors */
  @keyframes colorChange {
    0% { color: #ff0000; } 
  14% { color: #00ff00; } 
  28% { color: #0000ff; } 
  42% { color: #ffff00; } 
  57% { color: #ff00ff; } 
  71% { color: #00ffff; } 
  85% { color: #ff6600; } 
  100% { color: #9900cc; }
  }
  
  /* Main Simon game circle container */
  #game { 
    position: relative;
    width: 400px;
    height: 400px;
    margin: 40px auto;
  }

  /*"Click start game to begin"*/
  #status { 
    font-family: 'Press Start 2P', sans-serif; /*retro font*/
    color: #00ff00;
    margin-top: 50px;
    font-size: 1.1em;
    margin-left: 50px;
  }
  
  /* Simon buttons (green, red, blue, yellow) */
  .btn {
    width: 50%;
    height: 50%;
    float: left;
    box-sizing: border-box;
    border: 10px solid #000000; 
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7); /* white glow efect*/
    opacity: 0.85;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
  }

  /* hover effect for each color btn */
.btn.hoverable:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  /* Button pressed or highlighted */
  .btn.active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 30px white;
  }

  
  .green { /* green up left*/
    background-color: #20d620;
    border-top-left-radius: 100% 100%;  
    opacity: 0.9; 
  }
  
  .red { /* red up right*/
    background-color: #ff0000;
    border-top-right-radius: 100% 100%;  
    opacity: 0.9; 
  }
  
  .yellow { /* yellow down left*/
    background-color: #ffff00;
    border-bottom-left-radius: 100% 100%; 
    opacity: 0.9; 
  }
  
  .blue { /* blue down right*/
    background-color: #0000ff;
    border-bottom-right-radius: 100% 100%; 
    opacity: 0.9; 
  }
  
  /* Start button in the center */
  #start-btn {
    font-family: 'Press Start 2P', sans-serif;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px; 
    height: 140px;
    transform: translate(-50%, -50%);
    padding: 15px 25px;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    background-color:black ;
    border: 2px solid black ;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7); /* white glow efect*/
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
  }

/* Start button hover effect */
 #start-btn:not(.disabled):hover { 
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    transform: translate(-50%, -50%) scale(1.05);
  }
/* Disabled start button – no hover effect */
  #start-btn.disabled:hover { 
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    cursor: default 
  }

#back-to-menu-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10001;
  display: none;
  padding: 10px 20px;
  font-size: 1em;
  font-family: 'Press Start 2P', sans-serif;
  color: #00ff00;
  background-color: #000000;
  border: 2px solid black;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8), 0 0 15px rgba(0, 255, 0, 0.6);
  cursor: pointer;
}

#back-to-menu-btn:hover {
  background-color: #00ff00;
  color: black;
}

  
/* Quit button below the game */
  #quit-btn {
    font-family: 'Press Start 2P', sans-serif; /*retro font*/
    color: #00ff00;
    margin-top: 70px;
    font-size: 1.1em;
    margin-left: 852px;
    background-color: #000000; /* inside frame color*/
    border: 2px solid black; /* frame color*/
    border-radius: 6px;
    padding: 5px 15px; 
    display: inline-block;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8), 0 0 15px rgba(0, 255, 0, 0.6);
    display: none;
    cursor: pointer;
  }

  /* Hover effect for quit button */
  #quit-btn:hover {
    background-color: #00ff00;
    color: black;
  }

  /* Instruction button ("?") on top left */
  #instruction-btn {
    font-family: 'Press Start 2P', sans-serif; /*retro font*/
    color: #00ff00;
    margin-top: 30px;
    font-size: 1.1em;
    margin-left:100px;
    background-color: #000000; /* inside frame color*/
    border: 2px solid black; /* frame color*/
    border-radius: 6px;
    padding: 5px 15px; 
    display: inline-block;
    position: absolute;
    top: 20px;
    left: 1px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8), 0 0 15px rgba(0, 255, 0, 0.6);
    display: none;
    cursor: pointer;
  }

  /* Instruction button hover effect */
  #instruction-btn:hover {
    background-color: #00ff00;
    color: black;
  }

  /* Instruction modal popup */
  #close-instruction-modal {
    position: absolute;
    top: 283px; 
    left: 350px; 
    background-color: black;
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 10px;
    border-radius: 8px;
    width: 500px;
    max-width: 90vw; /* 90% from */
    z-index: 100;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    display: none;
    text-align: left;
    line-height: 3em;
    font-size: 0.55em;
  }
  
  
/* Modal styling */
  .modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #000;
    border: 2px solid #fff;
    padding: 20px;
    z-index: 100;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
  }
  
  /* Text inside modal */
  .modal-text {
    font-family: 'Press Start 2P', sans-serif;
    color: #00ff00;
    font-size: 14px;
    margin-bottom: 15px;
  }
  
  /* Button container inside modal */
  .modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
  }
  
  /* Buttons inside modal */
  .modal-btn {
    font-family: 'Press Start 2P', sans-serif;
    background-color: black;
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s, color 0.3s;
  }
  
  /* Hover effect for modal buttons */
  .modal-btn:hover {
    background-color: #00ff00;
    color: black;
  }
  
  /* Scoreboard design */
  #scoreboard {
    font-family: 'Press Start 2P', sans-serif; /* retro font*/
    text-align: center;
    color: #00ff00; /* green neon color*/
    background-color: #000000; /* inside frame color*/
    border: 2px solid black; /* frame color*/
    border-radius: 6px;
    padding: 5px 15px; 
    display: inline-block;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8), 0 0 15px rgba(0, 255, 0, 0.6); /* neon lights*/
    margin-top: 50px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Game over message */
  .game-over {
    font-family: 'Press Start 2P', sans-serif;
    background-color: #3b3b3b;
    color: #00ff00;
    font-size: 1.5em;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in-out;
  }
  
  /* Fade in animation for game over message */
  @keyframes fadeIn { 
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }

/* Opening Screen Styling */
#opening-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000000 url('images/stardust_Background.png') repeat; /* Starry background*/
  font-family: 'Press Start 2P', cursive;
  text-align: center;
}

/* Match title style to game title */
#simon-title {
  font-size: 10rem;
  margin-bottom: 300x;
  margin-top: -300px;
  background-image: linear-gradient(45deg, red, orange, yellow, green, cyan, blue, violet);
  background-size: 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: colorShift 10s linear infinite;
}

/* Match game title animation */
@keyframes colorShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 70px;
  margin-top: 50px;
}

/* Green Classic btn*/
.btn-classic {
  font-family: 'Press Start 2P', sans-serif; /*retro font*/
  color: #00ff00;
  background-color: #000000; /* inside frame color*/
  border: 2px solid black; /* frame color*/
  font-size:1.8em;
  border-radius: 6px;
  padding: 5px 15px; 
  display: inline-block;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8), 0 0 15px rgba(0, 255, 0, 0.6);
  cursor: pointer;
}

.btn-classic:hover {
  background-color: #00ff00;
  color: black;
}

/* Orange Timer btn*/
.btn-timer {
  font-family: 'Press Start 2P', sans-serif; /*retro font*/
  color:#ff9900;
  background-color: #000000; /* inside frame color*/
  border: 2px solid black; /* frame color*/
  font-size:1.8em;
  border-radius: 6px;
  padding: 5px 15px; 
  display: inline-block;
  box-shadow: 0 0 20px #ff9900, 0 0 15px rgba(255, 187, 0, 0.6);
  cursor: pointer;
}
.btn-timer:hover {
  background-color: #ff9900;
  color: black;
}

/* Pink Explain btn*/
.btn-explain {
 font-family: 'Press Start 2P', sans-serif; /*retro font*/
  color:#ff33cc;
  background-color: #000000; /* inside frame color*/
  border: 2px solid black; /* frame color*/
  font-size:1.8em;
  border-radius: 6px;
  padding: 5px 15px; 
  display: inline-block;
  box-shadow: 0 0 20px #ff33cc, 0 0 15px rgba(255, 0, 234, 0.6);
  cursor: pointer;
}
.btn-explain:hover {
  background-color: #ff33cc;
  color: black;
} 

#explain-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  margin-top: -100px;
  transform: translate(-50%, -50%);
  width: 600px;
  max-width: 90%;
  padding: 30px;
  background-color: black;
  color: #00ff00;
  border: 2px solid #00ff00;
  border-radius: 10px;
  font-family: 'Press Start 2P', sans-serif;
  font-size: 14px;
  line-height: 2.2em;
  z-index: 10000;
  text-align: left;
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.5);
}
/* Timer display styling for Timer Mode */
#timer-display {
  font-family: 'Press Start 2P', sans-serif; /* retro font */
  color: #ff9900; /* orange retro glow */
  font-size: 2em;
  margin-top: 20px;
  text-align: center;
  display: none; /* initially hidden – shown only in timer mode */
  text-shadow: 0 0 10px #ff9900, 0 0 20px #ff6600;
}
/* Orange version of the question button for Timer Mode */
#instruction-btn.orange-question {
  color: #ff9900;
  box-shadow: 0 0 20px #ff9900, 0 0 15px rgba(255, 187, 0, 0.6);
}

#instruction-btn.orange-question:hover {
  background-color: #ff9900;
  color: black;
}

/* Timer Mode styles */
.timer-score {
  color: orange;
  font-weight: bold;
}

.timer-btn {
  background-color: orange;
  color: white;
  border: none;
}

.timer-btn:hover {
  background-color: darkorange;
}

#crown.timer-crown {
  color: orange;
}
/* Timer mode score border */
.timer-border {
  border: 3px solid orange !important;
  box-shadow: 0 0 15px orange !important;
}

/* Timer mode orange text */
.orange-text {
  color: orange !important;
}

/* Timer modal green override */
#close-instruction-modal.timer-modal .modal-text {
  color: orange !important;
  border: none;
  text-shadow: 0 0 5px orange;
}
/* Orange modal frame for timer mode */
#close-instruction-modal.timer-modal {
  border: 3px solid orange;
  box-shadow: 0 0 12px orange;
}

/* Orange "Close" button in timer mode */
#close-instruction-modal.timer-modal .modal-btn {
  background-color: orange;
  color: black;
  box-shadow: 0 0 8px orange;
}

/* Orange "Back to Menu" button in timer mode */
#back-to-menu-btn.timer-back {
  background-color: orange;
  color: black;
  box-shadow: 0 0 10px orange;
}
/* Orange Quit button */
#quit-btn.timer-orange {
  background-color: orange;
  color: black;
  border: 2px solid orange;
  box-shadow: 0 0 10px orange;
}

/* Orange Game Over message */
#game-over-message.timer-orange {
  color: orange;
  border: 2px solid orange;
  padding: 10px;
  background-color: #2b2b2b;
  box-shadow: 0 0 12px orange;
}

/* Orange Confirm Quit Modal */
#confirm-quit-modal.timer-orange {
  border: 3px solid orange;
  box-shadow: 0 0 10px orange;
}

/* Buttons inside Confirm Modal in Timer Mode */
#confirm-quit-modal.timer-orange .modal-btn {
  background-color: orange;
  color: black;
  box-shadow: 0 0 8px orange;
}

/* Orange Close button in instructions modal */
#close-instruction-modal.timer-modal .modal-btn#close {
  background-color: orange;
  color: black;
  border: 2px solid orange;
}

/* Orange text and border for Are you sure message */
#confirm-quit-modal.timer-orange .modal-text {
  color: orange;
}

/* Orange buttons inside confirm modal */
#confirm-quit-modal.timer-orange .modal-btn {
  background-color: orange;
  color: black;
  border: 2px solid orange;
  box-shadow: 0 0 8px orange;
}
