:root {
  --primary:  #0983d6;
  --bg-dark: #0D0D0D;
  --bg-card: #1A1A1A;
  --text-light: #FFFFFF;
  --text-gray: #A0A0A0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(15deg, var(--bg-dark), #0983d6);
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  margin:0;
  min-height: 100vh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.login-box {
  background: var(--bg-dark);
  padding: 2rem;
  border-radius: 12px;
  width: calc(100% - 32px);
    max-width: 700px;  /* Aumentado */
  min-width: unset;
  box-shadow:50px 50px 100px #1c4c5d,
             -50px -50px 100px var(--primary);
  text-align: center;
  animation: slideInLoginBox 0.5s ease-out;
}

@keyframes slideInLoginBox {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.logo h1 {
  font-size: 1.2rem;
  color: var(--text-light);
}

.logo img {
  width: 52px;
  height: 52px;
  margin-right: 8px;
}

h1 {
  font-size: 2.5rem;
  color: var(--primary);
}

h2 {
  margin-bottom: 2.5rem;
  font-size: 2.5rem;
}

.input-group {
  margin-bottom: 1rem;
  position: relative;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid;
}

.input-group input {
  width: 100%;
  height: 70px;
  padding: 10px 15px;
  border-radius: 10px;
  outline: none;
  background: var(--bg-card);
  color: white;
}

@media (max-width: 600px) {
  body {
    align-items: flex-start;
    padding-top: 36px;
    height: auto;
    min-height: 150vh;
    
  }

  .login-box {
    margin: 0 12px 36px;
    padding: 1.25rem;
    border-radius: 14px;
    margin-top: 150px;
    max-width: 520px;
  }

  .input-group input { height: 50px; font-size: 0.95rem; }
  .logo img { width: 40px; height: 40px; }
  h2 { font-size: 1.6rem; }
  .loginbtn { height: 52px; font-size: 0.95rem; }

  .logo { gap: 6px; margin-bottom: 0.75rem; }
  .terms { font-size: 0.88rem; padding: 0 6px; text-align: center; }
}

/* Extra small devices (narrow phones) */
@media (max-width: 380px) {
  .login-box { padding: 1rem; width: calc(100% - 20px); }
  h2 { font-size: 1.45rem; }
  .input-group input { height: 46px; font-size: 0.9rem; }
  .loginbtn { height: 48px; font-size: 0.95rem; }
}


.password-group {
  display: flex;
  align-items: center;
}

.password-group input {
  flex: 1;
  padding-right: 2.5rem;
}


.error {
  color: #ff6b6b;              /* Rojo más suave y moderno */
  font-size: 0.8rem;
  margin-top: 4px;
  margin-left: 4px;
  display: block;
  font-weight: 500;
  opacity: 0.95;
}

/* Cuando hay error en un input */
input.error-input {
  border: 1.5px solid #ff6b6b;
  background-color: rgba(255, 107, 107, 0.05);
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

/* Efecto al enfocar el input con error */
input.error-input:focus {
  outline: none;
  box-shadow: 0 0 6px rgba(255, 107, 107, 0.5);
  background-color: rgba(255, 107, 107, 0.08);
}

input.error-input::placeholder {
  color: #ff6b6b;        /* el texto del error en rojo */
  font-weight: 500;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.7rem;
  color: var(--text-gray);

  
}

.loginbtn {
  width: 100%;
  height: 70px;
  padding: 0.8rem;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  transition: background 0.3s;
  margin-top: 1rem;
}

.loginbtn:hover {
  background: #008bbd;
}

.botones{
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.resendbtn {
  width: 50%;
  height: 70px;
  padding: 0.8rem;
  background: var(--text-light);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: black;
  transition: background 0.3s;
  margin-top: 1rem;
}

.resendbtn:hover {
  background: #008bbd;
}

.verifybtn {
  width: 50%;
  height: 70px;
  padding: 0.8rem;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  transition: background 0.3s;
  margin-top: 1rem;
}

.verifybtn:hover {
  background: #008bbd;
}


.register-link {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text-gray);
}


.terms {
  font-size: 1.2  rem;
  color: var(--text-gray);
  margin-top: 1rem;
}

.terms a {
  color: var(--primary);
  text-decoration: none;
}

.verification-msg {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  transition: background-color 9999s ease-in-out 0s;
  -webkit-text-fill-color: white !important; /* Color de texto */
}

/* Contenedor de mensajes */
.message-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Mensaje individual */
.message {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: auto;
  max-width: 400px;
  word-break: break-word;
  will-change: transform, opacity;
}

/* Variantes */
.message-success {
  background: #4CAF50;
  color: #fff;
}

.message-error {
  background: #f44336;
  color: #fff;
}

.message-info {
  background: var(--primary);
  color: #fff;
}

.message-warning {
  background: #ff9800;
  color: #fff;
}

/* Animaciones */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }
}
