main {
  display: grid;
  place-items: center;
  position: relative;
  padding: 2rem 1rem;
}

main > section {
  background-color: var(--secondary-color);
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  width: 95%;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease;
  border: 1px solid #334155;
}

main > section > p {
  color: var(--text-light);
  margin: 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #72afc2;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form > div {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.8rem;
  width: 100%;
}

form input,
form textarea {
  width: 100%;
  height: 2rem;
  outline-color: #818cf8;
  border-radius: 5px;
  resize: none;
  padding: 0 1rem;
}

form textarea {
  height: 5rem;
  padding: 1rem;
  font-size: 0.7rem;
}

form button {
  height: 2rem;
  border-radius: 5px;
  outline-color: #818cf8;
  background-color: var(--primary-color);
  color: var(--text-light);
  border: none;
  box-shadow: 1px 1px 5px #818cf8;
}

.error {
  color: red;
  font-size: 0.7rem;
  text-align: left;
}

.success-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 40px 30px;
  max-width: 95%;
  width: 100%;
  text-align: center;
  animation: slideIn 0.4s ease-out;
  position: absolute;
  top: 20%;
  display: none;
}

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

.checkmark {
  width: 64px;
  height: 64px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: scaleIn 0.5s ease-out 0.2s backwards;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.checkmark svg {
  width: 32px;
  height: 32px;
  stroke: white;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck 0.5s ease-out 0.4s forwards;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.success-card h2 {
  color: #1f2937;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.success-card p {
  color: #6b7280;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.success-card button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.success-card button:hover {
  background: #2563eb;
}

.success-card button:active {
  transform: scale(0.98);
}

@media (max-width: 480px) {
  .success-card {
    padding: 32px 24px;
  }

  .success-card h2 {
    font-size: 20px;
  }

  .success-card p {
    font-size: 14px;
  }

  .checkmark {
    width: 56px;
    height: 56px;
  }

  .checkmark svg {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 768px) {
  main > section {
    width: 50%;
  }

  .success-card {
    max-width: 60%;
  }
}

@media (min-width: 1024px) {
  main > section {
    width: 35%;
  }

  .success-card {
    max-width: 40%;
  }

  form button {
    height: 2.5rem;
  }

  form button:hover {
    cursor: pointer;
  }
}
