.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: #fff;
    padding: 20px;
    margin: 0px 12px;
    border-radius: 8px;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal h2 {
    margin-top: 0px;
}

.modal-item {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    background: #f9f9f9;
    transition: background 0.3s;
}

.modal-item:hover {
    background: #007bff;
    color: white;
}

.close-btn {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 18px;
}

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
  visibility: hidden; /* Hidden by default. Visible on click */
  width: calc(100% - 16px); /* Set a default minimum width */
  background-color: #333; /* Black background color */
  color: #fff; /* White text color */
  text-align: center; /* Centered text */
  border-radius: 2px; /* Rounded borders */
  padding: 20px 8px;
  position: fixed; /* Sit on top of the screen */
  z-index: 1; /* Add a z-index if needed */
  bottom: 0;
  font-size: 18px;
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show2 {
  visibility: visible; /* Show the snackbar */
  /* Add animation: Take 0.5 seconds to fade in and out the snackbar. 
  However, delay the fade out process for 2.5 seconds */
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 1.5s;
}

#snackbar.show3 {
  visibility: visible; /* Show the snackbar */
  /* Add animation: Take 0.5 seconds to fade in and out the snackbar. 
  However, delay the fade out process for 2.5 seconds */
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

#snackbar.show5 {
  visibility: visible; /* Show the snackbar */
  /* Add animation: Take 0.5 seconds to fade in and out the snackbar. 
  However, delay the fade out process for 2.5 seconds */
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 4.5s;
}


/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
  from {bottom: -100px; opacity: 0;} 
  to {bottom: 0; opacity: 1;}
}

@keyframes fadein {
  from {bottom: -100px; opacity: 0;}
  to {bottom: 0; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 0; opacity: 1;} 
  to {bottom: -100px; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 0; opacity: 1;}
  to {bottom: -100px; opacity: 0;}
}