.carousel-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.26);
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  margin: 20px auto;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.active-raffle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 20px;
  border-radius: 16px;
  margin: 20px auto;
  width: 90%;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.active-raffle-container h2 {
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: bold;
}

.active-raffle-container p,
.raffle-modal-content p {
  margin: 3px 0px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); /* Smooth swipe */
  will-change: transform;
}

.carousel-cell {
  flex: 0 0 100%;
  text-align: center;
}

.carousel-button,
.carousel-track,
.raffle-timer-bar {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.carousel-cell img {
  width: 100%;
  border-radius: 10px;
  user-select: none;
  pointer-events: none;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 10px;
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s;
  border-radius: 10px;
}

.carousel-button:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.carousel-button.prev {
  left: 10px;
}

.carousel-button.next {
  right: 10px;
}

.delete-btn-carousel {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 0, 0, 0.7);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  z-index: 10;
}

/* Modal backdrop */
.raffle-modal {
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.4s ease-in-out;
}


/* Modal content reuses .active-raffle-container style */
.raffle-modal-content {
  background: rgba(0, 0, 0, 0.26);
  color: white;
  padding: 20px;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  height: auto;      /* Content-based height */
  overflow-y: auto; 
  text-align: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  position: relative;
  animation: blurFadeIn 0.6s ease forwards;
  margin: 50px 0px
}

.raffle-modal-content::-webkit-scrollbar {
  width: 8px; /* Adjust width of scrollbar */
}

.raffle-modal-content::-webkit-scrollbar-track {
  background: transparent; /* Transparent track */
}

.raffle-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2); /* Light transparent thumb */
  border-radius: 4px;
}

.raffle-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4); /* Slightly brighter on hover */
}

.raffle-modal-content.closing {
  animation: contentFadeOutBlur 0.4s ease forwards;
}


/* Timer bar container */
.raffle-timer-bar {
  margin-top: 15px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer; /* 👈 Add this */
  transition: background 0.2s;
}

.raffle-timer-bar:hover {
  background: rgba(255, 255, 255, 0.3);
}

.raffle-progress {
  height: 100%;
  width: 0%;
  background-color: #4CAF50;
  transition: width 1s linear;
  border-radius: 8px;
}

#raffleCountdown {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  z-index: 1;
  pointer-events: none;
}


/* Optional fade in animation */
@keyframes blurFadeIn {
  from {
    opacity: 0;
    filter: blur(10px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
  }
}

@keyframes contentFadeOutBlur {
  0% {
    opacity: 1;
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    filter: blur(8px);
  }
}

@media (max-height: 500px) {
  .raffle-modal-content {
    max-height: 90vh;
  }
}
