body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1b1e48, #000000);
  font-family: "Arial", sans-serif;
  color: rgb(5, 160, 238);
  overflow: hidden;
}

#gameContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 100px; /* Adjust this value as needed */
}

#gameCanvas {
  border: 2px solid rgb(255, 255, 255);
  box-shadow: 0 4px 10px rgba(201, 164, 2, 0.5);
  max-width: 100vw;
  max-height: 100vh;
  z-index: 1;
  background-color: transparent;
  backdrop-filter: blur(8px);
}

#gameControls {
  position: absolute;
  left: 20px; /* Adjust this value to position controls on the left */
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.controlGroup {
  margin-bottom: 20px;
}

#levelSelect {
  margin-top: 5px;
}

#startButton, #pauseButton, #restartButton {
  margin-top: 10px;
}

#gameInfo {
  position: absolute;
  top: 80px;
  left: 100px; /* Adjust this value to align with the shifted game content */
  font-size: 18px;
  background-color: rgba(20, 19, 19, 0.7);
  padding: 5px 10px;
  border-radius: 5px;
  background-color: var(--background-color);
  border: var(--text-color) 2px solid;
}

a{
  color: rgb(90, 249, 75)
}
.logo {
  position: absolute;
  top: -40px;
  left: -30px;
  width: 140px;
  height: 120px;
  margin: 20px;
  display: inline-block;
}


.logo:hover {
  opacity: 0.8;
  transition: opacity 0.3s;
}

#startButton,
#restartButton,
#pauseButton {
  position: absolute;
  font-size: 24px;
  padding: 10px 20px;
  background-color: rgb(20, 171, 20);
  color: #000;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  
}

button{
  border-radius: 45px;
}
#startButton:hover,
#restartButton:hover {
  background-color: rgb(12, 247, 27);
  transform: scale(1.05);
}

#gameOver {
  position: absolute;
  top: 30%;
  left: 38%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: #f00;
  display: none;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 10px;
  animation: popIn 0.3s forwards;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  border: 2px solid #fff;
}

#instructions {
  position: absolute;
  top: 10px;
  font-size: medium;
  width: 200px;
  padding: 10px;
  font-weight: 700;
  text-decoration: solid;
}

#instructionsList {
  
  padding: 10px;
  background-color: #007bff;
  color: #f8f4f4;
  max-height: 300px; /* Set a maximum height to enable scrolling */
  overflow-y: auto; /* Enable vertical scrolling */
  display: none;
  cursor: pointer;
  
}

/* scrollbar color adding for chrome */
#instructionsList::-webkit-scrollbar {
  width: 12px; /* Width of the scrollbar */
}

#instructionsList::-webkit-scrollbar-track {
  background: #f1f1f1; /* Background of the scrollbar track */
}

#instructionsList::-webkit-scrollbar-thumb {
  background: navy; /* Color of the scrollbar handle */
  border-radius: 6px; /* Rounded corners for the scrollbar handle */
}

#instructionsList::-webkit-scrollbar-thumb:hover {
  background: #555; /* Color on hover */
}

a {
  text-decoration: none;
}


#instructionsTitle {
  border: 1px solid rgb(4, 4, 4);
  padding: 10px;
  background-color: #007bff;
  color: #040404;
  cursor: pointer;
  text-decoration: none;
  border-top: #007bff;
  border-radius: 50rem;
}
#instructionsTitle:hover{
  background-color: #0056b3;
  transform: scale(1.05);
}
h3{
  color: #000000;
}

#highScore {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 22px;
  color: #d8fd05;
}

#finalScore {
  font-size: 24px;
  margin-top: 20px;
}

@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  #instructions {
    top: 0;
    right: 10px;
    width: 200px;
  }
  #gameInfo,
  #highScore {
    font-size: 14px;
  }
}
.snowflake {
  --size: 1vw;
  background: url('https://github.com/Jay-1409/Jay_Shah_Portfolio/blob/main/public/Static/Images/SnowFlake.png?raw=true') no-repeat center center;
  width: calc(4*var(--size));
  height: calc(4*var(--size));
  background-size: cover; /* Use 'cover' if you want to cover the entire area */
  position: absolute;
  top: -5vh;
  z-index:-1;
  animation: snowfall 100s linear infinite; /* Add animation property if not already present */
}


@keyframes snowfall {
  0% {
    transform: translate3d(var(--left-ini), 0, 0);
  }
  100% {
    transform: translate3d(var(--left-end), 80vh,0); 
  }
}

