@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 0 10px;
}

/* Imagem de fundo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("fundo.webp") center/cover no-repeat, #1a0a2e;
  z-index: -1;
}

/* ── Card glassmorphism ── */
.wrapper {
  width: 420px;
  border-radius: 18px;
  padding: 44px 40px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s;
}

.wrapper:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ── Alternância entre login e cadastro ── */
form {
  display: none;      /* oculto por padrão */
  flex-direction: column;
}

form.ativo {
  display: flex;      /* exibido apenas quando ativo */
}

/* ── Título ── */
h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

h2 span {
  color: #ffdde1;
}

/* ── Campos de input com label flutuante ── */
.input-field {
  position: relative;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  margin: 24px 0 8px;
  text-align: left;
}

.input-field label {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  pointer-events: none;
  transition: all 0.25s ease;
}

.input-field input {
  width: 100%;
  height: 44px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: #fff;
  padding: 0 10px;
}

/*
  Label sobe quando o input está focado (:focus)
  ou quando já tem conteúdo (:not(:placeholder-shown)).
  O placeholder=" " (espaço) no HTML ativa este último seletor.
*/
.input-field input:focus ~ label,
.input-field input:not(:placeholder-shown) ~ label {
  top: 0;
  transform: translateY(-100%);
  font-size: 0.72rem;
  color: #ffdde1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Linha azul/roxa ao focar */
.input-field::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffdde1;
  transition: width 0.3s ease;
}

.input-field:focus-within::after {
  width: 100%;
}

/* ── Lembre-me / Esqueceu senha ── */
.forget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 28px;
  color: #fff;
  font-size: 0.85rem;
  text-align: left;
}

.forget label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.forget a {
  color: #ffdde1;
  text-decoration: none;
  transition: opacity 0.2s;
}

.forget a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

#remember {
  accent-color: #ffdde1;
  width: 15px;
  height: 15px;
}

/* ── Botão de envio ── */
button {
  background: rgba(255, 221, 225, 0.15);
  color: #fff;
  font-weight: 700;
  border: 2px solid #ffdde1;
  padding: 14px 20px;
  cursor: pointer;
  border-radius: 50px;
  font-size: 15px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  margin-top: 4px;
}

button:hover {
  background: #ffdde1;
  color: #1a0a2e;
}

/* ── Link de alternância (Criar conta / Já tenho conta) ── */
.toggle-link {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
}

.toggle-link a {
  color: #ffdde1;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.toggle-link a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ── Responsivo ── */
@media (max-width: 480px) {
  .wrapper {
    width: 100%;
    padding: 36px 24px;
  }

  h2 { font-size: 1.7rem; }
}
