/* === Modal Styles === */
.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.397);
  display: flex;
  justify-content: center;
  align-items: center;
}

#modal-popup {
  display: none;
}

.modal-content {
  background-color: var(--bg-color);
  color: #e8e8e8;
  margin: auto;
  padding: 35px 45px;
  border: 1px solid #484848;
  border-radius: 10px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  text-align: center;
  position: relative;
  /* animation: fadeInModal 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); */
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(-15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-logo {
  display: block;
  max-width: 90px;
  height: auto;
  margin: 0 auto 20px auto;
}

.close {
  position: absolute;
  top: 15px;
  right: 18px;
  color: #a0a0a0;
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #ffffff;
  transform: scale(1.1);
}

.modal-content h2 {
  font-size: 1.6em;
  color: var(--secondary-color);
  margin-top: 0;
  margin-bottom: 12px;
  font-family: var(--heading-font);
  font-weight: 600;
}

.modal-content p {
  font-size: 1em;
  color: #c5c5c5;
  line-height: 1.65;
  margin-bottom: 20px;
  font-family: var(--body-font);
}

/* === Error Modal Specific Styles === */
.modal-content.error-modal #modal-title {
  color: var(--error-red);
}

.modal-content.error-modal #modal-message em {
  background-color: rgba(231, 76, 60, 0.1);
  color: #f2b8b5;
  padding: 5px 8px;
  border-radius: 4px;
  font-style: normal;
  display: inline-block;
  margin-top: 8px;
  border-left: 3px solid var(--error-red);
}

@media (max-width: 656px) {
  .modal-content {
    background-color: var(--bg-color);
    color: #e8e8e8;
    margin: auto;
    padding: 35px 45px;
    border: 1px solid #484848;
    border-radius: 10px;
    width: 90%;
    max-width: 200px;
  }
}
@media (max-width: 380px) {
  .modal-content {
    padding: 15px 15px;
  }
  .modal-content h2 {
    font-size: 1.2em;
  }
  .modal-content p {
    font-size: 0.85em;
  }
  .modal-logo {
    max-width: 60px;
  }
}