.snowflake:nth-child(1) {
  --size: 0.8vw;
  --left-ini: 4vw;
  --left-end: 2vw;
  left: 55vw;
  animation: snowfall 14s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(2) {
  --size: 0.8vw;
  --left-ini: 5vw;
  --left-end: 5vw;
  left: 63vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(3) {
  --size: 0.2vw;
  --left-ini: 0vw;
  --left-end: -3vw;
  left: 17vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(4) {
  --size: 0.2vw;
  --left-ini: -5vw;
  --left-end: 10vw;
  left: 66vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(5) {
  --size: 0.6vw;
  --left-ini: -6vw;
  --left-end: 3vw;
  left: 39vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(6) {
  --size: 0.4vw;
  --left-ini: 2vw;
  --left-end: 3vw;
  left: 86vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(7) {
  --size: 0.2vw;
  --left-ini: -1vw;
  --left-end: 7vw;
  left: 87vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -2s;
}

.snowflake:nth-child(8) {
  --size: 0.6vw;
  --left-ini: -3vw;
  --left-end: 3vw;
  left: 77vw;
  animation: snowfall 15s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(9) {
  --size: 0.8vw;
  --left-ini: -4vw;
  --left-end: -5vw;
  left: 50vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(10) {
  --size: 0.8vw;
  --left-ini: 1vw;
  --left-end: -1vw;
  left: 34vw;
  animation: snowfall 12s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(11) {
  --size: 1vw;
  --left-ini: 4vw;
  --left-end: 4vw;
  left: 29vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(12) {
  --size: 0.4vw;
  --left-ini: 9vw;
  --left-end: -1vw;
  left: 100vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(13) {
  --size: 0.4vw;
  --left-ini: 8vw;
  --left-end: -2vw;
  left: 86vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -3s;
}

.snowflake:nth-child(14) {
  --size: 0.8vw;
  --left-ini: -1vw;
  --left-end: -1vw;
  left: 18vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(15) {
  --size: 0.8vw;
  --left-ini: 0vw;
  --left-end: 10vw;
  left: 35vw;
  animation: snowfall 15s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(16) {
  --size: 1vw;
  --left-ini: 10vw;
  --left-end: -5vw;
  left: 23vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(17) {
  --size: 0.8vw;
  --left-ini: -3vw;
  --left-end: 1vw;
  left: 89vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(18) {
  --size: 0.8vw;
  --left-ini: 8vw;
  --left-end: 6vw;
  left: 33vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(19) {
  --size: 0.6vw;
  --left-ini: -1vw;
  --left-end: 1vw;
  left: 26vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(20) {
  --size: 0.4vw;
  --left-ini: 7vw;
  --left-end: -9vw;
  left: 75vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(21) {
  --size: 0.2vw;
  --left-ini: -2vw;
  --left-end: -7vw;
  left: 81vw;
  animation: snowfall 14s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(22) {
  --size: 0.6vw;
  --left-ini: 9vw;
  --left-end: -7vw;
  left: 75vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(23) {
  --size: 0.2vw;
  --left-ini: 7vw;
  --left-end: -9vw;
  left: 28vw;
  animation: snowfall 12s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(24) {
  --size: 1vw;
  --left-ini: 5vw;
  --left-end: 8vw;
  left: 17vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(25) {
  --size: 0.8vw;
  --left-ini: -7vw;
  --left-end: 5vw;
  left: 29vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(26) {
  --size: 0.8vw;
  --left-ini: 10vw;
  --left-end: -8vw;
  left: 19vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(27) {
  --size: 1vw;
  --left-ini: 5vw;
  --left-end: 7vw;
  left: 71vw;
  animation: snowfall 7s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(28) {
  --size: 0.8vw;
  --left-ini: -2vw;
  --left-end: 5vw;
  left: 96vw;
  animation: snowfall 14s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(29) {
  --size: 0.4vw;
  --left-ini: 8vw;
  --left-end: -5vw;
  left: 67vw;
  animation: snowfall 15s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(30) {
  --size: 0.4vw;
  --left-ini: 9vw;
  --left-end: -1vw;
  left: 14vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(31) {
  --size: 0.8vw;
  --left-ini: 9vw;
  --left-end: -6vw;
  left: 38vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(32) {
  --size: 0.2vw;
  --left-ini: -1vw;
  --left-end: -3vw;
  left: 96vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(33) {
  --size: 0.6vw;
  --left-ini: 1vw;
  --left-end: 0vw;
  left: 10vw;
  animation: snowfall 12s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(34) {
  --size: 0.6vw;
  --left-ini: 8vw;
  --left-end: -9vw;
  left: 73vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -2s;
}

.snowflake:nth-child(35) {
  --size: 0.6vw;
  --left-ini: 10vw;
  --left-end: -8vw;
  left: 53vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -2s;
}

.snowflake:nth-child(36) {
  --size: 0.8vw;
  --left-ini: 1vw;
  --left-end: -7vw;
  left: 62vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(37) {
  --size: 0.2vw;
  --left-ini: -4vw;
  --left-end: 8vw;
  left: 47vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(38) {
  --size: 0.8vw;
  --left-ini: 5vw;
  --left-end: 5vw;
  left: 4vw;
  animation: snowfall 12s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(39) {
  --size: 0.8vw;
  --left-ini: 3vw;
  --left-end: -2vw;
  left: 29vw;
  animation: snowfall 7s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(40) {
  --size: 1vw;
  --left-ini: -5vw;
  --left-end: -6vw;
  left: 65vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(41) {
  --size: 0.6vw;
  --left-ini: -6vw;
  --left-end: 3vw;
  left: 52vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(42) {
  --size: 0.2vw;
  --left-ini: 5vw;
  --left-end: -9vw;
  left: 48vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(43) {
  --size: 1vw;
  --left-ini: 0vw;
  --left-end: -3vw;
  left: 44vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(44) {
  --size: 0.4vw;
  --left-ini: 5vw;
  --left-end: 7vw;
  left: 20vw;
  animation: snowfall 7s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(45) {
  --size: 0.8vw;
  --left-ini: 4vw;
  --left-end: 7vw;
  left: 78vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(46) {
  --size: 0.4vw;
  --left-ini: -4vw;
  --left-end: 3vw;
  left: 63vw;
  animation: snowfall 7s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(47) {
  --size: 0.6vw;
  --left-ini: -7vw;
  --left-end: -7vw;
  left: 19vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(48) {
  --size: 0.8vw;
  --left-ini: -4vw;
  --left-end: 4vw;
  left: 47vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(49) {
  --size: 0.2vw;
  --left-ini: 10vw;
  --left-end: -1vw;
  left: 43vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(50) {
  --size: 0.6vw;
  --left-ini: -4vw;
  --left-end: 7vw;
  left: 86vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -2s;
}
.snowflake:nth-child(51) {
  --size: 0.6vw;
  --left-ini: -7vw;
  --left-end: -7vw;
  left: 19vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(52) {
  --size: 0.8vw;
  --left-ini: -4vw;
  --left-end: 4vw;
  left: 47vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(53) {
  --size: 0.2vw;
  --left-ini: 10vw;
  --left-end: -1vw;
  left: 43vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(54) {
  --size: 0.6vw;
  --left-ini: -4vw;
  --left-end: 7vw;
  left: 86vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -2s;
}

.snowflake:nth-child(55) {
  --size: 0.6vw;
  --left-ini: -4vw;
  --left-end: 7vw;
  left: 86vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -2s;
}



/* added small blur every 6 snowflakes*/
.snowflake:nth-child(6n) {
  filter: blur(1px);
}




/* Dark mode */

/* Default light mode colors */
:root {
  --background-color: rgb(7, 7, 7);
  --text-color: rgb(233, 217, 217);
  --header-bg: lightgray;
}

h2{
  color: var(--text-color);
}
/* Dark mode colors */
[data-theme="dark"] {
  --background-color: #121212;
  --text-color: #94838d;
  --header-bg: #1c1c1c;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

header {
  background-color: grey;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  margin: 0;
}

.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

#mode-label {
  margin-left: 10px;
  font-size: 1rem;
}

/* Toggle Switch */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
  background: linear-gradient(135deg, #a06506, #eec009); 
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background-image: url('https://img.icons8.com/ios-filled/50/ffffff/sun.png'); 
  background-size: cover;
  transition: 0.4s;
  top: 3px;
  left: 4px;
}

input:checked + .slider {
  background: linear-gradient(135deg, #34495e, #2c3e50); 
}

input:checked + .slider:before {
  background-image: url('https://img.icons8.com/ios-filled/50/ffffff/crescent-moon.png'); 
  transform: translateX(26px);
}

#volumeControl {
  margin: 15px;
  display: flex;
  align-items: center;
}

#volumeSlider {
  margin-left: 10px;
  width: 150px;
}

#liveScore {
  position: absolute;
  top: 10px;
  left: 134px;
  font-size: 20px;
  font-weight: bold;
  color: white;
}
#liveLife {
  position: absolute;
  top: 42px;
  left: 134px;
  font-size: 20px;
  font-weight: bold;
  color: white;
}




.sidebar {
  background-color: grey;
  height: 100%;
  gap: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
/*---------------------*/

.controls{
  display: none;
}

@media (max-width: 480px){
  /* Control Buttons for Mobile */
  .controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px; /* Space between buttons */
  }

  .controls button {
    background-color: #0f0;
    color: #000;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .controls button:hover {
    background-color: #00b300;
  }

  /* Pop-in Animation */
  @keyframes popIn {
    0% {
      transform: scale(0.5);
      opacity: 0;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
}


.nameofplayer{
  position: absolute;
  top: 70px;
  left: 50;
  font-size: 30px;
  color:white;
  font-weight: bold;
}

