body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
  }
  
  #countdown-wrapper,
  #score-wrapper {
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    font-family: Verdana;
    color:#fff;
    border-radius: 10px;
    padding: 6px 12px;
    width:16%;
    position: absolute;
    top: 0.5vh;
    right: 1vw; /* Center horizontally */
    font-size: calc(0.9rem + 0.5vw); /* Responsive font size */
    z-index: 19; /* Ensure it's on top of the A-Frame canvas */
    text-align: right;
    opacity: 0.8;
  }
  
  #score-wrapper {
    left: 1vw;
    text-align: left;
  }
  
  #final-score-div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7); /* Optional: semi-transparent background */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    z-index: 19;
  }

  #celebration{
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 19;
  }
  
  #final-score {
    font-size: calc(2rem + 0.5vw); /* Responsive font size */
    margin: 20px;
    color: antiquewhite;
  }
  
  #final-image {
    margin-bottom: 20px;
  }
  
  button {
    margin: 10px;
    padding: 10px 20px;
    font-size: calc(1rem + 0.5vw); /* Responsive font size */
  }
  
  #start-button-container {
    position: fixed;
    bottom: 2%; /* Adjust this to move the button up/down from the very bottom */
    left: 50%;
    transform: translateX(-50%);
    z-index: 19; /* To make sure it's above everything else */
  }
  
  #start-button {
    padding: 10px 20px;
    font-size: calc(1.2rem + 0.5vw); /* Responsive font size */
    background-color: #007bff;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.9;
  }
  
  #start-button:hover {
    background-color: #0056b3;
  }
  
  #recorder {
    display: none;
  }
  
  .instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    font-size: calc(1rem + 0.5vw);
    text-align: center;
    display: flex;
    flex-direction: column;
    z-index: 19; /* To make sure it's above everything else */
    align-items: center;
    opacity: 0.9;
  }
  
.zoom-instruction,
.move-instruction,
.click-instruction,
.swipe-instruction {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.9;
}

#pinch {
  animation: pulse 2s infinite;
}

#click {
  animation: pulse 2s infinite;
}

#zoom-icon {
  width: calc(2rem + 1vw); /* Responsive icon size */
  height: auto;
  margin-top: 0.5rem;
}

#move-icon {
  width: calc(2rem + 1vw); /* Responsive icon size */
  height: auto;
  margin-top: 0.5rem;
}

#click-icon {
  width: calc(2rem + 1vw); /* Responsive icon size */
  height: auto;
  margin-top: 0.5rem;
}
  
  @keyframes pulse {
    0% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.7;
      transform: scale(0.9);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  #swipe-icon {
    width: calc(2rem + 1vw); /* Responsive icon size */
    height: auto;
    margin-top: 0.5rem;
    animation: swipeUp 2s infinite;
  }
  
  @keyframes swipeUp {
    0% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
    100% {
      transform: translateY(0);
    }
  }

  #available-foods-container,
  #recalibrate-button {
    position: fixed;
    bottom: 8vh; /* 2% of the viewport height */
    display: flex;
    align-items: center;
    border: none;
    background: none;
    font-family: Verdana;
    color:#fff;
    border-radius: 10px;
    padding: 4px 6px;
    width:16%;
    position: absolute;
    right: 1vw; /* Center horizontally */
    z-index: 12; /* Ensure it's on top of the A-Frame canvas */
    text-align: right;
    opacity: 0.8;
  }


#available-foods-container {
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}


#recalibrate-button {
    left: 1vw;
    text-align: left;
  margin-top:15px;
  }

  #available-foods-container img,
  #recalibrate-button img {
    width: 6vw; /* 5% of the viewport width */
    height: auto; /* maintain aspect ratio */
    margin-right: 4px;
  }

  #recalibrate-button img {
    margin-right: 0px;
  }

  #available-foods {
    font-size: calc(1rem + 0.5vw); /* Responsive font size */
    font-weight: bold;
  }


  
  #fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* viewport width */
    height: 100vh; /* viewport height */
    /*backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;*/
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 800;
  }
  
  #button1,
  #button2 {
    margin: 1vw; /* responsive margin */
    padding: 1.5vw 3vw; /* responsive padding */
    font-size: calc(1vw + 1vh + 0.5vmin); /* responsive font-size */
    cursor: pointer;
  }
  
  /* Media query for smaller screens */
  @media (max-width: 768px) {
    #button1,
    #button2 {
      font-size: calc(1.5vw + 1.5vh + 0.5vmin); /* larger font for better readability */
    }
  }

  /* The Modal (background) */
.modal-dino {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 801; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  padding-top: 60px;
}

