/* Fuentes */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap');

/* Colores - Manteniendo tu paleta actual */
:root {
  --color-fondo: #0e0e0e;
  --color-borde: #1DA1F2;
  --color-texto: #ffffff;
  --color-placeholder: #b5b5b5;
  --color-boton: #1DA1F2;
  --color-boton-hover: #1DA1F2;
  --color-boton-texto: #0e0e0e;
  --color-link: #1DA1F2;
  --color-link-hover: #1DA1F2;
  --color-card: #1a1a1a;
  --color-input-bg: rgba(255, 255, 255, 0.05);
  --color-accent: #1DA1F2;
}

/* Estilos generales */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--color-fondo);
  color: var(--color-texto);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(29, 161, 242, 0.1) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(29, 161, 242, 0.1) 0%, transparent 25%),
    radial-gradient(circle at 50% 80%, rgba(29, 161, 242, 0.05) 0%, transparent 25%);
  position: relative;
  overflow-x: hidden;
}

/* Efectos de partículas en el fondo */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(29, 161, 242, 0.3), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(29, 161, 242, 0.3), transparent),
    radial-gradient(2px 2px at 60% 20%, rgba(29, 161, 242, 0.3), transparent),
    radial-gradient(2px 2px at 80% 50%, rgba(29, 161, 242, 0.3), transparent),
    radial-gradient(2px 2px at 30% 80%, rgba(29, 161, 242, 0.3), transparent);
  z-index: -1;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(-20px) translateX(10px);
  }

  100% {
    transform: translateY(0) translateX(0);
  }
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 50px 40px;
  background-color: var(--color-card);
  border-radius: 20px;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(29, 161, 242, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(29, 161, 242, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-borde), #6ecbf5, var(--color-borde));
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

h2 {
  font-weight: 700;
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-texto);
  position: relative;
  letter-spacing: -0.5px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--color-borde), transparent);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 28px;
  position: relative;
}

label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--color-texto);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.input-container {
  position: relative;
}

input[type='text'],
input[type='password'] {
  background-color: var(--color-input-bg);
  border: 1px solid rgba(29, 161, 242, 0.2);
  color: var(--color-texto);
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  padding: 16px 18px;
  width: 100%;
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

input[type='text']:focus,
input[type='password']:focus {
  outline: none;
  border-color: var(--color-borde);
  box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.2);
  transform: translateY(-2px);
}

input[type='text']::placeholder,
input[type='password']::placeholder {
  color: var(--color-placeholder);
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
}

.input-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-placeholder);
  font-size: 1.2rem;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 35px;
}

.reset-row {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.reset-btn {
  width: 100%;
  background: rgba(29, 161, 242, 0.08);
  border: 1px solid rgba(29, 161, 242, 0.35);
  color: var(--color-texto);
  padding: 14px 16px;
  font-size: 0.98rem;
  letter-spacing: 0.1px;
  box-shadow: none;
}

.reset-btn::before {
  display: none;
}

.reset-btn:hover {
  background: rgba(29, 161, 242, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(29, 161, 242, 0.18);
}

.reset-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.reset-hint {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  line-height: 1.25rem;
}

button {
  background-color: var(--color-boton);
  border: none;
  border-radius: 12px;
  color: var(--color-boton-texto);
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 16px 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover {
  background-color: var(--color-boton-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(29, 161, 242, 0.4);
}

#cerrar {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-texto);
}

#cerrar:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

.guest-btn {
  background: linear-gradient(135deg, rgba(29, 161, 242, 0.2), rgba(110, 203, 245, 0.2));
  border: 1px solid rgba(29, 161, 242, 0.4);
  color: var(--color-texto);
}

.guest-btn:hover {
  background: linear-gradient(135deg, rgba(29, 161, 242, 0.3), rgba(110, 203, 245, 0.3));
  box-shadow: 0 8px 20px rgba(29, 161, 242, 0.2);
}

.register-link {
  text-align: center;
  margin-top: 30px;
  font-size: 0.95rem;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-link);
  transition: width 0.3s ease;
}

a:hover {
  color: var(--color-link-hover);
}

a:hover::after {
  width: 100%;
}

/* Toast notification mejorado */
.toast {
  visibility: hidden;
  min-width: 280px;
  background-color: rgba(40, 40, 40, 0.95);
  color: #fff;
  text-align: center;
  border-radius: 12px;
  padding: 16px 24px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
  visibility: visible;
  opacity: 1;
}

/* Efectos de carga */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media screen and (max-width: 480px) {
  .login-container {
    padding: 40px 25px;
    border-radius: 16px;
  }

  h2 {
    font-size: 1.9rem;
  }

  input[type='text'],
  input[type='password'] {
    padding: 14px 16px;
  }
}
