/* Модальное окно розыгрыша — в стиле cmodal/mines */
.raffle-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: raffle-fade-in 0.25s ease;
}

.raffle-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #232323;
  border-radius: 18px;
  padding: 38px 18px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: raffle-slide-up 0.3s ease;
  flex-shrink: 0;
}

.raffle-modal .raffle-close {
  position: absolute;
  right: 14px;
  top: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 28px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.raffle-modal .raffle-close:hover {
  color: #fff;
}

.raffle-modal .raffle-close:active {
  color: #fff;
}

.raffle-modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.raffle-modal .raffle-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.raffle-modal .raffle-icon img,
.raffle-modal .raffle-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.raffle-modal .raffle-icon-lottie {
  overflow: hidden;
}

.raffle-modal .raffle-icon-lottie svg {
  width: 100% !important;
  height: 100% !important;
}

.raffle-modal .raffle-title {
  margin: 0 0 20px;
  padding-right: 28px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.raffle-modal .raffle-title b,
.raffle-modal .raffle-title strong {
  font-weight: 700;
}

.raffle-modal .raffle-title a {
  color: #ebb312;
  text-decoration: none;
}

.raffle-modal .raffle-title a:hover {
  text-decoration: underline;
}

.raffle-modal .raffle-body {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-x: hidden;
  max-height: 40vh;
  overflow-y: auto;
  width: 100%;
}

.raffle-modal .raffle-body b,
.raffle-modal .raffle-body strong {
  font-weight: 600;
}

.raffle-modal .raffle-body a {
  color: #ebb312;
  text-decoration: none;
}

.raffle-modal .raffle-body a:hover {
  text-decoration: underline;
}

.raffle-modal .raffle-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 8px 0;
}

.raffle-modal .raffle-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.raffle-modal .raffle-participate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: rgba(235, 179, 18, 0.85);
  border: none;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.raffle-modal .raffle-participate-btn:active {
  transform: translateY(1px);
}

.raffle-modal .raffle-participate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.raffle-modal .raffle-participate-btn .raffle-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}

.raffle-modal .raffle-already {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: rgba(37, 184, 81, 0.85);
  border: none;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 700;
  color: #000;
}

@keyframes raffle-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes raffle-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
