* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  background: hsl(0, 100%, 74%) url("images/bg-intro-desktop.png") repeat;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.container {
  max-width: 1200px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4rem;
}

/* LEFT SECTION */
.left {
  flex: 1;
  color: white;
}

.left h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.left p {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.95;
}

/* RIGHT SECTION */
.right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.top {
  background-color: hsl(248, 32%, 49%);
  color: white;
  text-align: center;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
}

.top strong {
  font-weight: 700;
}

form {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.15);
}

.field {
  position: relative;
  margin-bottom: 1rem;
}

.input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid hsl(246, 25%, 77%);
  border-radius: 5px;
  outline: none;
  transition: border 0.2s;
  font-family: inherit;
}

.input:focus {
  border-color: hsl(248, 32%, 49%);
}

.input.error-border {
  border: 2px solid hsl(0, 100%, 74%);
}

/* Error icon */
.error-icon {
  display: none;
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-image: url("images/icon-error.svg");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.error-icon.show {
  display: block;
}

.error-message {
  display: none;
  font-size: 0.7rem;
  color: hsl(0, 100%, 74%);
  font-weight: 500;
  text-align: right;
  margin-top: 0.3rem;
  font-style: italic;
}

.error-message.show {
  display: block;
}

button {
  width: 100%;
  background-color: hsl(154, 59%, 51%);
  color: white;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  padding: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition:
    background 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 4px 0 hsl(154, 49%, 45%);
  font-family: inherit;
}

button:hover {
  background-color: hsl(154, 59%, 45%);
}

button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 hsl(154, 49%, 45%);
}

.success-message {
  text-align: center;
  margin: 1rem 0 0;
  padding: 0.75rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
}

.success-message.show {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.bottom {
  font-size: 0.7rem;
  color: hsl(246, 25%, 77%);
  text-align: center;
  margin-top: 1rem;
}

.terms {
  color: hsl(0, 100%, 74%);
  font-weight: 700;
  cursor: pointer;
}

.terms:hover {
  text-decoration: underline;
}

/* MOBILE RESPONSIVE */
@media (max-width: 800px) {
  body {
    padding: 1.5rem;
  }
  .container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .left h1 {
    font-size: 2rem;
  }
  .left p {
    font-size: 0.95rem;
  }
  form {
    padding: 1.5rem;
  }
  .input {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }
  button {
    font-size: 0.8rem;
    padding: 0.8rem;
  }
}

@media (max-width: 480px) {
  .left h1 {
    font-size: 1.8rem;
  }
  .top {
    font-size: 0.85rem;
  }
  .error-message {
    font-size: 0.65rem;
  }
}
