.success-message, 
.error-message, 
.warning-message {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 90%;
  width: auto;
  padding: 12px 16px;
  border-radius: 10px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: top 0.6s ease-in-out, opacity 0.6s ease-in-out, visibility 0s 0.6s;
  word-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
}

.message-box.show {
  opacity: 1;
  visibility: visible;
}

.success-message {
  color: #52B788;
  background: #D8F3DC;
}

.error-message {
  color: #ff3b3b;
  background: #F8AD9D;
}

.warning-message {
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
}

.message-box .icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.message-box .text {
  text-align: left;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

.message-box .home-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  color: #fff;
  font-size: 0.8rem;
  background: #000;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.close-msg {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s ease;
}

.close-msg:hover {
  color: #ff3b3b;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ff7500;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


@media (max-width: 480px) {
  .success-message, 
  .error-message, 
  .warning-message {
    padding: 10px 12px;
    font-size: 0.8rem;
    gap: 6px;
    display: flex;
    flex-direction: column;
  }
}