.modal__backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity0 .2s ease-in;
}

.modal__content {
  position: relative;
  width: auto;
  max-width: calc(100vw - 32px);
  font-size: 14px;
  font-weight: 400;
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.3s ease-in;
  display: flex;
  flex-direction: column;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(235deg, rgba(6, 1, 255, 0.20) 18.34%, rgba(6, 1, 255, 0.00) 61.89%), #0D0B27;
  box-shadow: -9px -14px 50px 0px rgba(0, 10, 255, 0.25) inset, 0px 3px 4px 0px #1D47F0 inset;
  padding: 24px 16px;
}

@media (min-width: 576px) {
  .modal__content {
    max-width: 500px;
    border-radius: 32px;
    padding: 32px 24px;
  }
}

.modal__show .modal__backdrop,
.modal__show .modal__content {
  opacity: 1;
  z-index: 1050;
  pointer-events: auto;
  overflow-y: auto;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid #eceeef;
}

.modal__title {
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 1.25rem;
  font-weight: 500;
}

/* Old .modal__btn-close styles removed - see line 176 for new green button styles */
.focus{
  background: #1D47F0;
}
.modal__body {
  position: relative;
  flex: 1 1 auto;
  padding: 15px;
  overflow: auto;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #e9ecef;
  border-bottom-right-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;
}
.lang{
  position: fixed;
  top: 5px;
  right: 10px;
  font-size: 22px;
  display: flex;
  gap: 10px;
  cursor: pointer;
  color: #fff;
}

/* Fail Message Styles */
.fail-message {
  text-align: center;
  padding: 24px 20px 20px;
  animation: shakeX 0.5s ease-in-out;
}

.fail-icon {
  font-size: 80px;
  margin-bottom: 12px;
  animation: bounceIn 0.6s ease-out;
  line-height: 1;
  display: block;
}

.fail-fire-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #FF6B00, #FF4500);
  border-radius: 50%;
  margin: 16px auto 0;
  box-shadow: 0 4px 16px rgba(255, 69, 0, 0.4);
  animation: fireGlow 1.5s ease-in-out infinite;
}

.fail-fire-icon::before {
  content: "🔥";
  font-size: 28px;
  line-height: 1;
}

@keyframes fireGlow {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(255, 69, 0, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 8px 24px rgba(255, 69, 0, 0.7);
    transform: scale(1.05);
  }
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  50% { transform: translateX(10px); }
  75% { transform: translateX(-8px); }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* Mobile-First Button Styles - GREEN for FAIL modal */
.modal__btn-close {
  /* Mobile-first - 60px touch target */
  width: calc(100% - 48px) !important;
  max-width: 360px;
  height: 60px !important;
  margin: 24px auto 16px;
  padding: 0 20px !important;

  background: linear-gradient(135deg, #00C853, #00E676) !important;
  color: white !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 60px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;

  border: none !important;
  border-radius: 16px !important;

  box-shadow:
    0 8px 24px rgba(0, 200, 83, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.2) !important;

  cursor: pointer;
  transition: all 0.3s ease !important;
  display: block;

  /* Pulse animation */
  animation: buttonPulseGreen 1.5s ease-in-out infinite;
}

.modal__btn-close:hover,
.modal__btn-close:focus {
  background: linear-gradient(135deg, #00D75E, #00F783) !important;
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(0, 200, 83, 0.7),
    0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.modal__btn-close:active {
  transform: scale(0.98) !important;
}

@keyframes buttonPulseGreen {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(0, 200, 83, 0.5);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 12px 32px rgba(0, 200, 83, 0.7);
  }
}

/* Desktop - slightly smaller */
@media (min-width: 769px) {
  .modal__btn-close {
    height: 56px !important;
    line-height: 56px !important;
    font-size: 16px !important;
  }
}

/* Countdown Styles */
.countdown-timer {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

#countdown-number {
  font-weight: 700;
  color: #FF6B00;
  font-size: 20px;
}

.countdown-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.countdown-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #FF4500, #FF6B00);
  width: 100%;
  animation: progressShrink 3s linear forwards;
}

@keyframes progressShrink {
  from { width: 100%; }
  to { width: 0%; }
}