.bottom-nav {
  position: fixed;
  bottom: 35px;
  left: 50vw;
  transform: translateX(-50%);
  /*default theme*/
  background: rgba(127, 251, 255, 0.85);
  /*christmas theme*/
  /* background: rgba(241, 126, 120, 0.85); */
  backdrop-filter: blur(10px);
  display: flex;
  padding: 0;  /* Remove padding from container */
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 1001;
  border-radius: 50px;
  width: fit-content;
  overflow: hidden;  /* Contain hover effects */
  animation: buttonsAnim 0.8s ease-in-out forwards;
}

.nav-button {
  background: transparent;
  border: none;
  padding: 15px 25px;  /* Increase vertical padding */
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  font-weight: 600;
  /*default theme*/
  color: rgb(0, 0, 128);
  /*christmas theme*/
  /* color: rgb(255, 255, 255); */
  text-shadow: 0 2px 4px rgba(13, 120, 134, 0.5);
  white-space: nowrap;
  position: relative;
  height: 100%;  /* Make button full height */
  z-index: 1;
}

.nav-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250,172,224,0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
  height: 100%;  /* Make hover effect full height */
}

.nav-button:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 1px;
  background: rgba(0, 0, 128, 0.2);
  box-shadow: 1px 0 rgba(255,255,255,0.5);
}

.nav-button:hover {
  transform: translateY(-1px);
}

.nav-button:hover::before {
  opacity: 1;
}

.nav-button:active {
  transform: translateY(1px);
}

/* Default horizontal layout */
.nav-button span {
  display: inline;
  margin-left: 4px;
}

.back-button {
  position: fixed;
  bottom: 20px;
  right: calc(73% + 280px);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #ededed;
  border: 2px solid #ffffff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1002;
}

.back-button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgb(255,209,220);
}

.back-button:active {
  transform: scale(0.95);
}

.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ededed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0; /* Start hidden */
}

.transition-overlay.slide-from-top {
  animation: slideFromTop 0.8s ease-in-out forwards;
}

@keyframes slideFromTop {
  0% {
    transform: translateY(-100%);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.transition-overlaySched {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(164, 216, 216);
  z-index: 9999;
  pointer-events: none;
  opacity: 0; /* Start hidden */
}

.transition-overlaySched.slide-from-bottom {
  animation: slideFromBottom 0.8s ease-in-out forwards;
}

@keyframes slideFromBottom {
  0% {
    transform: translateY(+100%);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 676px) {
  .bottom-nav {
    width: auto;
    min-width: 260px;
    max-width: 90%;
    bottom: 35px;
    padding: 0 5px;
    left: 50vw !important;
    transform: translateX(-50%) !important;
    animation: buttonsAnim 0.8s ease-in-out forwards;
  }

  .nav-button {
    font-size: 18px;  /* Bigger emoji size */
    padding: 8px 12px;
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;  /* Increased gap between emoji and text */
  }

  .nav-button span {
    display: block;
    margin: 0;
    font-size: 11px;  /* Smaller text size */
    line-height: 1.2;
  }

  .nav-button:not(:last-child)::after {
    height: 45px;  /* Slightly increased for taller buttons due to larger emoji */
  }

  .back-button {
    bottom: 35px;
    right: auto;
    left: 20px;
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

@media (max-width: 1260px) {
  .back-button {
    bottom: 35px;
    right: auto;
    left: 20px;
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .bottom-nav {
    bottom: 45px;
    min-width: 240px;
    max-width: 85%;
    left: 50vw !important;
    transform: translateX(-50%) !important;
  }
  .nav-button {
    font-size: 16px;  /* Slightly smaller emoji but still big */
    padding: 8px 8px;
  }

  .nav-button span {
    font-size: 10px;  /* Even smaller text */
  }

  .back-button {
    bottom: 45px;
    left: 15px;
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

@media (max-width: 360px) {
  .bottom-nav {
    min-width: 220px;
    max-width: 85%;
    bottom: 50px;
    padding: 0 4px;
  }
  
  .nav-button {
    padding: 8px 6px;
    font-size: 15px;  /* Still keeping emoji relatively large */
  }

  .nav-button span {
    font-size: 9px;  /* Smallest text size while still being readable */
  }

  .back-button {
    bottom: 50px;
    left: 12px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}