.ec-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
  overscroll-behavior: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ec-popup-overlay.ec-popup-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.ec-popup {
  position: relative;
  flex-shrink: 0;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: linear-gradient(180deg, #0130b4 0%, #001c82 100%);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  font-family: 'Montserrat', Arial, sans-serif;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s ease;
}

.ec-popup-overlay--visible .ec-popup {
  transform: translateY(0) scale(1);
}

.ec-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ec-popup__close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.ec-popup__close svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.ec-popup__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 24px;
  text-align: center;
}

.ec-popup__mascot {
  width: 100%;
  margin: 0 0 4px;
  line-height: 0;
}

.ec-popup__mascot img {
  display: block;
  width: 100%;
  height: auto;
}

.ec-popup__title {
  margin: 0 0 2px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}

.ec-popup__subtitle {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
}

.ec-popup__btn {
  display: block;
  width: 100%;
  line-height: 0;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ec-popup__btn:hover {
  transform: scale(1.03);
  opacity: 0.95;
}

.ec-popup__btn-img {
  display: block;
  width: 100%;
  height: auto;
}

@media screen and (max-width: 639px) {
  .ec-popup {
    width: 280px;
  }

  .ec-popup__inner {
    padding: 24px 20px 20px;
  }

  .ec-popup__title {
    font-size: 21px;
  }

  .ec-popup__subtitle {
    margin-bottom: 14px;
    font-size: 14px;
  }

  .ec-popup__close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
  }

  .ec-popup__close svg {
    width: 18px;
    height: 18px;
  }
}
