@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Fondo con efecto de gradiente animado */
body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url(Imagenes/fondoprincipal.png);
  /*background: linear-gradient(-45deg, #0f00dae7, #2b2b3f, #3a3a52, #2c2b44);*/
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  color: #f0f0f0;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Contenedor principal */
.container {
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.223);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 50px 40px;
  width: 380px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  transition: 0.4s ease;
}

.container:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.3);
}

/* Título */
.login-box h2 {
  text-align: center;
  margin-bottom: 35px;
  color: #fff;
  font-weight: 500;
  letter-spacing: 1px;
}

/* Campos de entrada */
.input-group {
  position: relative;
  margin-bottom: 30px;
}

.input-group input {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 2px solid #777;
  outline: none;
  background: transparent;
  color: #f0f0f0;
  font-size: 16px;
  transition: all 0.3s ease;
}

.input-group label {
  position: absolute;
  left: 0;
  top: 10px;
  color: #aaa;
  pointer-events: none;
  transition: all 0.3s ease;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
  top: -14px;
  font-size: 12px;
  color: #7ba5ff;
}

.input-group input:focus {
  border-bottom-color: #7ba5ff;
  box-shadow: 0 1px 0 #7ba5ff;
}

/* Botón animado (Uiverse.io) */
.animated-button {
  position: relative;
  display: inline-block;
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 100px;
  background-color: #2b2b61;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff90;
  box-shadow: 0 0 0 2px #ffffff20;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.animated-button span:first-child {
  position: relative;
  z-index: 1;
}

.animated-button span:last-child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: #154b57;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.animated-button:hover {
  box-shadow: 0 0 0 4px #5f85f360;
  color: #fff;
}

.animated-button:active {
  transform: scale(0.96);
}

.animated-button:hover span:last-child {
  width: 300px;
  height: 150px;
  opacity: 1;
}

/* Enlace de registro */
.register-link {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #ccc;
}

.register-link a {
  color: #89a9ff;
  text-decoration: none;
  font-weight: 500;
}

.register-link a:hover {
  text-decoration: underline;
}


/* CODIGO CSS DO REGISTO*/

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ======== Caixa principal de registro ======== */
.reg-container {
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 50px 40px;
  width: 380px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  transition: 0.4s ease;
}

.reg-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.3);
}

/* ======== Título ======== */
.reg-title {
  text-align: center;
  margin-bottom: 35px;
  color: #fff;
  font-weight: 500;
  letter-spacing: 1px;
}

/* ======== Estrutura do formulário ======== */
.reg-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* ======== Campos de entrada ======== */
.reg-group {
  position: relative;
}

.reg-group input,
.reg-group select {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 2px solid #777;
  outline: none;
  background: transparent;
  color: #f0f0f0;
  font-size: 16px;
  transition: all 0.3s ease;
}

/* Label flutuante */
.reg-group label {
  position: absolute;
  left: 0;
  top: 10px;
  color: #aaa;
  pointer-events: none;
  transition: all 0.3s ease;
}

/* Quando o campo é focado ou preenchido */
.reg-group input:focus ~ label,
.reg-group input:not(:placeholder-shown) ~ label,
.reg-group select:focus ~ label,
.reg-group select:valid ~ label {
  top: -14px;
  font-size: 12px;
  color: #7ba5ff;
}

.reg-group input:focus {
  border-bottom-color: #7ba5ff;
  box-shadow: 0 1px 0 #7ba5ff;
}

/* ======== Correção especial para o campo de data ======== */
.reg-group input[type="date"] {
  color-scheme: dark;
}

.reg-group input[type="date"]:not(:placeholder-shown) ~ label {
  top: -14px;
  font-size: 12px;
  color: #7ba5ff;
}

.reg-group input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

/* ======== Botão animado ======== */
.reg-btn {
  position: relative;
  display: inline-block;
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 100px;
  background-color: #2b2b61;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff90;
  box-shadow: 0 0 0 2px #ffffff20;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.reg-btn span:first-child {
  position: relative;
  z-index: 1;
}

.reg-btn span:last-child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: #154b57;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.reg-btn:hover {
  box-shadow: 0 0 0 4px #5f85f360;
  color: #fff;
}

.reg-btn:active {
  transform: scale(0.96);
}

.reg-btn:hover span:last-child {
  width: 300px;
  height: 150px;
  opacity: 1;
}

/* ======== Link inferior ======== */
.reg-link {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #ccc;
}

.reg-link a {
  color: #89a9ff;
  text-decoration: none;
  font-weight: 500;
}

.reg-link a:hover {
  text-decoration: underline;
}


/* ===== Mensajes de registro ===== */
.reg-mensagem {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
  margin-bottom: 15px;
  animation: fadein 0.5s ease-in-out;
}

.reg-mensagem.erro {
  background-color: #ffdddd;
  color: #d8000c;
}

.reg-mensagem:not(.erro) {
  background-color: #ddffdd;
  color: #4f8a10;
}

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