/* Modal Content */
.modal-dino-content {
  background-color: #fefefe;
  margin: 5% auto; /* 5% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  border-radius: 5px; /* Optional: for rounded corners */
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19); /* Optional: for shadow */
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Modal Header */
.modal-dino-header {
  padding: 2px 16px;
  background-color: #5cb85c;
  color: white;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

/* Modal Body */
.modal-dino-body {padding: 2px 16px;}

/* Modal Footer */
.modal-dino-footer {
  padding: 2px 16px;
  background-color: #5cb85c;
  color: white;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

/* Button styles */
.button {
  background-color: #4CAF50; /* Green */
  border: none;
  color: white;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  border-radius: 4px;
}

.button:hover {
  background-color: #45a049;
}

@media screen and (max-width: 600px) {
  .modal-dino-content {
      width: 90%;
  }
}

.loading-indicator {
  top: 50%;
  left: 50%;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px;
  border-radius: 10px;
  display: inline-block;
  animation: pulse 2s infinite;
}


@keyframes firework {
  0% { transform: translate(var(--x), var(--initialY)); width: var(--initialSize); opacity: 1; }
  50% { width: 0.5vmin; opacity: 1; }
  100% { width: var(--finalSize); opacity: 0; }
}

/* @keyframes fireworkPseudo {
  0% { transform: translate(-50%, -50%); width: var(--initialSize); opacity: 1; }
  50% { width: 0.5vmin; opacity: 1; }
  100% { width: var(--finalSize); opacity: 0; }
}
 */
.firework,
.firework::before,
.firework::after
{
  --initialSize: 0.5vmin;
  --finalSize: 45vmin;
  --particleSize: 0.2vmin;
  --color1: yellow;
  --color2: khaki;
  --color3: white;
  --color4: lime;
  --color5: gold;
  --color6: mediumseagreen;
  --y: -30vmin;
  --x: -50%;
  --initialY: 60vmin;
  content: "";
  animation: firework 2s infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, var(--y));
  width: var(--initialSize);
  aspect-ratio: 1;
  background: 
    /*
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 0% 0%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 100% 0%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 100% 100%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 0% 100%,
    */
    
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 50% 0%,
    radial-gradient(circle, var(--color2) var(--particleSize), #0000 0) 100% 50%,
    radial-gradient(circle, var(--color3) var(--particleSize), #0000 0) 50% 100%,
    radial-gradient(circle, var(--color4) var(--particleSize), #0000 0) 0% 50%,
    
    /* bottom right */
    radial-gradient(circle, var(--color5) var(--particleSize), #0000 0) 80% 90%,
    radial-gradient(circle, var(--color6) var(--particleSize), #0000 0) 95% 90%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 90% 70%,
    radial-gradient(circle, var(--color2) var(--particleSize), #0000 0) 100% 60%,
    radial-gradient(circle, var(--color3) var(--particleSize), #0000 0) 55% 80%,
    radial-gradient(circle, var(--color4) var(--particleSize), #0000 0) 70% 77%,
    
    /* bottom left */
    radial-gradient(circle, var(--color5) var(--particleSize), #0000 0) 22% 90%,
    radial-gradient(circle, var(--color6) var(--particleSize), #0000 0) 45% 90%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 33% 70%,
    radial-gradient(circle, var(--color2) var(--particleSize), #0000 0) 10% 60%,
    radial-gradient(circle, var(--color3) var(--particleSize), #0000 0) 31% 80%,
    radial-gradient(circle, var(--color4) var(--particleSize), #0000 0) 28% 77%,
    radial-gradient(circle, var(--color5) var(--particleSize), #0000 0) 13% 72%,
    
    /* top left */
    radial-gradient(circle, var(--color6) var(--particleSize), #0000 0) 80% 10%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 95% 14%,
    radial-gradient(circle, var(--color2) var(--particleSize), #0000 0) 90% 23%,
    radial-gradient(circle, var(--color3) var(--particleSize), #0000 0) 100% 43%,
    radial-gradient(circle, var(--color4) var(--particleSize), #0000 0) 85% 27%,
    radial-gradient(circle, var(--color5) var(--particleSize), #0000 0) 77% 37%,
    radial-gradient(circle, var(--color6) var(--particleSize), #0000 0) 60% 7%,
    
    /* top right */
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 22% 14%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 45% 20%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 33% 34%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 10% 29%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 31% 37%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 28% 7%,
    radial-gradient(circle, var(--color1) var(--particleSize), #0000 0) 13% 42%
    ;
  background-size: var(--initialSize) var(--initialSize);
  background-repeat: no-repeat;
}

.firework::before {
  --x: -50%;
  --y: -50%;
  --initialY: -50%;
/*   transform: translate(-20vmin, -2vmin) rotate(40deg) scale(1.3) rotateY(40deg); */
  transform: translate(-50%, -50%) rotate(40deg) scale(1.3) rotateY(40deg);
/*   animation: fireworkPseudo 2s infinite; */
}

.firework::after {
  --x: -50%;
  --y: -50%;
  --initialY: -50%;
/*   transform: translate(44vmin, -50%) rotate(170deg) scale(1.15) rotateY(-30deg); */
  transform: translate(-50%, -50%) rotate(170deg) scale(1.15) rotateY(-30deg);
/*   animation: fireworkPseudo 2s infinite; */
}

.firework:nth-child(2) {
  --x: 30vmin;
}

.firework:nth-child(2),
.firework:nth-child(2)::before,
.firework:nth-child(2)::after {
  --color1: pink;
  --color2: violet;
  --color3: fuchsia;
  --color4: orchid;
  --color5: plum;
  --color6: lavender;  
  --finalSize: 40vmin;
  left: 30%;
  top: 60%;
  animation-delay: -0.25s;
}

.firework:nth-child(3) {
  --x: -30vmin;
  --y: -50vmin;
}

.firework:nth-child(3),
.firework:nth-child(3)::before,
.firework:nth-child(3)::after {
  --color1: cyan;
  --color2: lightcyan;
  --color3: lightblue;
  --color4: PaleTurquoise;
  --color5: SkyBlue;
  --color6: lavender;
  --finalSize: 35vmin;
  left: 70%;
  top: 60%;
  animation-delay: -0.4s;
}

#flashScreen {
  /* Flash screen transitions */
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
}

.confetti{
  width: 100vw;
  height: 100vh;
  display: block;
  margin: 0 auto;
  user-select: none;
}