/* Import font dari google fonts */
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap");

/* Variabel warna berdasarkan gambar */
:root {
  --bg-color: #0b2434; /* Deep Twilight Blue */
  --outline-color: #1a435a; /* Mountain Shadow */
  --accent-color: #e2a29b; /* Dusty Rose */
  --text-main: #e8eef1; /* Mist White */
  --link-color: #fad4c0; /* Soft Peach */
  --error-color: #ff6b6b;
}

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

.login-container {
  font-family: "Nunito Sans", sans-serif;
  display: grid;
  place-content: center;
  min-height: 100vh;

  background-image: url(./img/background.jpg);
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;

  width: 100%;
  max-width: 400px;
  height: auto;
  padding: 2rem 1.75rem;
  border-radius: 14px;

  color: var(--text-main);
  background-color: #0b243405;
  backdrop-filter: blur(50px);
  box-shadow: 2px 2px 20px rgb(0, 0, 0, 0.5);
}

.title {
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 0.5rem;
}

input {
  font-size: 1rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem 0.5rem;

  border: none;
  border-radius: 8px;
  outline: 2px solid var(--outline-color);

  color: var(--text-main);
  background-color: transparent;
}

input:focus {
  outline: 2px solid var(--link-color);
}

input::placeholder {
  color: var(--text-main);
}

input.invalid {
  outline: 2px solid #ef5e5e;
}

section {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

a {
  text-align: right;
  text-decoration: none;
  font-weight: 700;
  color: var(--link-color);
}

a:hover {
  text-decoration: underline;
}

.error-text {
  display: block;
  margin-top: 0.375rem;
  min-height: 1.125rem;
  color: #ffaaa1;
}

.btn-login {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem;

  border-radius: 8px;
  border: none;
  transition: all 100ms ease;

  color: #1a232e;
  background-color: var(--accent-color);
}

.btn-login:hover {
  background-color: var(--link-color);
}

.btn-login:active {
  scale: 0.95;
}

@media screen and (max-width: 576px) {
  main {
    padding-inline: 1rem;
  }

  .login-form {
    padding: 1.5rem 1.25rem;
  }

  .title {
    font-size: 1.5rem;
  }

  input,
  .btn-login {
    padding: 0.625rem;
  }

  label,
  input,
  a {
    font-size: 0.75rem;
  }

  .btn-login {
    font-size: 0.875rem;
  }
}
