.custom-popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  font-family: Arial, sans-serif;
}

.popup-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
}

.popup-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--popup-color, #D12222);
  color: var(--popup-text-color, #ffffff);
  max-width: 480px;
  width: 90%;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  overflow: hidden;
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 18px;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  z-index: 2;
}

.popup-body {
  padding: 45px 35px 35px;
  text-align: center;
}

.popup-body h2 {
  margin: 0 0 18px 0;
  font-size: 26px;
}

.popup-body p {
  margin: 12px 0;
  line-height: 1.5;
  font-size: 17px;
}

.countdown {
  margin: 25px 0;
  background: rgba(255,255,255,0.15);
  padding: 15px;
  border-radius: 8px;
}

.timer {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 4px;
  margin-top: 8px;
}

.popup-btn {
  margin: 25px 0;
  padding: 16px 45px;
  background: white;
  color: var(--popup-color, #D12222);   /* цвет текста кнопки подстраивается под фон */
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.popup-footer {
  margin-top: 15px;
  font-size: 15px;
  opacity: 0.9;
}

@media (max-width: 480px) {
  .popup-content { width: 95%; }
  .popup-body { padding: 40px 25px 30px; }
  .timer { font-size: 24px; }
}