/* --- CSS Resets & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.5;
  font-family: "Poppins", sans-serif;
  background-color: #1d1534;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
}

.no-scroll {
  overflow: hidden;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* --- Font Weight Utilities --- */
.poppins-regular {
  font-weight: 400;
}

.poppins-bold {
  font-weight: 700;
}

/* --- Header / Brand --- */
.brand {
  padding: 1.5rem;
  font-size: 1.5rem;
  padding-left: 5%;
  background-color: #2a1f4c;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* --- Main Page Content --- */
.page-content {
  padding: 2rem 5%;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#openModal {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  background-color: #e0e0e0;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

#openModal:hover {
  background-color: #fff;
}

/* --- Overlay Background --- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);

  /* Base hidden state */
  opacity: 0;
  visibility: hidden;

  /* BOTH opacity and visibility need a transition duration */
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;

  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Modal Card Content --- */
.modal-content {
  background-color: #ffffff;
  color: #333333;
  width: 90%;
  max-width: 450px;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

  /* Set the transition on the BASE class so it animates both ways! */
  transform: translateY(-20px);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.overlay.active .modal-content {
  transform: translateY(0);
  opacity: 1;
}
/* --- Modal Header & Title --- */
.modal-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

/* --- Close Button --- */
#closeBtn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

#closeBtn:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

/* --- Modal Body Text --- */
.modal-text {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

/* --- Animations --- */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
