.wheel-modal-button {
  position: fixed;
  bottom: 60px;
  right: 60px;
  cursor: pointer;
  z-index: 40; /* Baixo para não sobrepor footer */

  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-modal-button > span {
  width: 110%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  background: linear-gradient(180deg, #f8f17d 8.7%, #ba9f47 65.22%);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 8px 10px;
  border-radius: 24px;
  bottom: -10px;
}

.wheel-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9997;
}

.wheel-modal-overlay.open {
  display: block;
}

.wheel-modal-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  padding: 24px;

  background-color: #0e100d;

  box-shadow: 0px 4px 53.9px 0px #2696ff80;
  border-radius: 16px;

  max-width: 680px;
  max-height: 800px;

  z-index: 9998;
}

.wheel-modal-container.open {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.wheel-modal-header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;

  width: 100%;

  border-radius: 16px;
}

.wheel-modal-close {
  background-color: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
  border: none;
}

.wheel-modal-content {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow-y: auto;
  
  /* Esconder scrollbar mas manter funcionalidade */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE e Edge */
}

/* Esconder scrollbar no Chrome, Safari e Opera */
.wheel-modal-content::-webkit-scrollbar {
  display: none;
}

.wheel-title {
  font-size: 30px;
  font-weight: 600;
}

.wheel-modal-content-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.wheel-modal-content-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 1;
}

.wheel-tickets-display {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  flex-shrink: 0;
}

.wheel-tickets-display .tickets-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(248, 241, 125, 0.3);
}

.wheel-tickets-display .tickets-content {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8f17d;
}

.wheel-modal-content-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  flex-shrink: 0;
  padding: 0;
}

.item {
  display: flex;
  justify-content: center;
  width: 100%;
}

.wheel-rules-container {
  width: 240px;
  display: flex;
  gap: 12px;
  border: 1px solid #373737;
  padding: 10px 14px;
  border-radius: 8px;
}

.wheel-rules-modal-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.wheel-rules-modal-content > span {
  font-size: 14px;
}

.wheel-rules-modal-content > span:last-child {
  font-weight: 300;
  opacity: 0.7;
}

.tickets-container {
  display: flex;
  align-items: center;
  gap: 8px;

  font-weight: 700;
  font-size: 16px;
}

.tickets-content {
  color: #f8f17d;
}

.spin-button {
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  border-radius: 100%;
  border: 8px solid transparent;
  background: #fff;

  font-size: 22px;
  font-weight: 600;

  color: #1150f1;

  cursor: pointer;
  position: relative;
}

.spin-button::before {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, #8d631f 0%, #fcf780 50%, #8d631f 100%)
    border-box;
  width: 140%;
  height: 140%;
  border: 8px solid #fff;
  border-radius: 100%;
  z-index: -1;

  box-shadow: 0px 6.31px 28.49px 0px #2696ffb2;
}

.spin-button:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 991px) {
  .wheel-modal-button {
    bottom: 110px;
    right: 20px;
  }

  .wheel-modal-button > span {
    width: 110%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    background: linear-gradient(180deg, #f8f17d 8.7%, #ba9f47 65.22%);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 18px;
    bottom: -10px;
  }
}

@media (max-width: 661px) {
  .wheel-modal-container {
    max-width: 95%;
    max-height: 95%;
    padding: 16px;
  }

  .wheel-modal-content {
    gap: 16px;
  }

  .wheel-title {
    font-size: 24px;
  }

  .wheel-modal-content-main {
    padding: 8px 0;
  }

  .wheel-tickets-display {
    padding: 8px 0;
  }

  .wheel-tickets-display .tickets-container {
    font-size: 14px;
    padding: 8px 16px;
  }

  .wheel-modal-content-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    align-items: center;
    gap: 12px;
  }

  .wheel-item-1 {
    grid-column: 1;
  }

  .wheel-item-3 {
    grid-column: 2;
  }

  .wheel-rules-container {
    width: 180px;
    gap: 8px;
    padding: 8px 10px;
  }

  .wheel-rules-modal-content > span {
    font-size: 12px;
  }

  .spin-button {
    width: 70px;
    height: 70px;
    font-size: 16px;
  }

  .spin-button::before {
    width: 150%;
    height: 150%;
  }
}

/* Mensagem de erro quando serviço está indisponível */
.wheel-error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 24px;
  text-align: center;
  min-height: 400px;
}

.wheel-error-message i.fa-exclamation-circle {
  font-size: 64px;
  color: #ff6b6b;
  margin-bottom: 8px;
}

.wheel-error-message h3 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.wheel-error-message p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin: 8px 0;
  max-width: 400px;
  line-height: 1.5;
}

.wheel-error-message .retry-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  margin-top: 16px;
  background: linear-gradient(180deg, #2696ff 0%, #1a6fcc 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wheel-error-message .retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0px 4px 12px rgba(38, 150, 255, 0.4);
}

.wheel-error-message .retry-button:active {
  transform: translateY(0);
}

.wheel-error-message .retry-button i {
  font-size: 18px;
}

/* Ajustes responsivos para não sobrepor menu flutuante e footer */
@media (max-width: 991px) {
  .wheel-modal-button {
    bottom: 140px; /* Acima do menu flutuante mobile */
    right: 20px;
  }
  
  .wheel-modal-button img {
    width: 70px;
    height: 70px;
  }
  
  .wheel-modal-button > span {
    font-size: 14px;
    padding: 6px 8px;
  }
}

@media (max-width: 640px) {
  .wheel-modal-button {
    bottom: 120px;
    right: 15px;
  }
  
  .wheel-modal-button img {
    width: 60px;
    height: 60px;
  }
}
