/* General */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #1a237e; /* Fondo azul oscuro */
    color: #c9d1d9; /* Texto claro */
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, #1f2937, #0d1117);
    z-index: 0 !important;
}

/* Contenedor principal */
.container {
    background-color: #161b22; /* Fondo del formulario */
    padding: 1.5rem; /* Reducir padding */
    border-radius: 8px; /* Bordes más pequeños */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 350px; /* Reducir ancho máximo */
    text-align: center;
    border: 2px solid #ff9d00; /* Borde neón naranja */
    z-index: 2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Títulos */
h2 {
    margin-bottom: 1rem; /* Reducir margen */
    color: #ff9d00; /* Naranja neón */
    font-size: 1.5rem; /* Reducir tamaño de fuente */
    text-transform: uppercase;
    letter-spacing: 1px; /* Reducir espaciado entre letras */
}

/* Etiquetas */
label {
    display: block;
    margin-bottom: 0.3rem; /* Reducir margen */
    font-weight: bold;
    color: #8b949e; /* Gris claro */
    text-align: left;
    font-size: 0.8rem; /* Reducir tamaño de fuente */
}

/* Campos de entrada */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.6rem; /* Reducir padding */
    margin-bottom: 0.8rem; /* Reducir margen */
    border: 1px solid #30363d;
    border-radius: 5px; /* Bordes más pequeños */
    font-size: 0.9rem; /* Reducir tamaño de fuente */
    background-color: #0d1117;
    color: #c9d1d9;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #ff9d00; /* Naranja neón */
    outline: none;
    box-shadow: 0 0 6px rgba(255, 157, 0, 0.8); /* Reducir sombra */
}

/* Botones */
button {
    background-color: #ff9d00; /* Naranja neón */
    color: #ffffff;
    padding: 0.6rem 1rem; /* Reducir padding */
    border: none;
    border-radius: 5px; /* Bordes más pequeños */
    font-size: 0.9rem; /* Reducir tamaño de fuente */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
}

button:hover {
    background-color: #ffae33; /* Naranja más claro */
    transform: scale(1.03); /* Reducir efecto de escala */
}

/* Párrafos */
p {
    margin-top: 0.8rem; /* Reducir margen */
    font-size: 0.8rem; /* Reducir tamaño de fuente */
    color: #8b949e;
}

p a {
    color: #ff9d00; /* Naranja neón */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem; /* Reducir tamaño de fuente */
}

p a:hover {
    text-decoration: underline;
}

/* Mensajes de error y éxito */
.error-message {
    color: #f85149; /* Rojo alerta */
    font-size: 0.8rem; /* Reducir tamaño de fuente */
    margin-bottom: 0.8rem; /* Reducir margen */
    font-weight: bold;
    text-align: center;
}

.success-message {
    color: #4caf50; /* Verde éxito */
    font-size: 0.8rem; /* Reducir tamaño de fuente */
    margin-bottom: 0.8rem; /* Reducir margen */
    font-weight: bold;
    text-align: center;
}

/* Fondo de partículas */
canvas:not(#particles-bg) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: transparent;
}

/* Alertas */
.alert {
    position: fixed;
    top: 40px; /* Reducir distancia desde arriba */
    left: 50%;
    transform: translateX(-50%);
    background-color: #f85149; /* Rojo alerta */
    color: #ffffff;
    padding: 0.8rem 1.5rem; /* Reducir padding */
    border-radius: 6px; /* Bordes más pequeños */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem; /* Reducir tamaño de fuente */
    font-weight: bold;
    z-index: 1000;
    text-align: center;
    animation: fadeIn 0.5s ease, fadeOut 3s ease 2.5s;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}